From 1c9e305ffcb3dd5fd571817d1a50b276703b621c Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 4 Mar 2021 19:43:58 +0100 Subject: [PATCH] changed name of preprocessor constant to improve readability --- src/libgame/image.h | 2 +- src/libgame/system.c | 8 ++++---- src/tools.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libgame/image.h b/src/libgame/image.h index 8827257b..3d242193 100644 --- a/src/libgame/image.h +++ b/src/libgame/image.h @@ -27,7 +27,7 @@ #define NUM_IMG_BITMAPS 7 // this bitmap pointer points to one of the above bitmaps (do not free it) -#define IMG_BITMAP_GAME 7 +#define IMG_BITMAP_PTR_GAME 7 #define NUM_IMG_BITMAP_POINTERS 8 diff --git a/src/libgame/system.c b/src/libgame/system.c index a2f7ebec..a615b92f 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1251,7 +1251,7 @@ void ReCreateGameTileSizeBitmap(Bitmap **bitmaps) if (gfx.game_tile_size == gfx.standard_tile_size) { - bitmaps[IMG_BITMAP_GAME] = bitmaps[IMG_BITMAP_STANDARD]; + bitmaps[IMG_BITMAP_PTR_GAME] = bitmaps[IMG_BITMAP_STANDARD]; return; } @@ -1263,7 +1263,7 @@ void ReCreateGameTileSizeBitmap(Bitmap **bitmaps) Bitmap *bitmap_new = ZoomBitmap(bitmap, width, height); bitmaps[IMG_BITMAP_CUSTOM] = bitmap_new; - bitmaps[IMG_BITMAP_GAME] = bitmap_new; + bitmaps[IMG_BITMAP_PTR_GAME] = bitmap_new; } static void CreateScaledBitmaps(Bitmap **bitmaps, int zoom_factor, @@ -1413,9 +1413,9 @@ static void CreateScaledBitmaps(Bitmap **bitmaps, int zoom_factor, bitmaps[IMG_BITMAP_CUSTOM] = tmp_bitmap_0; if (bitmaps[IMG_BITMAP_CUSTOM]) - bitmaps[IMG_BITMAP_GAME] = bitmaps[IMG_BITMAP_CUSTOM]; + bitmaps[IMG_BITMAP_PTR_GAME] = bitmaps[IMG_BITMAP_CUSTOM]; else - bitmaps[IMG_BITMAP_GAME] = bitmaps[IMG_BITMAP_STANDARD]; + bitmaps[IMG_BITMAP_PTR_GAME] = bitmaps[IMG_BITMAP_STANDARD]; boolean free_old_bitmap = TRUE; diff --git a/src/tools.c b/src/tools.c index 325f7e1c..38f5dd7b 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1486,7 +1486,7 @@ void getGraphicSourceBitmap(int graphic, int tilesize, Bitmap **bitmap) if (tilesize == gfx.standard_tile_size) *bitmap = g->bitmaps[IMG_BITMAP_STANDARD]; else if (tilesize == game.tile_size) - *bitmap = g->bitmaps[IMG_BITMAP_GAME]; + *bitmap = g->bitmaps[IMG_BITMAP_PTR_GAME]; else *bitmap = g->bitmaps[IMG_BITMAP_1x1 - log_2(tilesize_capped)]; } @@ -1532,7 +1532,7 @@ void getSizedGraphicSourceExt(int graphic, int frame, int tilesize, *g = graphic_info[IMG_CHAR_EXCLAM]; // if no in-game graphics defined, always use standard graphic size - if (g->bitmaps[IMG_BITMAP_GAME] == NULL) + if (g->bitmaps[IMG_BITMAP_PTR_GAME] == NULL) tilesize = TILESIZE; getGraphicSourceBitmap(graphic, tilesize, bitmap); -- 2.34.1