Mercurial > molko
comparison examples/example-sprite/example-sprite.c @ 485:3ff1fe64d0cd
core: window -> mlk_window
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 28 Feb 2023 08:40:35 +0100 |
parents | ca30ff96bbe0 |
children | d6757c30658e |
comparison
equal
deleted
inserted
replaced
484:f14b8290b3ce | 485:3ff1fe64d0cd |
---|---|
65 static void | 65 static void |
66 init(void) | 66 init(void) |
67 { | 67 { |
68 if (mlk_core_init("fr.malikania", "example-sprite") < 0 || ui_init() < 0) | 68 if (mlk_core_init("fr.malikania", "example-sprite") < 0 || ui_init() < 0) |
69 mlk_panic(); | 69 mlk_panic(); |
70 if (window_open("Example - Sprite", W, H) < 0) | 70 if (mlk_window_open("Example - Sprite", W, H) < 0) |
71 mlk_panic(); | 71 mlk_panic(); |
72 if (mlk_image_openmem(&texture, assets_sprites_people, sizeof (assets_sprites_people)) < 0) | 72 if (mlk_image_openmem(&texture, assets_sprites_people, sizeof (assets_sprites_people)) < 0) |
73 mlk_panic(); | 73 mlk_panic(); |
74 | 74 |
75 mlk_sprite_init(&sprite, &texture, 48, 48); | 75 mlk_sprite_init(&sprite, &texture, 48, 48); |
145 | 145 |
146 static void | 146 static void |
147 quit(void) | 147 quit(void) |
148 { | 148 { |
149 mlk_texture_finish(&texture); | 149 mlk_texture_finish(&texture); |
150 window_finish(); | 150 mlk_window_finish(); |
151 ui_finish(); | 151 ui_finish(); |
152 mlk_core_finish(); | 152 mlk_core_finish(); |
153 } | 153 } |
154 | 154 |
155 int | 155 int |