Mercurial > molko
comparison examples/example-debug/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 static int mouse_y; | 36 static int mouse_y; |
37 | 37 |
38 static void | 38 static void |
39 init(void) | 39 init(void) |
40 { | 40 { |
41 if (!core_init("fr.malikania", "debug") || !ui_init()) | 41 if (core_init("fr.malikania", "debug") < 0 || ui_init() < 0) |
42 panic(); | 42 panic(); |
43 if (!window_open("Example - Debug", W, H)) | 43 if (window_open("Example - Debug", W, H) < 0) |
44 panic(); | 44 panic(); |
45 | 45 |
46 debug_options.enable = true; | 46 debug_options.enable = 1; |
47 } | 47 } |
48 | 48 |
49 static void | 49 static void |
50 handle(struct state *st, const union event *ev) | 50 handle(struct state *st, const union event *ev) |
51 { | 51 { |
84 struct state state = { | 84 struct state state = { |
85 .handle = handle, | 85 .handle = handle, |
86 .draw = draw | 86 .draw = draw |
87 }; | 87 }; |
88 | 88 |
89 game_switch(&state, true); | 89 game_switch(&state, 1); |
90 game_loop(); | 90 game_loop(); |
91 } | 91 } |
92 | 92 |
93 static void | 93 static void |
94 quit(void) | 94 quit(void) |