#69178 - Janekxx - Sun Jan 29, 2006 12:38 am
Hi, I'm coding my 3D game for ARM platform (not GBA, but old Sony Jxx phones) and I ecountered first problem I can't solve :)
I have few 3D models to use in scene.
To transform them (rotate, etc.) I pass pointer to array in every function.
Here is the problem:
Can I create array that contain pointers and how?
It's needed because I don't want to write:
do_sth(int *adr_of_model);
... for every model, but I want to use loop like this:
for (a=5; a>0; a--){
tmp = array_of_pointers[a];
do_sth(int *tmp);
}
Is that possible? What are the mistakes in my example?
I'm new in C, sorry for lame question ;)
_________________
sony.int.pl
I have few 3D models to use in scene.
To transform them (rotate, etc.) I pass pointer to array in every function.
Here is the problem:
Can I create array that contain pointers and how?
It's needed because I don't want to write:
do_sth(int *adr_of_model);
... for every model, but I want to use loop like this:
for (a=5; a>0; a--){
tmp = array_of_pointers[a];
do_sth(int *tmp);
}
Is that possible? What are the mistakes in my example?
I'm new in C, sorry for lame question ;)
_________________
sony.int.pl