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.

C/C++ > getting more than one 3D box to draw HELP!!

#107533 - shadowghost21 - Mon Oct 30, 2006 4:56 pm

First Off I am programming in C and using the PAlib for the nds. The PAlib Forums are down right now so I post here. I am trying to make more than one 3d box draw to the screen when when the stylus touches the screen in a certian place. I want it to draw a new box and then beable to draw another one. It might be a whole lot eaiser in C++ as I could make a class and blah blah, well at least I think so, anyway I need help in C!!

-shadow

#107806 - Ant6n - Thu Nov 02, 2006 5:29 am

you want a class-equivalent in C?
how about structs as holder for attributes, and functions as methods. all functions take a pointer to your struct as first argument.

i.e.
typedef struct{
s32 x,y
} vector;


vector_getx(vector *pvector);
vector_setx(vector *pvector,s32 newx);


anton

#107899 - shadowghost21 - Thu Nov 02, 2006 11:39 pm

i got it figured out thanks for the reply though.

-shadow