Hey all (i also posted this in 'general devolper' but it seems more appropriate here),
I use pocketfrog to devolp a game but I have a small problem. I want to acces some variables from my Game object with a function from a Sprite Class. I thought the variables in main are globals, so that you can use them in all classes.
Still if I do this in my Sprite class:
I get a 'game' : undeclared identifier.
This is my WinMain
Can someone spell thuis out for me? I'm pretty new to all this so please explain in detail if you can (not like: "you need a pointer)".
I use pocketfrog to devolp a game but I have a small problem. I want to acces some variables from my Game object with a function from a Sprite Class. I thought the variables in main are globals, so that you can use them in all classes.
Still if I do this in my Sprite class:
- Code:
Movepoints = game.map[Xpos-10/50][Ypos-10/50].movement;
I get a 'game' : undeclared identifier.
This is my WinMain
- Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int) {
HekkusSample game;
_Module.Init(0, hInstance);
game.Run();
return 0;
}
Can someone spell thuis out for me? I'm pretty new to all this so please explain in detail if you can (not like: "you need a pointer)".