JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
make space key pause too
authorJason Woofenden <jason@jasonwoof.com>
Sat, 19 Feb 2011 03:25:44 +0000 (22:25 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Sat, 19 Feb 2011 03:25:44 +0000 (22:25 -0500)
main.c

diff --git a/main.c b/main.c
index ae54912..d696ade 100644 (file)
--- a/main.c
+++ b/main.c
@@ -732,6 +732,12 @@ gameloop() {
                                                                        SDL_SaveBMP(surf_screen, screenshot_filename);
                                                                }
                                                                break;
+                                                       case SDLK_SPACE:
+                                                               if(state != GAMEPLAY && state != DEAD_PAUSE) {
+                                                                       // don't conflict with space key to start a new game
+                                                                       break;
+                                                               }
+                                                               // else fall through
                                                        case SDLK_p:
                                                        case SDLK_PAUSE:
                                                                paused = !paused;