C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hey, can anyone suggest an alternative to blitAlphaImageToScreen()? That makes my images go all weird, they dont blit properly, and ...
-
04-05-2008, 03:01 AM #8371QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Hey,
can anyone suggest an alternative to blitAlphaImageToScreen()? That makes my images go all weird, they dont blit properly, and libGe supposedly supports alpha but i just get white instead or transparency.
-
04-05-2008, 04:03 AM #8372words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
It's probably your images fault ;) And ya theres plenty of alternatives. Oslib, JG++ (i believe thats the name of it i forgot lol), GU, PSPGL, LTE, triEngine, etc. etc.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-05-2008, 04:51 AM #8373QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
As SG57 said, OSLib. It has a good transparency function, but it only supports PNG files I believe.
-
04-05-2008, 05:18 AM #8374QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Yeah, iv used OSLib before but its more of an engine like those others mentioned
-
04-05-2008, 01:00 PM #8375words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Moose_Island - What are you talking about... You can either specify a transparency key in code and load a 24 bit image (JPG i believe) and have those parts be transparent or just load a 32 bit image with transparency in it already. As for file format support - PNG, JPG and GIF support.
Xsjado - yes it's an engine, but if your current graphics library is lacking in what you need, you should be smart enough to get a better one or else why even bother? Don't bend over backwards trying to get something done when there are much easier, more efficient methods available.
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-05-2008, 03:01 PM #8376I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I'm using malloc, as I'm reading the data.PSP into memory, do I use __attribute__((aligned(64 ))) on the pointer? Like this:
Zitat von SilverSpring
Code:unsigned char* datapsp __attribute__((aligned(64)));
Its all usermode, I wasn't aware there was any difference between exports in kernel and user:
Zitat von SilverSpring
(Its all basically graphics.c and intraFont.c functions)
Spoiler for Stub:
Spoiler for Exports:
Thanks again.
-Aura
-
04-05-2008, 05:30 PM #8377QJ Gamer Blue
- Registriert seit
- Jul 2006
- Beiträge
- 132
- Points
- 4.296
- Level
- 41
- Downloads
- 0
- Uploads
- 0
im trying to do collision but i have a prob. I cant seem to move my main sprite so i can check if the 2 other objects have collision. Can someone please help?
Code://Oslib header file #include <oslib/oslib.h> //This is needed for eboot PSP_MODULE_INFO("OSLib Sample", 0, 1, 1); PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER | THREAD_ATTR_VFPU); //this creates pointers for our images. OSL_IMAGE *sprite, *sprite2, *sprite3; //definations #define DOWN 0 #define UP 35 #define RIGHT 70 #define LEFT 105 //variables int sprite_position; int sprite_march; //declare the function like buttons and spriteAnimation void Buttons(); void SpriteAnimate(); int collision(OSL_IMAGE *img1,float img1posX, float img1posY, OSL_IMAGE *img2, float img2posX, float img2posY,OSL_IMAGE *img3, float img3posX, float img3posY ); int main() { //start the Oslib library oslInit(0); //start the graphixs mode oslInitGfx(OSL_PF_8888, 1); //sets the transparency color oslSetTransparentColor(RGB(255,0,255)); //loads the images into memory sprite = oslLoadImageFile("sprite.png", OSL_IN_RAM, OSL_PF_5551); sprite2 = oslLoadImageFile("sprite2.png", OSL_IN_RAM, OSL_PF_5551); sprite3 = oslLoadImageFile("sprite3.png", OSL_IN_RAM, OSL_PF_5551); //Disables the transparent color so it cannot be used again oslDisableTransparentColor(); //sees if all files are avaiable if (!sprite || !sprite2||!sprite3) oslDebug("! one or more of the files were missing, the program cannot run"); //Sets the sprites original position, lets see if i can get 2 sprites on da bloody screen sprite->x = 155; sprite->y = 95; sprite_position = DOWN; //sets second sprite position sprite2->x = 230; sprite2->y = 130; //sets thrid sprite pos sprite3->x = 270; sprite3->y = 130; //main while loop while (!osl_quit) { //to be able ot draw on the screen oslStartDrawing(); //Buttons Buttons(); //draws a green background oslDrawGradientRect(0,0,480,272,RGB(0,128,0),RGB(0,128,0), RGB(128,255,128), RGB(128,255,128)); //this draws the images to the screen oslDrawImage(sprite); oslDrawImage(sprite2); oslDrawImage(sprite3); //stops the drawing mode oslEndDrawing(); //sync the screen oslSyncFrame(); } //terminate the program oslEndGfx(); oslQuit(); return 0; } void Buttons() { //starts up the psp buttons oslReadKeys(); if (osl_keys->held.down) { if(!collision(sprite, sprite->x, sprite->y + 2, sprite2, sprite2->x, sprite2->y, sprite3, sprite3->x, sprite3->y )) { //sprite movement sprite->y +=2; //sets sprite position on sprite sheet sprite_position = DOWN; //calls sprie animate SpriteAnimate(); } } if (osl_keys->held.up) { if(!collision(sprite, sprite->x, sprite->y - 2, sprite2, sprite2->x, sprite2->y,sprite3, sprite3->x, sprite3->y )) { sprite->y-= 2; sprite_position = UP; SpriteAnimate(); } } if (osl_keys->held.right) { if(!collision(sprite, sprite->x + 2, sprite->y, sprite2, sprite2->x, sprite2->y,sprite3, sprite3->x, sprite3->y )) { sprite->x += 2; sprite_position = RIGHT; SpriteAnimate(); } } if (osl_keys->held.left) { if(!collision(sprite, sprite->x - 2, sprite->y, sprite2, sprite2->x, sprite2->y,sprite3, sprite3->x, sprite3->y )) { sprite->x -= 2; sprite_position = LEFT; SpriteAnimate(); } } //If a button is not pressed if (!osl_keys->held.value) { //Start the variable over for when a button is pressed again sprite_march = 0; //Sets the sprite's direction oslSetImageTileSize(sprite,0,sprite_position,22,35); } } void SpriteAnimate() { //Moves the sprite in the row that it is in sprite_march++; //Moves the sprite constantly oslSetImageTileSize(sprite,(sprite_march * 22),sprite_position,22,35); //resets the sprite movement in that row if (sprite_march == 6) sprite_march = 0; } int collision(OSL_IMAGE *img1,float img1posX, float img1posY, OSL_IMAGE *img2, float img2posX, float img2posY, OSL_IMAGE *img3, float img3posX, float img3posY ) { int collision; collision = 0; float img1width = img1->stretchX; float img1height = img1->stretchY; float img2width = img2->stretchX; float img2height = img2->stretchY; float img3width = img3->stretchX; float img3height = img3->stretchY; if ((img1posX + img1width > img2posX) && (img1posX < img2posX + img2width) && (img1posX + img1width > img3posX)&& (img1posX <img3posX + img3width)&& (img1posY + img1height > img3posY)&& (img1posY < img3posY + img3height)&& (img1posY + img1height > img2posY) && (img1posY < img2posY + img2height) ) { { collision = 1; } return collision; } }
-
04-05-2008, 09:13 PM #8378QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Yeah, very true. Im gonna get to work on porting my code to OSL. Thanks
Zitat von SG57
-
04-06-2008, 12:43 AM #8379QJ Gamer Silver

