Googlyeyes: Different icon for small variation

h/t Pere
This commit is contained in:
Bill Kendrick 2023-02-11 21:33:57 -08:00
parent 03c57cc721
commit 2066dc453e
2 changed files with 8 additions and 4 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

View file

@ -3,7 +3,7 @@
Draws a googly eye at the click position, and looks
towards where you drag+release.
Last updated: January 25, 2023
Last updated: February 11, 2023
*/
#include <stdio.h>
@ -21,6 +21,10 @@ char * size_names[NUM_SIZES] = {
gettext_noop("large googly eye"),
gettext_noop("small googly eye")
};
char * img_filenames[NUM_SIZES] = {
"googlyeyes.png",
"googlyeyes-sm.png"
};
Mix_Chunk *snd_effect = NULL;
SDL_Surface * googlyeyes_img_bkgd[NUM_SIZES];
@ -145,12 +149,12 @@ int googlyeyes_get_tool_count(magic_api * api ATTRIBUTE_UNUSED)
}
SDL_Surface *googlyeyes_get_icon(magic_api * api, int which ATTRIBUTE_UNUSED)
SDL_Surface *googlyeyes_get_icon(magic_api * api, int which)
{
char fname[1024];
snprintf(fname, sizeof(fname), "%simages/magic/googlyeyes.png",
api->data_directory);
snprintf(fname, sizeof(fname), "%simages/magic/%s",
api->data_directory, img_filenames[which]);
return (IMG_Load(fname));
}