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:
parent
34de8311db
commit
3b1c26c93d
54 changed files with 342 additions and 326 deletions
|
|
@ -1,9 +1,9 @@
|
|||
/* lightning.c
|
||||
|
||||
Draws a lightning strike between the click
|
||||
and drag+release positions.
|
||||
Draws a lightning strike between the click
|
||||
and drag+release positions.
|
||||
|
||||
Last modified: 2021.11.07
|
||||
Last updated: January 25, 2023
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -33,7 +33,8 @@ void lightning_shutdown(magic_api * api);
|
|||
void lightning_click(magic_api * api, int which, int mode,
|
||||
SDL_Surface * canvas, SDL_Surface * snapshot, int x,
|
||||
int y, SDL_Rect * update_rect);
|
||||
void lightning_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b);
|
||||
void lightning_set_color(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect);
|
||||
void lightning_drag(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * snapshot, int ox, int oy, int x, int y,
|
||||
SDL_Rect * update_rect);
|
||||
|
|
@ -300,7 +301,8 @@ void lightning_draw_bolt(void *ptr, SDL_Surface * canvas,
|
|||
}
|
||||
|
||||
|
||||
void lightning_set_color(magic_api * api, Uint8 r, Uint8 g, Uint8 b)
|
||||
void lightning_set_color(magic_api * api, int which, SDL_Surface * canvas,
|
||||
SDL_Surface * last, Uint8 r, Uint8 g, Uint8 b, SDL_Rect * update_rect)
|
||||
{
|
||||
api->rgbtohsv(r, g, b, &lightning_h, &lightning_s, &lightning_v);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue