crashing problems

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
snoopshady
Posts: 5
Joined: Thu Jan 10, 2008 1:49 am

crashing problems

Post by snoopshady »

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

Code: Select all

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

blitAlphaImageToScreen&#40;0,0,75,72,llyod&#91;framecounter&#93;,100,100&#41;;
sceDisplayWaitVblankStart&#40;&#41;;
flipScreen&#40;&#41;;
&#125;
freeImage&#40;llyod&#91;0&#93;&#41;;	
freeImage&#40;llyod&#91;1&#93;&#41;;
freeImage&#40;llyod&#91;2&#93;&#41;;
freeImage&#40;llyod&#91;3&#93;&#41;;
freeImage&#40;llyod&#91;4&#93;&#41;;	
freeImage&#40;llyod&#91;5&#93;&#41;;	
freeImage&#40;llyod&#91;6&#93;&#41;;	
freeImage&#40;llyod&#91;7&#93;&#41;;	
sceKernelSleepThread&#40;&#41;;
return 0;
&#125;
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?
Post Reply