diff examples/example-sprite/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 cd5bdb995052
children 3638b39ef2bf
line wrap: on
line diff
--- a/examples/example-sprite/main.c	Wed Mar 10 18:49:00 2021 +0100
+++ b/examples/example-sprite/main.c	Wed Mar 10 18:49:08 2021 +0100
@@ -63,11 +63,11 @@
 static void
 init(void)
 {
-	if (!core_init("fr.malikania", "sprite") || !ui_init())
+	if (core_init("fr.malikania", "sprite") < 0 || ui_init() < 0)
 		panic();
-	if (!window_open("Example - Sprite", W, H))
+	if (window_open("Example - Sprite", W, H) < 0)
 		panic();
-	if (!image_open(&texture, PATH("sprites/people.png")))
+	if (image_open(&texture, PATH("sprites/people.png")) < 0)
 		panic();
 
 	sprite_init(&sprite, &texture, 48, 48);
@@ -136,7 +136,7 @@
 
 	changed();
 
-	game_switch(&state, true);
+	game_switch(&state, 1);
 	game_loop();
 }