mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 10:09:43 +01:00
Move gameScreen off of the stack and onto the heap
Just so it can be properly used globally like all the other classes.
This commit is contained in:
parent
60a2e100fc
commit
30bcc08bec
3 changed files with 5 additions and 4 deletions
|
@ -17,7 +17,7 @@ extern "C"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Screen::Screen()
|
void Screen::init()
|
||||||
{
|
{
|
||||||
m_window = NULL;
|
m_window = NULL;
|
||||||
m_renderer = NULL;
|
m_renderer = NULL;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
class Screen
|
class Screen
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Screen();
|
void init();
|
||||||
|
|
||||||
void ResizeScreen(int x, int y);
|
void ResizeScreen(int x, int y);
|
||||||
void GetWindowSize(int* x, int* y);
|
void GetWindowSize(int* x, int* y);
|
||||||
|
@ -33,6 +33,6 @@ public:
|
||||||
SDL_Rect filterSubrect;
|
SDL_Rect filterSubrect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern Screen gameScreen;
|
||||||
|
|
||||||
#endif /* SCREEN_H */
|
#endif /* SCREEN_H */
|
||||||
|
|
|
@ -43,6 +43,7 @@ Game game;
|
||||||
KeyPoll key;
|
KeyPoll key;
|
||||||
mapclass map;
|
mapclass map;
|
||||||
entityclass obj;
|
entityclass obj;
|
||||||
|
Screen gameScreen;
|
||||||
|
|
||||||
bool startinplaytest = false;
|
bool startinplaytest = false;
|
||||||
bool savefileplaytest = false;
|
bool savefileplaytest = false;
|
||||||
|
@ -121,7 +122,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
NETWORK_init();
|
NETWORK_init();
|
||||||
|
|
||||||
Screen gameScreen;
|
gameScreen.init();
|
||||||
|
|
||||||
printf("\t\t\n");
|
printf("\t\t\n");
|
||||||
printf("\t\t\n");
|
printf("\t\t\n");
|
||||||
|
|
Loading…
Reference in a new issue