Skip to content

Commit

Permalink
[gtk] ISpriteSheet::getFileName(): Add ATTR_ACCESS_SIZE().
Browse files Browse the repository at this point in the history
  • Loading branch information
GerbilSoft committed Sep 15, 2024
1 parent 43700db commit 074e399
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/gtk/AchSpriteSheet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class AchSpriteSheet : public ISpriteSheet
* @param gray [in] If true, load the grayscale version
* @return 0 on success; non-zero on error.
*/
ATTR_ACCESS_SIZE(write_only, 2, 3)
int getFilename(char *buf, size_t size, int width, int height, bool gray = false) const final;

public:
Expand Down
11 changes: 6 additions & 5 deletions src/gtk/FlagSpriteSheet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ class FlagSpriteSheet : public ISpriteSheet
* @param gray [in] If true, load the grayscale version
* @return 0 on success; non-zero on error.
*/
ATTR_ACCESS_SIZE(write_only, 2, 3)
int getFilename(char *buf, size_t size, int width, int height, bool gray = false) const final;

public:
/**
* Get a flag icon.
* @param lc [in] Language code
* @param forcePAL [in,opt] If true, force PAL regions, e.g. always use the 'gb' flag for English.
* @return Flag icon, or nullptr on error. (caller must free the icon)
*/
* Get a flag icon.
* @param lc [in] Language code
* @param forcePAL [in,opt] If true, force PAL regions, e.g. always use the 'gb' flag for English.
* @return Flag icon, or nullptr on error. (caller must free the icon)
*/
PIMGTYPE getIcon(uint32_t lc, bool forcePAL = false) const;
};
1 change: 1 addition & 0 deletions src/gtk/ISpriteSheet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class NOVTABLE ISpriteSheet
* @param gray [in] If true, load the grayscale version
* @return 0 on success; non-zero on error.
*/
ATTR_ACCESS_SIZE(write_only, 2, 3)
virtual int getFilename(char *buf, size_t size, int width, int height, bool gray = false) const = 0;

/**
Expand Down

0 comments on commit 074e399

Please sign in to comment.