Mercurial > molko
diff examples/example-animation/main.c @ 263:cd5bdb995052
cmake: create a new libmlk-data library
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 08 Dec 2020 17:00:03 +0100 |
parents | 76afe639fd72 |
children | 196264679079 |
line wrap: on
line diff
--- a/examples/example-animation/main.c Mon Dec 07 23:21:05 2020 +0100 +++ b/examples/example-animation/main.c Tue Dec 08 17:00:03 2020 +0100 @@ -33,10 +33,9 @@ #include <ui/label.h> #include <ui/ui.h> -#include <assets/sprites/numbers.h> - -#define W 1280 -#define H 720 +#define W 1280 +#define H 720 +#define PATH(r) util_pathf("%s/mlk-adventure/%s", sys_dir(SYS_DIR_DATA), r) static struct label label = { .text = "Keys: <Space> start or reset the animation.", @@ -57,7 +56,7 @@ panic(); if (!window_open("Example - Animation", W, H)) panic(); - if (!image_openmem(&numbers, sprites_numbers, sizeof (sprites_numbers))) + if (!image_open(&numbers, PATH("sprites/numbers.png"))) panic(); }