diff examples/example-battle/main.c @ 300:3638b39ef2bf

examples: fix with new game_push function
author David Demelier <markand@malikania.fr>
date Sun, 11 Apr 2021 17:43:57 +0200
parents 196264679079
children d01e83210ca2
line wrap: on
line diff
--- a/examples/example-battle/main.c	Sun Apr 11 16:41:34 2021 +0200
+++ b/examples/example-battle/main.c	Sun Apr 11 17:43:57 2021 +0200
@@ -182,7 +182,7 @@
 	battle_start(bt);
 
 	fight_state.data = bt;
-	game_switch(&fight_state, 0);
+	game_push(&fight_state);
 }
 
 
@@ -239,7 +239,7 @@
 	struct battle *bt = st->data;
 
 	if (battle_update(bt, ticks))
-		game_switch(&empty_state, 0);
+		game_push(&empty_state);
 }
 
 static void
@@ -268,7 +268,7 @@
 static void
 run(void)
 {
-	game_switch(&empty_state, 1);
+	game_push(&empty_state);
 	game_loop();
 }