Mercurial > molko
diff examples/example-battle/main.c @ 298:196264679079
misc: remove usage of bool
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 10 Mar 2021 18:49:08 +0100 |
parents | 5d8700074dd7 |
children | 3638b39ef2bf |
line wrap: on
line diff
--- a/examples/example-battle/main.c Wed Mar 10 18:49:00 2021 +0100 +++ b/examples/example-battle/main.c Wed Mar 10 18:49:08 2021 +0100 @@ -143,9 +143,9 @@ static void init(void) { - if (!core_init("fr.malikania", "battle") || !ui_init() || !rpg_init()) + if (core_init("fr.malikania", "battle") < 0 || ui_init() < 0 || rpg_init() < 0) panic(); - if (!window_open("Example - Battle", W, H)) + if (window_open("Example - Battle", W, H) < 0) panic(); registry_init(); @@ -182,7 +182,7 @@ battle_start(bt); fight_state.data = bt; - game_switch(&fight_state, false); + game_switch(&fight_state, 0); } @@ -239,7 +239,7 @@ struct battle *bt = st->data; if (battle_update(bt, ticks)) - game_switch(&empty_state, false); + game_switch(&empty_state, 0); } static void @@ -268,7 +268,7 @@ static void run(void) { - game_switch(&empty_state, true); + game_switch(&empty_state, 1); game_loop(); }