From 4d22a44a5d4b83e763bd298b9c4151ef0cc2d048 Mon Sep 17 00:00:00 2001 From: pogokeen Date: Wed, 7 Aug 2019 16:19:03 +0000 Subject: [PATCH] tiles.cpp: backup & restore picsiz, walock, & waloff alongside other per tile arrays in artClearMapArt() and artSetupMapArt() This fixes an issue with viewscreens as tiles that are setup game-side after a map is loaded could have their sizes reset to 0 while not being properly cleared from walock/waloff git-svn-id: https://svn.eduke32.com/eduke32@7892 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/tiles.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/build/src/tiles.cpp b/source/build/src/tiles.cpp index 80c34f594..607871ff0 100644 --- a/source/build/src/tiles.cpp +++ b/source/build/src/tiles.cpp @@ -31,6 +31,9 @@ static int32_t tilefileoffs[MAXTILES]; static uint8_t *g_bakTileFileNum; static int32_t *g_bakTileFileOffs; static vec2_16_t *g_bakTileSiz; +static char *g_bakPicSiz; +static char *g_bakWalock; +static intptr_t *g_bakWaloff; static picanm_t *g_bakPicAnm; static char * g_bakFakeTile; static char ** g_bakFakeTileData; @@ -109,6 +112,9 @@ void artClearMapArt(void) RESTORE_MAPART_ARRAY(tilefilenum, g_bakTileFileNum); RESTORE_MAPART_ARRAY(tilefileoffs, g_bakTileFileOffs); RESTORE_MAPART_ARRAY(tilesiz, g_bakTileSiz); + RESTORE_MAPART_ARRAY(picsiz, g_bakPicSiz); + RESTORE_MAPART_ARRAY(walock, g_bakWalock); + RESTORE_MAPART_ARRAY(waloff, g_bakWaloff); RESTORE_MAPART_ARRAY(picanm, g_bakPicAnm); RESTORE_MAPART_ARRAY(faketile, g_bakFakeTile); @@ -159,6 +165,9 @@ void artSetupMapArt(const char *filename) ALLOC_MAPART_ARRAY(tilefilenum, g_bakTileFileNum); ALLOC_MAPART_ARRAY(tilefileoffs, g_bakTileFileOffs); ALLOC_MAPART_ARRAY(tilesiz, g_bakTileSiz); + ALLOC_MAPART_ARRAY(picsiz, g_bakPicSiz); + ALLOC_MAPART_ARRAY(walock, g_bakWalock); + ALLOC_MAPART_ARRAY(waloff, g_bakWaloff); ALLOC_MAPART_ARRAY(picanm, g_bakPicAnm); ALLOC_MAPART_ARRAY(faketile, g_bakFakeTile); ALLOC_MAPART_ARRAY(faketiledata, g_bakFakeTileData);