summary refs log tree commit diff stats
path: root/htpstate.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2009-10-18 15:24:07 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2009-10-18 15:24:07 -0400
commitc027f1b9cd6c9deb60931a7f9f75bb4ee130291b (patch)
tree49426a9cf3ee24434141c903b01481110b2808b6 /htpstate.cpp
parenta157cd82a86390f1fcb1a2086f86af5187e85a69 (diff)
downloadmazeoflife-c027f1b9cd6c9deb60931a7f9f75bb4ee130291b.tar.gz
mazeoflife-c027f1b9cd6c9deb60931a7f9f75bb4ee130291b.tar.bz2
mazeoflife-c027f1b9cd6c9deb60931a7f9f75bb4ee130291b.zip
Added local highscore list
You can now view and add to a local highscore list.

A change to State was necessary due to how the user's name would be entered into the highscore list and thus all states have been modified.

Refs #104
Diffstat (limited to 'htpstate.cpp')
-rw-r--r--htpstate.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/htpstate.cpp b/htpstate.cpp index 711dca4..da4b6a2 100644 --- a/htpstate.cpp +++ b/htpstate.cpp
@@ -12,15 +12,15 @@ HowToPlayState::HowToPlayState()
12 SDL_WM_SetCaption("Maze Of Life - How To Play", NULL); 12 SDL_WM_SetCaption("Maze Of Life - How To Play", NULL);
13} 13}
14 14
15void HowToPlayState::input(SDLKey key) 15void HowToPlayState::input(SDL_keysym key)
16{ 16{
17 if ((key == SDLK_LEFT) && (selection != 0)) 17 if ((key.sym == SDLK_LEFT) && (selection != 0))
18 { 18 {
19 selection--; 19 selection--;
20 } else if ((key == SDLK_RIGHT) && (selection != 1)) 20 } else if ((key.sym == SDLK_RIGHT) && (selection != 1))
21 { 21 {
22 selection++; 22 selection++;
23 } else if (key == SDLK_RETURN) 23 } else if (key.sym == SDLK_RETURN)
24 { 24 {
25 switch (selection) 25 switch (selection)
26 { 26 {