diff --git a/Makefile b/Makefile index 4a7001c88..eaa210d07 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ VER_VERSION=0.9.18 VER_DATE=`date +"%Y-%m-%d"` -MAGIC_API_VERSION=0x00000001 +include magic/Makefile-apiversion # Where to install things: diff --git a/magic/Makefile b/magic/Makefile index 714584888..6d381aa3e 100644 --- a/magic/Makefile +++ b/magic/Makefile @@ -5,6 +5,8 @@ # part of Tux Paint base, so "install-plugin-dev" probably hasn't # been run yet; hence "-I../src/" to find 'tp_magic_api.h') +include Makefile-apiversion + SO_TYPE=so TP_MAGIC_CFLAGS=$(shell sdl-config --cflags) \ diff --git a/magic/Makefile-apiversion b/magic/Makefile-apiversion new file mode 100644 index 000000000..22634164e --- /dev/null +++ b/magic/Makefile-apiversion @@ -0,0 +1 @@ +MAGIC_API_VERSION=0x00000001 diff --git a/magic/src/rainbow.c b/magic/src/rainbow.c index 8e34e4026..10071f656 100644 --- a/magic/src/rainbow.c +++ b/magic/src/rainbow.c @@ -88,8 +88,9 @@ char * rainbow_get_description(magic_api * api, int which) // Do the effect: -void do_example(void * ptr, int which, SDL_Surface * canvas, SDL_Surface * last, - int x, int y) +void rainbow_linecb(void * ptr, int which, + SDL_Surface * canvas, SDL_Surface * last, + int x, int y) { magic_api * api = (magic_api *) ptr; int xx, yy; @@ -116,7 +117,7 @@ void rainbow_drag(magic_api * api, int which, SDL_Surface * canvas, rainbow_hexes[rainbow_color][1], rainbow_hexes[rainbow_color][2]); - api->line(which, canvas, last, ox, oy, x, y, 1, do_example); + api->line(which, canvas, last, ox, oy, x, y, 1, rainbow_linecb); api->playsound(rainbow_snd, (x * 255) / canvas->w, 255); }