- 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.
This commit is contained in:
Christoph Oelckers 2022-12-06 22:30:52 +01:00
parent 71ca2c4677
commit aa58b152ab
3 changed files with 4 additions and 5 deletions

View file

@ -213,7 +213,7 @@ public:
{
}
////////
TArray ()
constexpr TArray ()
{
Most = 0;
Count = 0;

View file

@ -225,13 +225,12 @@ static FGameTexture* GetTileTexture(const char* name, const TArray<uint8_t>& 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 = {};
}
}

View file

@ -284,7 +284,7 @@ struct BuildTiles
{
FGameTexture* Placeholder;
TDeletingArray<BuildArtFile*> ArtFiles;
TileDesc tiledata[MAXTILES];
TArray<TileDesc> tiledata;
TArray<FString> addedArt;
TMap<FName, int> nametoindex;
TMap<int, int> textotile;