hi all
i'm doing a game now by the name of galatea for my APCG coursework and i'm kinda stuck in rendering the moving ground terrain part. The game is composed of three major parts namely
GameInit
GameMain
GameShutDown
I created 200 buildings in the game init part and have stored all the attribs in a struct data type. Problem is i can't access the struct draw() functions from GameMain where it is the part that game runs like kinda looping 50 times in a sec i think. I think I throughly settled the mechanics part but its only the problem accesing. It seems my struct needs to be global or somethin but i dunno how.
My declarations can be seen above. The 'structure' struct as some of u might already know, is unrecognised in Game MAin. Please do not ask me to revert to classes cos my instruction guide says use the struct. Then again, how do u create 200 instances of the building just like i have done with struct, if u can teach me i would be most happy. Thanks n have a nice day ppl
Nick
Code:
Code:
struct Building{ double xcoordinate; double ycoordinate; double wide; double height; RECT destRect1, sourceRect1; int type; void draw(); ]; Building structure [200];