diff options
Diffstat (limited to 'mazeoflife.cpp')
-rw-r--r-- | mazeoflife.cpp | 8 |
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 | ||
3 | SDL_Surface *screen; | 3 | SDL_Surface *screen; |
4 | bool gameSleep = false; | 4 | bool gameSleep = false; |
5 | State* state = new DummyState(); | ||
5 | 6 | ||
6 | int main(int argc, char *argv[]) | 7 | int 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 | |||
93 | void changeState(State* nState) | ||
94 | { | ||
95 | state = nState; | ||
96 | } | ||