GP32 Gpsmw (gpsupermariowar)


no_skill

gp2x! bananas! mayhem! mayham!
Joined
Jan 9, 2004
Messages
734
Age
38
Location
Austria
Website
72dpiarmy.com
Hi,

after loosing the war against c++ + gp32 i've decided to rewrite SuperMarioWar in plain c.

but i still had problems with the sdk so i decided to not bother with it and write it so it can be ported more than easily.

now i'm looking for someone to build me a gp32 backend (gp32sdk, mrmirko`s, don`t care).

the function prototypes in this header are looking for an implementation:

Code:
#define KEY_A           0
#define KEY_B           1
#define KEY_L           2
#define KEY_R           3
#define KEY_START       4
#define KEY_SELECT      5
#define KEY_UP          6
#define KEY_DOWN        7
#define KEY_LEFT        8
#define KEY_RIGHT       9

#define KEY_LAST        10

extern int keys[KEY_LAST];

#define bool            int
#define true            1
#define false           0


typedef struct {
    int width;
    int height;
    //uint16 *pixels; //whatever...
}sys_gfx_Surface;


void sys_init();                                //inits gfx, sfx, inp etc

void sys_gfx_flipBuffer();                      //flip gfx buffers
sys_gfx_Surface * sys_gfx_load(char *name, bool colorkey);     //load surface
void sys_gfx_draw(sys_gfx_Surface *surface, int x, int y);
void sys_gfx_drawpart(sys_gfx_Surface *surface, int x, int y, int px, int py, int pw, int ph);
void sys_gfx_free(sys_gfx_Surface *surface);

void sys_inp_updateKeys();

int sys_clk_getMs();

you can see what i`ve done so far here:

http://no-skill.kbs-design.net/tmp/gpsmw.zip

i hope someone can help me.

huge thanks in advance,
no_skill
 
i'll give it a try, but i need 16bpp support (unless someone helps me palettize my images (they don`t use more than 256 colors all together)).
 
no_skill posted on Oct 5 2004 at 12:11 PM said:
i'll give it a try, but i need 16bpp support (unless someone helps me palettize my images (they don`t use more than 256 colors all together)).
Give antriad a bell. Maybe he can help you :).
 
Last edited by a moderator:
no_skill posted on Oct 5 2004 at 07:11 AM said:
i'll give it a try, but i need 16bpp support (unless someone helps me palettize my images (they don`t use more than 256 colors all together)).

Yeah, all my functions work in 16-bit. Just save the images as 16-bit. If I did add 8-bit support, it would probably end up being a conversion of the image to 16-bit, so same with 4-bit. Though the memory taken up is larger, working with palettes is a bitch, and we want to get as close to 32-bit as possible for faster rendering anyway.
 
Last edited by a moderator:
generalnmx posted on Oct 5 2004 at 08:08 PM said:
no_skill posted on Oct 5 2004 at 07:11 AM said:
i'll give it a try, but i need 16bpp support (unless someone helps me palettize my images (they don`t use more than 256 colors all together)).

Yeah, all my functions work in 16-bit. Just save the images as 16-bit. If I did add 8-bit support, it would probably end up being a conversion of the image to 16-bit, so same with 4-bit. Though the memory taken up is larger, working with palettes is a bitch, and we want to get as close to 32-bit as possible for faster rendering anyway.

Agreed on the palettes issue. SDL needs a lot of work to make working with paletted colour less insane.
 
Last edited by a moderator:
no_skill posted on Oct 6 2004 at 08:11 AM said:
16bpp? i'll give it a try. is there a small docu somewhere?

Document for what? My code is thoroughly commented and usually has detailed explanations above the function implementation, as well as throughout the code itself.
 
Last edited by a moderator:
no_skill posted on Oct 7 2004 at 01:28 AM said:
i just thouht there might be a sum up of all important functions somewhere.

Ah sorry, I haven't gotten around to doing that yet. Best my code can offer is brief descriptions of functions in the header files, with more detailed descriptions in the implementation.
 
Last edited by a moderator:
uploaded a new version of gpsmw (still windows only).

http://no-skill.kbs-design.net/tmp/gpsmw.zip

changes:
+ fixed collision detection bug
+ some other bugs fixed

i'll finish the c port first before i *try* to integrate a sdk.

help on writing the gp32 layer is still highly appreciated

btw: i forgot to add something to the todos: i use fopen, fread, fclose. this need to be matched to the right gpsdk functions (no fseek needed!)
 
ok man its been like 7-8 days man nobody even posts am i the only person that cares about this game maan common justteach me how to right in c++ i need a mentor cause i already trued the tutorials here and i googled for them and i still cant find andything that will help me learn c++ :(
 
Back
Top