ball/set: clean up some excessive macro usage
[neverball] / ball / st_fall_out.c
index d715261..7a887c9 100644 (file)
  */
 
 #include "gui.h"
-#include "game.h"
 #include "util.h"
 #include "progress.h"
 #include "audio.h"
 #include "config.h"
+#include "video.h"
 #include "demo.h"
 
+#include "game_common.h"
+#include "game_server.h"
+#include "game_client.h"
+
 #include "st_fall_out.h"
 #include "st_save.h"
 #include "st_over.h"
 #include "st_start.h"
 #include "st_level.h"
 #include "st_shared.h"
+#include "st_play.h"
 
 /*---------------------------------------------------------------------------*/
 
@@ -107,19 +112,17 @@ static int fall_out_enter(void)
     audio_music_fade_out(2.0f);
     /* audio_play(AUD_FALL, 1.0f); */
 
-    config_clr_grab();
+    video_clr_grab();
 
     return id;
 }
 
 static void fall_out_timer(int id, float dt)
 {
-    float g[3] = { 0.0f, -9.8f, 0.0f };
-
     if (time_state() < 2.f)
     {
-        demo_play_step();
-        game_step(g, dt, 0);
+        game_server_step(dt);
+        game_client_step(demo_file());
     }
 
     gui_timer(id, dt);
@@ -130,7 +133,10 @@ static int fall_out_keybd(int c, int d)
     if (d)
     {
         if (config_tst_d(CONFIG_KEY_RESTART, c) && progress_same_avail())
-            return fall_out_action(FALL_OUT_SAME);
+        {
+            if (progress_same())
+                goto_state(&st_play_ready);
+        }
     }
     return 1;
 }