ConsoleTom
Member
Hi !
I have a struct
struct LMap
{
unsigned short nTile;
unsigned short nState;
}
then i define a variable
struct LMap sLevel1Map[32][32];
and i would like to create a subroutine:
void PlayLevel( :angry: :angry: :angry: )
Now, how do i pass my sLevel1Map to the subroutine. Using pointers, but how ? I tried around but got error-messages about incompatible pointers or the passed data was wrong.
I would like to know,
- how to call the routine [ PlayLevel (&sLevel1Map) ]
- how the variable is declared in the sub [ void PlayLevel(struct LMap * PlayLevel) ]
Please help me soon. I can't continue coding my game !!!
Greetings
Tobias
I have a struct
struct LMap
{
unsigned short nTile;
unsigned short nState;
}
then i define a variable
struct LMap sLevel1Map[32][32];
and i would like to create a subroutine:
void PlayLevel( :angry: :angry: :angry: )
Now, how do i pass my sLevel1Map to the subroutine. Using pointers, but how ? I tried around but got error-messages about incompatible pointers or the passed data was wrong.
I would like to know,
- how to call the routine [ PlayLevel (&sLevel1Map) ]
- how the variable is declared in the sub [ void PlayLevel(struct LMap * PlayLevel) ]
Please help me soon. I can't continue coding my game !!!
Greetings
Tobias