enemy.h -> badguy.h
[supertux.git] / src / gameloop.c
index 2561d03..f8ed6e5 100644 (file)
@@ -31,7 +31,7 @@
 #include "setup.h"
 #include "high_scores.h"
 #include "menu.h"
-#include "enemy.h"
+#include "badguy.h"
 #include "world.h"
 #include "player.h"
 
@@ -251,15 +251,15 @@ void game_event(void)
                     game_pause = 1;
                 }
             }
-          else if (key == SDLK_TAB)
+          else if (key == SDLK_TAB && debug_mode == YES)
             {
               tux_size = !tux_size;
             }
-          else if (key == SDLK_END)
+          else if (key == SDLK_END && debug_mode == YES)
             {
               distros += 50;
             }
-          else if (key == SDLK_SPACE)
+          else if (key == SDLK_SPACE && debug_mode == YES)
             {
               next_level = 1;
             }
@@ -581,10 +581,18 @@ int game_action(void)
 
 
   /* Keep tux in bounds: */
-
   if (tux_x < 0)
     tux_x = 0;
-  else if (tux_x > 320 && scroll_x < ((level_width * 32) - 640))
+    else if (tux_x < 160 && scroll_x > 0 && debug_mode == YES)
+    {
+    scroll_x = scroll_x - ( 160 - tux_x);
+    tux_x = 160;
+    
+    if(scroll_x < 0)
+     scroll_x = 0;
+   
+    }
+    else if (tux_x > 320 && scroll_x < ((level_width * 32) - 640))
     {
       /* Scroll the screen in past center: */