- Registriert seit
- Sep 2007
- Ort
- AUS
- Beiträge
- 284
- Points
- 12.501
- Level
- 73
- Downloads
- 0
- Uploads
- 0
can some one help me with this error.
luasystem.cpp
.text+0x26bc): undefined reference to `sctrlHENIsSE()'
luasystem.cpp
.text+0x26cc): undefined reference to `sctrlHENIsDevhook()'
luasystem.cpp
.text+0x26fc): undefined reference to `sctrlSEGetConfig(SEConfi g*)'
luasystem.cpp
.text+0x2718): undefined reference to `sctrlSEMountUmdFromFile( char*, int, int)'
luasystem.cpp
.text+0x2734): undefined reference to `sctrlSEMountUmdFromFile( char*, int, int)'
luasystem.cpp
.text+0x279c): undefined reference to `sctrlKernelLoadExecVSHDi sc(char const*, SceKernelLoadExecVSHParam *)'
luasystem.cpp
.text+0x281c): undefined reference to `sctrlKernelLoadExecVSHDi sc(char const*, SceKernelLoadExecVSHParam *)'
luasystem.cpp
.text+0x2874): undefined reference to `sctrlKernelLoadExecVSHMs 2(char const*, SceKernelLoadExecVSHParam *)'
collect2: ld returned 1 exit status
make: *** [luaplayer.elf] Error 1
I get it when compiling. I have referenced the headers needed and added the lib in the make file
&(^&&*T^&*^& DONT WORRY FIXED )&*&^*(&^Geändert von homemister91 (04-06-2008 um 12:57 AM Uhr)
Wyvern. That is all
-
04-06-2008, 11:39 AM #8380
- Registriert seit
- Apr 2008
- Beiträge
- 1
- Points
- 2.572
- Level
- 30
- Downloads
- 0
- Uploads
- 0
Awesome
-
04-06-2008, 12:00 PM #8381Developer

- Registriert seit
- Mar 2006
- Beiträge
- 1.026
- Points
- 7.577
- Level
- 58
- Downloads
- 0
- Uploads
- 0
As I stated when you first asked, use memalign.
Zitat von Auraomega
Code:memalign(64, size);

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
-
04-06-2008, 01:13 PM #8382QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Does anyone know where to find the .tga image for this tutorial?
http://www.psp-programming.com/code/doku.php?id=c
spgu-neheport-lesson5
I got a nehe.tga image of the net but i dont think its the right one because it cant be opened
-= Double Post =-
All good, just got the picture from the NeHe OpenGL texture mapping tut and saved it as a tga with PhotoshopGeändert von Xsjado7 (04-06-2008 um 01:44 PM Uhr) Grund: Automerged Doublepost
-
04-06-2008, 03:08 PM #8383QJ Gamer Bronze
- Registriert seit
- Jul 2006
- Ort
- Netherlands
- Beiträge
- 359
- Points
- 4.795
- Level
- 44
- My Mood
-
- Downloads
- 0
- Uploads
- 0
How do you tell the PSP to shutdown in C
Hi,
I have Googled for it and checked several sites, but could not find it. I know that sceKernelExitGame() returns to the VSH. But how do I tell a PSP that it needs to shutdown?
In Pandora the function sceKernelExitGame() reboots the PSP.
-
04-06-2008, 03:15 PM #8384
This exits the game to the XMB.
I forgot how to shut down. Let me make a quick search.Code:sceKernelExitGame();
-
04-06-2008, 03:43 PM #8385Give It All

- Registriert seit
- Jan 2006
- Ort
- United States
- Beiträge
- 3.899
- Points
- 18.200
- Level
- 85
- Downloads
- 0
- Uploads
- 0
scePowerRequestStandby() "shuts down" the PSP completely (clearing memory)
scePowerRequestSuspend() shuts down PSP keeping memory intact (resume application later)
Core 2 Duo E8400 @ 3.6ghz (Multiplier: 9x; Bus: 400mhz; FSB: 1600mhz;)
GeForce 9800 GTX+ 512 MB (Core: 850mhz; Memory: 1200mhz; Shader: 2100mhz;)
ASUS P5K Pro Motherboard
Patriot Extreme (2x2GB) / OCZ HPC (2x1GB)
6GB Total Dual Channel RAM (DDR2 1066mhz)
OCZ GameXstream 700w
2x Seagate 250GB HD (RAID0)
-
04-06-2008, 03:48 PM #8386
Dangit....
I have all my code on my other computer so I had to look it up and I was just about to post it!
-
04-06-2008, 03:50 PM #8387Give It All

- Registriert seit
- Jan 2006
- Ort
- United States
- Beiträge
- 3.899
- Points
- 18.200
- Level
- 85
- Downloads
- 0
- Uploads
- 0
:P beat you to the chase lol

Core 2 Duo E8400 @ 3.6ghz (Multiplier: 9x; Bus: 400mhz; FSB: 1600mhz;)
GeForce 9800 GTX+ 512 MB (Core: 850mhz; Memory: 1200mhz; Shader: 2100mhz;)
ASUS P5K Pro Motherboard
Patriot Extreme (2x2GB) / OCZ HPC (2x1GB)
6GB Total Dual Channel RAM (DDR2 1066mhz)
OCZ GameXstream 700w
2x Seagate 250GB HD (RAID0)
-
04-06-2008, 08:33 PM #8388It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
It's times like this that I turn to the PSPLink source code. It's very educational. scePowerRequestStandby is how PSPLink does it.
crait: I recognize your avatar. Which movie is it from? I can't remember. Is it Butterfly and Sword?pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
04-07-2008, 04:54 AM #8389
Yes, I too look at source code for how to do stuff if someone has used it before.
Zitat von Archaemic
And nope. Kung Pow! Enter The Fist
But it's originally from Savage Killers AKA Tiger and Crane Fist
-
04-07-2008, 06:45 AM #8390QJ Gamer Platinum
- Registriert seit
- Feb 2006
- Ort
- National Front Disco
- Beiträge
- 13.057
- Points
- 66.627
- Level
- 100
- Downloads
- 0
- Uploads
- 0
Thread merged with C/C++ Programming Help Thread, it exists for a reason.
-
04-08-2008, 02:29 PM #8391
I know what ntohs,htons,ntohl,htonl do...
But where's the source for these?
It changes byteordering; I would like to peek @ the source.
-
04-08-2008, 05:34 PM #8392QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Hey,
I am using this huge line for a file check, and if it fails, display an error:
Is there an easier way to do a file check for every png image i load?Code:if (!menu || !credit1 || !spaceship || !enemy || !bg1 || !bg2 || !blueweapon || !redweapon || !specialweapon || !explosion || !bpickup || !fpickup) { oslDebug("Error: Could not load one or more images"); }
Thanks.Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-08-2008, 06:44 PM #8393words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
TMNT - If you're going to ask for help, specify the graphics library your using that handles PNG loading.
In anycase, don't do it that way. If you're using oslib 2.10, call this after initialization, it will automatically assert anything you load.
Should you be using any other version of oslib or just choose not to use it as you like to manage what you load, not rely on some integrated stuff (like me), use oslAssert(pointer_to_OSL_ resource) Why you do this is to prevent the manual oslDebug stuff, oslAssert automatically triggers a fatal error message box informing you what file couldn't be loaded and gives you the line and source file where it was called (be it not found or not enough memory).Code:oslSetQuitOnLoadFailure((int) 1 /* 1 - on, 0 - off */);
I don't know if you know this or not, but a few things you should know when working with loaded resources. When ever you're loading a resource, always and check if it's already loaded, if it is delete it then load. When working with sounds and music it is automatically stopped then deleted, When unloading resources, always check if it's already loaded and if it is then delete and assign to NULL to prevent false-positives when checking for if it's already loaded.
example:Why assign to NULL?Code:// load main menu resources if (menu_background) // if the menu_background is loaded oslDeleteImage(menu_background); // delete it menu_background = oslLoadImageFile("menu.png", ......); // load our menu background image oslAssert(menu_background); // check and make sure it loaded if (menu_music) // if the menu music is already loaded oslDeleteSound(menu_music); // delete it, stops automatically if playing menu_music = oslLoadSoundFile("music.bgm"...); // load menu music oslAssert(menu_music); ............. // delete menu resources if (menu_background) oslDeleteImage(menu_background); menu_background = NULL; if (menu_music) oslDeleteSound(menu_music); menu_music = NULL;
Obviously that won't compile but you can adapt it to compile and see for yourself.Code:void Menu(); void Game(); OSL_IMAGE *menuBackground = NULL; void LoadMenuResources() { if (menuBackground) // this is what im talking about oslDeleteImage(menuBackground); // this will crash it second time through menuBackground = oslLoadImageFilePNG("menu.png", OSL_IN_RAM | OSL_SWIZZLED, OSL_PF_5551); oslAssert(menuBackground); } void UnloadMenuResources() { if (menuBackground) oslDeleteImage(menuBackground); //menuBackground = NULL; } void Menu() { LoadMenuResources(); while(1) { if x is pressed { break; } } UnloadMenuResources(); Game(); } void Game() { LoadGameResources(); while(1) { if x is pressed { break; } } UnloadGameResources(); Menu(); } int main() { Menu(); return 0; }
It will run fine, your menu will work, you can go to the game as well, it's just when you try to leave the game and go back to the menu that you try to load the menu resources that it will crash. This is because when you unloaded the menu resources, you didn't nullify the pointer to the OSL_IMAGE struct that is the menuBackground, so menuBackground doesn't return NULL since it is pointing to an address in memory, so the line in LoadMenuResources() i commented on will crash it upon re-entering the menu (specifically the oslDeleteImage). It will run that first if statement since menuBackground isn't returning null despite it being deleted in the unloading since it is pointing to an address. so it will try to delete the stuff at the address menuBackground is pointing to. Undefined behavior will occur but in 99% of the cases, expect a crash with an address fetch exception.
If you do happen to try it out, uncomment the line where it assigns it to NULL and see the difference.
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-08-2008, 07:14 PM #8394QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Thanks dude. I will try that tommorow, and give you the results. I only needed the first code though, but thanks for the thorough explaination. I am using OSlib 2.10.
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-08-2008, 07:38 PM #8395words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Still I don't think it nullifies the pointer after deleting, (tried it myself) so if you do any deleting and running through it again, you'll have a problem.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
04-09-2008, 08:52 AM #8396I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
I'm having a few problems with plugins in Project4, only one method has to work and I'm not truely fussed which, but every one I've attempted has failed, just wondering if anyone can help me with the 2 that I still have structured?
I want to load an EBOOT.PBP (or prx for that matter) with arguments:
Spoiler for loadExec:
Spoiler for loadModuleBuffer:
I think I'd prefer to be able to do the latter way, but the former is ok too, as long as I have some way of passing arguments I'll be happy.
Thanks.
-Aura
-
04-09-2008, 01:35 PM #8397
I don't know if this will help, or if it's right, but whenever I pass a text argument, I use a pointer.
Zitat von Auraomega
void load_plugin(char * path) {}[IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]
Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.
-
04-09-2008, 01:40 PM #8398QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Lol, you didn't really have to quote that if you replied right after his post (no offense, your awesome).
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
04-09-2008, 02:23 PM #8399I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Nope, it shouldn't make a difference as far as I'm aware, although any suggestions are worth noting so I'll have a quick fiddle around with the code to see if that fixes it :)
Zitat von Judas
-Aura
-
04-09-2008, 02:29 PM #8400QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Hey,
here is my shooting code:
It works great, but the problem is that i can't have more than one bullet. How am i supposed to allow "rapidfire" or "more than one bullet on the screen" at a time by using only one image?Code:/******************* Shooting ********************/ //Fresh Shot Ready if (WeaponTimer < 1) { WeaponPosX = SpaceshipPosX + SpaceshipWidth; WeaponPosY = SpaceshipPosY + 15; weapondamage = 0; } //Fresh Shot Ready if (FireTimer < 1) { WeaponPosX = SpaceshipPosX + SpaceshipWidth; WeaponPosY = SpaceshipPosY + 15; weapondamage = 0; } //Active Shoot if (FireTimer > 1) { if ( (FireTimer < 4) && (weaponstatus < 4) ) { WAV_Play(fire1); } else if ( (FireTimer < 4) && (weaponstatus > 3) ) { WAV_Play(flame); } if (WeaponTimer > 0) { if ( (weaponstatus > 0) && (weaponstatus < 4) ) { blitimage(WeaponOffsetX, WeaponOffsetY, WeaponWidth, WeaponHeight, Weapon, WeaponPosX, WeaponPosY); } else if ( (weaponstatus > 3) && (weaponstatus < 7) ) { blitimage(WeaponOffsetX, WeaponOffsetY, WeaponWidth, WeaponHeight, Weapon2, WeaponPosX, WeaponPosY); } weapondamage = weaponpower1; } FireTimer++; WeaponPosX += wspeed1; } //Refresh Shooting if (FireTimer > WeaponDistance) { WeaponPosX = SpaceshipPosX + SpaceshipWidth; WeaponPosY = SpaceshipPosY + 15; weapondamage = 0; FireTimer = 0; WeaponTimer = 1; }
Thanks. :oCalypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)


LinkBack URL
About LinkBacks
Mit Zitat antworten




Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum