Googlyeyes: Different icon for small variation
h/t Pere
This commit is contained in:
parent
03c57cc721
commit
2066dc453e
2 changed files with 8 additions and 4 deletions
BIN
magic/icons/googlyeyes-sm.png
Normal file
BIN
magic/icons/googlyeyes-sm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6 KiB |
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue