Kaleido-X: update to new plugin API
This commit is contained in:
parent
4a10c56788
commit
b9eb81708a
1 changed files with 23 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
kaleidoscope.
|
kaleidoscope.
|
||||||
Bill Kendrick
|
Bill Kendrick
|
||||||
|
|
||||||
Last updated: March 19, 2023
|
Last updated: April 20, 2023
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -50,7 +50,7 @@ char * kaleidox_descrs[NUM_TOOLS] = {
|
||||||
Mix_Chunk *snd_effects[NUM_TOOLS];
|
Mix_Chunk *snd_effects[NUM_TOOLS];
|
||||||
|
|
||||||
Uint32 kaleidox_api_version(void);
|
Uint32 kaleidox_api_version(void);
|
||||||
int kaleidox_init(magic_api * api);
|
int kaleidox_init(magic_api * api, Uint32 disabled_features);
|
||||||
int kaleidox_get_tool_count(magic_api * api);
|
int kaleidox_get_tool_count(magic_api * api);
|
||||||
SDL_Surface *kaleidox_get_icon(magic_api * api, int which);
|
SDL_Surface *kaleidox_get_icon(magic_api * api, int which);
|
||||||
char *kaleidox_get_name(magic_api * api, int which);
|
char *kaleidox_get_name(magic_api * api, int which);
|
||||||
|
|
@ -77,6 +77,9 @@ void kaleidox_switchin(magic_api * api, int which, int mode,
|
||||||
void kaleidox_switchout(magic_api * api, int which, int mode,
|
void kaleidox_switchout(magic_api * api, int which, int mode,
|
||||||
SDL_Surface * canvas);
|
SDL_Surface * canvas);
|
||||||
int mirror(int n, int max, int flip);
|
int mirror(int n, int max, int flip);
|
||||||
|
Uint8 kaleidox_accepted_sizes(magic_api * api, int which, int mode);
|
||||||
|
Uint8 kaleidox_default_size(magic_api * api, int which, int mode);
|
||||||
|
void kaleidox_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * last, Uint8 size, SDL_Rect * update_rect);
|
||||||
|
|
||||||
|
|
||||||
Uint32 kaleidox_api_version(void)
|
Uint32 kaleidox_api_version(void)
|
||||||
|
|
@ -84,7 +87,7 @@ Uint32 kaleidox_api_version(void)
|
||||||
return (TP_MAGIC_API_VERSION);
|
return (TP_MAGIC_API_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
int kaleidox_init(magic_api * api)
|
int kaleidox_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char fname[1024];
|
char fname[1024];
|
||||||
|
|
@ -323,3 +326,20 @@ void kaleidox_switchout(magic_api * api ATTRIBUTE_UNUSED,
|
||||||
SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
SDL_Surface * canvas ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Uint8 kaleidox_accepted_sizes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
/* I considered having this plugin collapse down to one tool
|
||||||
|
* with multiple sizes, but decided to leave it as three separate
|
||||||
|
* tools -bjk 2023.04.20 */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Uint8 kaleidox_default_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void kaleidox_set_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED, SDL_Surface * canvas ATTRIBUTE_UNUSED, SDL_Surface * last ATTRIBUTE_UNUSED, Uint8 size ATTRIBUTE_UNUSED, SDL_Rect * update_rect ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue