| View previous topic :: View next topic |
| Author |
Message |
TheMan
Joined: 03 Jan 2006 Posts: 10
|
Posted: Tue Jan 03, 2006 9:33 am Post subject: Help for a noob |
|
|
Hi, I'm quite new to this and im having some problems with the screen not clearing the cursor im blitting to it. Can someone please guide me in the right direction?
| Code: | int main() {
SceCtrlData pad;
pspDebugScreenInit();
SetupCallbacks();
initGraphics();
int cursorx = 480/2;
int cursory = 272/2;
int cursorxstep = 3;
int cursorystep = 3;
char buffer[200];
char buffer2[200];
Image* cursor;
Image* bg;
sprintf(buffer, "cursor.png");
sprintf(buffer2, "bg.png");
cursor = loadImage(buffer);
bg = loadImage(buffer2);
while(1) {
blitAlphaImageToScreen(0 ,0 ,480 , 272, bg, 0, 0);
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons & PSP_CTRL_UP){
cursory = cursory - cursorystep;
}
if (pad.Buttons & PSP_CTRL_DOWN){
cursory = cursory + cursorystep;
}
if (pad.Buttons & PSP_CTRL_LEFT){
cursorx = cursorx - cursorxstep;
}
if (pad.Buttons & PSP_CTRL_RIGHT){
cursorx = cursorx + cursorxstep;
}
if (pad.Buttons & PSP_CTRL_CROSS){
sceKernelExitGame();
}
if (cursorx < 0) cursorx=0;
if (cursorx > 480) cursorx=480;
if (cursory < 0) cursory=0;
if (cursory > 272) cursory=272;
blitImageToImage(0 ,0 ,9 , 12, cursor, cursorx, cursory, bg);
sceDisplayWaitVblankStart();
flipScreen();
}
pspDebugScreenClear();
sceKernelSleepThread();
return 0;
} |
|
|
| Back to top |
|
 |
TheMan
Joined: 03 Jan 2006 Posts: 10
|
Posted: Wed Jan 04, 2006 5:42 am Post subject: |
|
|
| NVM figured it out |
|
| Back to top |
|
 |
ronniebeck
Joined: 04 Jan 2006 Posts: 4
|
Posted: Wed Jan 04, 2006 2:50 pm Post subject: |
|
|
On the topic of helping a noob, can some one tell me what I am doing wrong here?
| Code: | [rony@kehlstein fileio]$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -L/usr/local/pspdev/psp/sdk/lib main.o -lpspumd -lpspkernel -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o fileio.elf
main.o: In function `fileSize':
main.c:(.text+0x16c): undefined reference to `sceIoGetStat'
collect2: ld returned 1 exit status
make: *** [fileio.elf] Error 1
[rony@kehlstein fileio]$ |
|
|
| Back to top |
|
 |
JoshDB

Joined: 05 Oct 2005 Posts: 87
|
Posted: Thu Jan 05, 2006 2:16 am Post subject: |
|
|
| Try looking at your makefile for missing libraries |
|
| Back to top |
|
 |
MikeDX
Joined: 19 Oct 2005 Posts: 30
|
Posted: Thu Jan 05, 2006 4:07 am Post subject: |
|
|
A more sensible option would just be to replace sceIoGetStat with sceIoGetstat
check the makefiles indeed... tsk. |
|
| Back to top |
|
 |
JoshDB

Joined: 05 Oct 2005 Posts: 87
|
Posted: Thu Jan 05, 2006 9:48 am Post subject: |
|
|
| Hey, I'm a n00b here too... My problem is usually in the Makefile, so I just try to help ( : |
|
| Back to top |
|
 |
TheMan
Joined: 03 Jan 2006 Posts: 10
|
Posted: Fri Jan 06, 2006 1:54 am Post subject: |
|
|
Another question that somebody might be able to help me with; I remember hearing from someone that you can warp images or do things to images, for example like fading or shrinking/expanding it.
Does anybody know how I would be able to fade an image, with just code? |
|
| Back to top |
|
 |
|