Magic tools: Inline->static for android, corrected paths to avoid double slash which makes SDL2 not loading the stuff from assets.

Thoose changes were already in the SDL2 and android versions, they were reverted somehow...
This commit is contained in:
Pere Pujal i Carabantes 2018-02-28 00:23:15 +01:00
parent f08982ad1f
commit f836cc775a
47 changed files with 144 additions and 124 deletions

View file

@ -7,6 +7,10 @@
#define CONFETTI_BRUSH_SIZE 8 //radius of each confetti circle
#define CONFETTI_QUANTITY 3 //how many circles will be created every click?
#ifdef __ANDROID__
#define inline static
#endif
struct confetti_rgb
{
Uint8 r, g, b;
@ -58,7 +62,7 @@ int confetti_init(magic_api * api)
{
char fname[1024];
snprintf(fname, sizeof(fname), "%s/sounds/magic/confetti.ogg", api->data_directory);
snprintf(fname, sizeof(fname), "%ssounds/magic/confetti.ogg", api->data_directory);
confetti_snd = Mix_LoadWAV(fname);
return (1);
@ -73,7 +77,7 @@ SDL_Surface *confetti_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
{
char fname[1024];
snprintf(fname, sizeof(fname), "%s/images/magic/confetti.png", api->data_directory);
snprintf(fname, sizeof(fname), "%simages/magic/confetti.png", api->data_directory);
return (IMG_Load(fname));
}