From 61c28b7c1e2f0ee89ba3f36768631dcdb90d2a95 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 4 Mar 2021 21:03:55 +0100 Subject: [PATCH] added some cleanup and comments --- src/libgame/system.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libgame/system.c b/src/libgame/system.c index db9d72b1..12215ef9 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1267,6 +1267,7 @@ void ReCreateGameTileSizeBitmap(Bitmap **bitmaps) if (gfx.game_tile_size == gfx.standard_tile_size) { + // set game bitmap pointer to standard sized bitmap (already existing) bitmaps[IMG_BITMAP_PTR_GAME] = bitmaps[IMG_BITMAP_STANDARD]; return; @@ -1276,10 +1277,10 @@ void ReCreateGameTileSizeBitmap(Bitmap **bitmaps) int width = bitmap->width * gfx.game_tile_size / gfx.standard_tile_size;; int height = bitmap->height * gfx.game_tile_size / gfx.standard_tile_size;; - Bitmap *bitmap_new = ZoomBitmap(bitmap, width, height); + bitmaps[IMG_BITMAP_CUSTOM] = ZoomBitmap(bitmap, width, height); - bitmaps[IMG_BITMAP_CUSTOM] = bitmap_new; - bitmaps[IMG_BITMAP_PTR_GAME] = bitmap_new; + // set game bitmap pointer to custom sized bitmap (newly created) + bitmaps[IMG_BITMAP_PTR_GAME] = bitmaps[IMG_BITMAP_CUSTOM]; } static void CreateScaledBitmaps(Bitmap **bitmaps, int zoom_factor, -- 2.34.1