summary refs log tree commit diff stats
path: root/mazeoflife.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 20:46:53 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2009-06-19 20:46:53 -0400
commitab18806cddf99514e7ac8d970587e5f1d6d01603 (patch)
tree51811ba47de36c8911043258f073484e3948c807 /mazeoflife.cpp
parentf2caf2c09fc431e11068c13a49ae28f18182bea9 (diff)
downloadmazeoflife-ab18806cddf99514e7ac8d970587e5f1d6d01603.tar.gz
mazeoflife-ab18806cddf99514e7ac8d970587e5f1d6d01603.tar.bz2
mazeoflife-ab18806cddf99514e7ac8d970587e5f1d6d01603.zip
Added title screen
Refs #103
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}