gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Not good at C - what do I put here?

#114536 - NeX - Mon Jan 08, 2007 9:17 pm

Ok, a simple function to transfer sprite data to the hardware. This works in C; Why not C++?
Code:

dmaCopy(&characters_raw[((inputcha*16)+frame)*1024], &SPRITE_GFX[targetcha*512],1024);

The main reason I'm using C++ is structs don't seem to function in C.

#114541 - Dwedit - Mon Jan 08, 2007 9:53 pm

How to do structs in C:

typedef struct
{
int a;
int b;
} blah;
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#114542 - Sausage Boy - Mon Jan 08, 2007 9:53 pm

The error message would probably be helpful for someone trying to solve your problem. Also, were you putting functions in your structs in C?
_________________
"no offense, but this is the gayest game ever"