forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

crashing problems

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
snoopshady



Joined: 10 Jan 2008
Posts: 5

PostPosted: Sun Jan 20, 2008 8:08 pm    Post subject: crashing problems Reply with quote

(wow i seem to be posting way too much here nvm)
heres my code
Code:

#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspcallbacks.h>
#include "graphics.h"
PSP_MODULE_INFO("sprite",0,1,1);
Image*llyod[8];
int main(){
initGraphics();
SetupCallbacks();
SceCtrlData pad;
int attackonoff = 0;
int framecounter = 0;
llyod[0] = loadImage("stand.png");
llyod[1] = loadImage("attack1.png");
llyod[2] = loadImage("attack2.png");
llyod[3] = loadImage("attack3.png");
llyod[4] = loadImage("attack4.png");
llyod[5] = loadImage("attack5.png");
llyod[6] = loadImage("attack6.png");
llyod[7] = loadImage("attack7.png");
while(1){
sceCtrlReadBufferPositive(&pad,1);
if(pad.Buttons & PSP_CTRL_CROSS){
attackonoff += 1;
   if(attackonoff == 2){
   attackonoff = 1;
   }
   framecounter++;
   if(framecounter >= 7){
   framecounter = 0;
   attackonoff = 0;
   }
}

blitAlphaImageToScreen(0,0,75,72,llyod[framecounter],100,100);
sceDisplayWaitVblankStart();
flipScreen();
}
freeImage(llyod[0]);   
freeImage(llyod[1]);
freeImage(llyod[2]);
freeImage(llyod[3]);
freeImage(llyod[4]);   
freeImage(llyod[5]);   
freeImage(llyod[6]);   
freeImage(llyod[7]);   
sceKernelSleepThread();
return 0;
}

whenever i run this i get a blank screen and when i press home and select yes the psp crashes am i using too much memory or is it just the code?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group