summary refs log tree commit diff stats
path: root/mazeoflife.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mazeoflife.cpp')
-rw-r--r--mazeoflife.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/mazeoflife.cpp b/mazeoflife.cpp index 7819ffd..ad1fda3 100644 --- a/mazeoflife.cpp +++ b/mazeoflife.cpp
@@ -2,6 +2,7 @@
2 2
3SDL_Surface *screen; 3SDL_Surface *screen;
4bool gameSleep = false; 4bool gameSleep = false;
5State* state = new DummyState();
5 6
6int main(int argc, char *argv[]) 7int main(int argc, char *argv[])
7{ 8{
@@ -30,7 +31,7 @@ int main(int argc, char *argv[])
30 31
31 SDL_EnableKeyRepeat(100, 50); 32 SDL_EnableKeyRepeat(100, 50);
32 33
33 State* state = new GameState(); 34 state = new TitleState();
34 35
35 SDL_Event anEvent; 36 SDL_Event anEvent;
36 for (;;) 37 for (;;)
@@ -88,3 +89,8 @@ Uint32 getColor(int r, int g, int b)
88{ 89{
89 return SDL_MapRGB(screen->format, r, g, b); 90 return SDL_MapRGB(screen->format, r, g, b);
90} 91}
92
93void changeState(State* nState)
94{
95 state = nState;
96}