From aa58b152ab4c722d5ef55af699dc144d36b57778 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 6 Dec 2022 22:30:52 +0100 Subject: [PATCH] - use a TArray in BuildTiles for the tile descriptors. For some reason MSVC wants to put this in the EXE now and the array is quite large. --- source/common/utility/tarray.h | 2 +- source/core/textures/buildtiles.cpp | 5 ++--- source/core/textures/buildtiles.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/source/common/utility/tarray.h b/source/common/utility/tarray.h index a7decd4f3..61dc5e12c 100644 --- a/source/common/utility/tarray.h +++ b/source/common/utility/tarray.h @@ -213,7 +213,7 @@ public: { } //////// - TArray () + constexpr TArray () { Most = 0; Count = 0; diff --git a/source/core/textures/buildtiles.cpp b/source/core/textures/buildtiles.cpp index 9e219a8d0..3edf86661 100644 --- a/source/core/textures/buildtiles.cpp +++ b/source/core/textures/buildtiles.cpp @@ -225,13 +225,12 @@ static FGameTexture* GetTileTexture(const char* name, const TArray& bac void BuildTiles::Init() { Placeholder = TexMan.GameByIndex(0); + tiledata.Resize(MAXTILES); + memset(tiledata.Data(), 0, sizeof(tiledata[0]) * MAXTILES); for (auto& tile : tiledata) { tile.texture = Placeholder; - tile.picanm = {}; - tile.replacement = ReplacementType::Art; tile.alphaThreshold = 0.5; - tile.hiofs = {}; } } diff --git a/source/core/textures/buildtiles.h b/source/core/textures/buildtiles.h index befd841a5..c10fb5ffe 100644 --- a/source/core/textures/buildtiles.h +++ b/source/core/textures/buildtiles.h @@ -284,7 +284,7 @@ struct BuildTiles { FGameTexture* Placeholder; TDeletingArray ArtFiles; - TileDesc tiledata[MAXTILES]; + TArray tiledata; TArray addedArt; TMap nametoindex; TMap textotile;