Glass tile: Update to new plugin API
Note - We should support sizes, but I don't feel like unraveling the code at this time. ;-(
This commit is contained in:
parent
7a284d27ff
commit
3fe943c831
1 changed files with 26 additions and 3 deletions
|
|
@ -23,7 +23,10 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
Last updated: February 12, 2023
|
||||
Last updated: April 22, 2023
|
||||
|
||||
TODO:
|
||||
* Support sizing options
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -39,7 +42,7 @@ static Mix_Chunk *glasstile_snd;
|
|||
|
||||
// Prototypes
|
||||
Uint32 glasstile_api_version(void);
|
||||
int glasstile_init(magic_api * api);
|
||||
int glasstile_init(magic_api * api, Uint32 disabled_features);
|
||||
int glasstile_get_tool_count(magic_api * api);
|
||||
SDL_Surface *glasstile_get_icon(magic_api * api, int which);
|
||||
char *glasstile_get_name(magic_api * api, int which);
|
||||
|
|
@ -65,6 +68,10 @@ void glasstile_switchin(magic_api * api, int which, int mode,
|
|||
void glasstile_switchout(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas);
|
||||
int glasstile_modes(magic_api * api, int which);
|
||||
Uint8 glasstile_accepted_sizes(magic_api * api, int which, int mode);
|
||||
Uint8 glasstile_default_size(magic_api * api, int which, int mode);
|
||||
void glasstile_set_size(magic_api * api, int which, int mode, SDL_Surface * canvas, SDL_Surface * last, Uint8 size, SDL_Rect * update_rect);
|
||||
|
||||
|
||||
Uint32 glasstile_api_version(void)
|
||||
{
|
||||
|
|
@ -76,7 +83,7 @@ static int glasstile_hit_xsize;
|
|||
static int glasstile_hit_ysize;
|
||||
|
||||
// No setup required:
|
||||
int glasstile_init(magic_api * api)
|
||||
int glasstile_init(magic_api * api, Uint32 disabled_features ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char fname[1024];
|
||||
|
||||
|
|
@ -359,3 +366,19 @@ int glasstile_modes(magic_api * api ATTRIBUTE_UNUSED,
|
|||
{
|
||||
return (MODE_PAINT | MODE_FULLSCREEN);
|
||||
}
|
||||
|
||||
|
||||
Uint8 glasstile_accepted_sizes(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* TODO - We should support sizing! -bjk 2023.04.22 */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Uint8 glasstile_default_size(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED, int mode ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void glasstile_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