Rico
Certified Guru
Hi, I'm quite stupid when it comes to linking and compiling, making makefiles, and such.
I have a patched devkitadv package, and I stole the makefile from the gp32 test program, and modified it slightly
Since I have a lot of questions I'm posting them here, I hope someone can answer a few
1. sprintf ... I #included 'gpstdio.h' and did some sprintfs, but I got annoyed by the warnings that it was 'implicitly called'. So I added a
in the header file. This gets rid of the warning in C compiliation, however if I change the extension to gpmain.cpp (purely so I can have // comments, eheh) it complains a lot. What is the proper way to 'define' sprintf in the code?
2. blits. I need to blit an image from one GPDRAWSURFACE to another, without using an internal buffer (optimally). I went for GpBitBlt(NULL, &gpDraw[nflip], 0, 0, 320, 240, (unsigned char*)tbuf.ptbuffer, 0, 0, 320, 240); which works fine, except if you change it to blit anything -but- the entire screen, it screws up. Try it with 0,0,320,200, and it messes up, I have no idea why.
If I can't do that, could someone please tell me how to either dump a gpdrawsurface onto a buffer (unsigned char) so I can use it in a blit, or to use gpdraw's primitives on a char buffer?
3. Finally, is GpFxBlt broken on the GCC version of the SDK? Just inquiring before I start using it.
Thanks again, all replies welcomed.
- Rico
I have a patched devkitadv package, and I stole the makefile from the gp32 test program, and modified it slightly
Since I have a lot of questions I'm posting them here, I hope someone can answer a few
1. sprintf ... I #included 'gpstdio.h' and did some sprintfs, but I got annoyed by the warnings that it was 'implicitly called'. So I added a
Code:
extern int sprintf(char *, const char*, ...);
2. blits. I need to blit an image from one GPDRAWSURFACE to another, without using an internal buffer (optimally). I went for GpBitBlt(NULL, &gpDraw[nflip], 0, 0, 320, 240, (unsigned char*)tbuf.ptbuffer, 0, 0, 320, 240); which works fine, except if you change it to blit anything -but- the entire screen, it screws up. Try it with 0,0,320,200, and it messes up, I have no idea why.
If I can't do that, could someone please tell me how to either dump a gpdrawsurface onto a buffer (unsigned char) so I can use it in a blit, or to use gpdraw's primitives on a char buffer?
3. Finally, is GpFxBlt broken on the GCC version of the SDK? Just inquiring before I start using it.
Thanks again, all replies welcomed.
- Rico