From: Holger Schemel Date: Fri, 29 Jul 2016 17:20:31 +0000 (+0200) Subject: added helper function for debugging of image handling X-Git-Tag: 4.0.0.0~49 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=53053054cfed93412ff590dd95a180fdd9582f5e;p=rocksndiamonds.git added helper function for debugging of image handling --- diff --git a/src/libgame/image.c b/src/libgame/image.c index 76d9b183..699093b7 100644 --- a/src/libgame/image.c +++ b/src/libgame/image.c @@ -140,6 +140,13 @@ char *getTokenFromImageID(int graphic) return (file_list != NULL ? file_list->token : NULL); } +char *getFilenameFromImageID(int graphic) +{ + struct FileInfo *file_list = getImageListEntryFromImageID(graphic); + + return (file_list != NULL ? file_list->filename : NULL); +} + int getImageIDFromToken(char *token) { struct FileInfo *file_list = image_info->file_list; diff --git a/src/libgame/image.h b/src/libgame/image.h index 76ff3509..25b83ce5 100644 --- a/src/libgame/image.h +++ b/src/libgame/image.h @@ -58,6 +58,7 @@ Bitmap **getBitmapsFromImageID(int); int getOriginalImageWidthFromImageID(int); int getOriginalImageHeightFromImageID(int); char *getTokenFromImageID(int); +char *getFilenameFromImageID(int); int getImageIDFromToken(char *); char *getImageConfigFilename(); int getImageListPropertyMappingSize();