Mercurial > molko
diff examples/example-drawable/main.c @ 364:570ab19bf268
misc: start removing adventure from library
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 24 Oct 2021 11:29:04 +0200 |
parents | cd8b87ddd1e7 |
children | 19782ea1cf4a |
line wrap: on
line diff
--- a/examples/example-drawable/main.c Sun Oct 24 09:55:12 2021 +0200 +++ b/examples/example-drawable/main.c Sun Oct 24 11:29:04 2021 +0200 @@ -40,9 +40,10 @@ #include <ui/theme.h> #include <ui/ui.h> +#include <assets/sprites/explosion.h> + #define W 1280 #define H 720 -#define PATH(r) util_pathf("%s/%s", sys_dir(SYS_DIR_DATA), r) static struct label help = { .x = 10, @@ -76,7 +77,7 @@ panic(); /* 0: Explosion animation. */ - if (image_open(&explosion_tex, PATH("sprites/explosion.png")) < 0) + if (image_openmem(&explosion_tex, assets_sprites_explosion, sizeof (assets_sprites_explosion)) < 0) panic(); sprite_init(&explosion_sprite, &explosion_tex, 256, 256);