]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
level loader
authorLockedLunatic <locked.lunatic@aon.at>
Tue, 28 Jun 2016 05:34:58 +0000 (07:34 +0200)
committerLockedLunatic <locked.lunatic@aon.at>
Tue, 28 Jun 2016 05:34:58 +0000 (07:34 +0200)
Weave/main.cpp

index 25cfdd0a8feef4ef78519553b7722abe5daf171d..7a19976f2297a59572fc39eb7680fa51b269ef1b 100644 (file)
@@ -60,18 +60,22 @@ int main(int argc, char *argv[])
                        Stage spiel1(level);
 
                        spiel1.play();
-
-                       Events::halt = false;
-                       Message::info("Press ESC to quit or R for a new Game.");
-
                }
                Events::processEvents();
                if (Events::halt == 1)
+               {
+                       Message::info("Press ESC to quit or R for a new Game.");
+                       if (Events::isKHeld(SDLK_r))
+                               play = true;
+
                        break;
+               }
                if (Events::halt == 2)
-                       level = 2;
-               if (Events::isKHeld(SDLK_r))
+               {
+                       level++;
+                       Events::halt = false;
                        play = true;
+               }
 
        }