Update all other Magic tools' "set_color()"

FIXME: This loses "ATTRIBUTE_UNUSED" where they existed, and also
all of the files committed here need that compiler hint added to
all of the new arguments ('canvas', 'last', etc.) since they
obviously don't use them either.
This commit is contained in:
Bill Kendrick 2023-01-25 02:15:19 -08:00
parent 34de8311db
commit 3b1c26c93d
54 changed files with 342 additions and 326 deletions

View file

@ -1,8 +1,8 @@
/*
* Strings -- draws string art.
*
* Last modified: 2021-09-21
*/
Strings -- draws string art.
Last updated: January 25, 2023
*/
#include "tp_magic_api.h"
#include "SDL_image.h"
#include "SDL_mixer.h"
@ -60,7 +60,8 @@ void string_drag(magic_api * api, int which, SDL_Surface * canvas,
Uint32 string_api_version(void);
int string_modes(magic_api * api, int which);
void string_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
void string_set_color(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect);
int string_get_tool_count(magic_api * api);
SDL_Surface *string_get_icon(magic_api * api, int which);
char *string_get_name(magic_api * api, int which);
@ -95,8 +96,8 @@ int string_modes(magic_api * api ATTRIBUTE_UNUSED, int which)
return (MODE_PAINT_WITH_PREVIEW);
}
void string_set_color(magic_api * api ATTRIBUTE_UNUSED, Uint8 r, Uint8 g,
Uint8 b)
void string_set_color(magic_api * api, int which, SDL_Surface * canvas,
SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect)
{
string_r = r;
string_g = g;