Mercurial > molko
comparison examples/example-trace/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 | 76afe639fd72 |
children | 3638b39ef2bf |
comparison
equal
deleted
inserted
replaced
297:6151152d009c | 298:196264679079 |
---|---|
36 #define H 720 | 36 #define H 720 |
37 | 37 |
38 static void | 38 static void |
39 init(void) | 39 init(void) |
40 { | 40 { |
41 if (!core_init("fr.malikania", "trace") || !ui_init()) | 41 if (core_init("fr.malikania", "trace") < 0 || ui_init() < 0) |
42 panic(); | 42 panic(); |
43 if (!window_open("Example - Trace", W, H)) | 43 if (window_open("Example - Trace", W, H) < 0) |
44 panic(); | 44 panic(); |
45 | 45 |
46 trace_handler = trace_hud_handler; | 46 trace_handler = trace_hud_handler; |
47 } | 47 } |
48 | 48 |
99 .handle = handle, | 99 .handle = handle, |
100 .update = update, | 100 .update = update, |
101 .draw = draw | 101 .draw = draw |
102 }; | 102 }; |
103 | 103 |
104 game_switch(&state, true); | 104 game_switch(&state, 1); |
105 game_loop(); | 105 game_loop(); |
106 } | 106 } |
107 | 107 |
108 static void | 108 static void |
109 quit(void) | 109 quit(void) |