diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2009-06-19 20:46:53 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2009-06-19 20:46:53 -0400 |
commit | ab18806cddf99514e7ac8d970587e5f1d6d01603 (patch) | |
tree | 51811ba47de36c8911043258f073484e3948c807 /mazeoflife.cpp | |
parent | f2caf2c09fc431e11068c13a49ae28f18182bea9 (diff) | |
download | mazeoflife-ab18806cddf99514e7ac8d970587e5f1d6d01603.tar.gz mazeoflife-ab18806cddf99514e7ac8d970587e5f1d6d01603.tar.bz2 mazeoflife-ab18806cddf99514e7ac8d970587e5f1d6d01603.zip |
Added title screen
Refs #103
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 | } | ||