changed name of preprocessor constant to improve readability
authorHolger Schemel <info@artsoft.org>
Thu, 4 Mar 2021 18:43:58 +0000 (19:43 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 4 Mar 2021 18:44:11 +0000 (19:44 +0100)
src/libgame/image.h
src/libgame/system.c
src/tools.c

index 8827257b791d27deb2154737a81b3abf8540e450..3d2421934465f4e1790628538607925667b65add 100644 (file)
@@ -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
 
index a2f7ebeccd7d199716400db3fbeb14363f8fdbb4..a615b92fcefbe1c8f974fae1bcd8bdbe5b1f778e 100644 (file)
@@ -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;
 
index 325f7e1c323f336a0d2de27bd74c5e637a398f1b..38f5dd7bad62e7b5e731ed006a71ad9fc2ef4af1 100644 (file)
@@ -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);