mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 11:50:49 +00:00
- fixed: The tile manager created its backup arrays before loading .def files.
This could let such textures disappear with the new main loop.
This commit is contained in:
parent
8d63e735d0
commit
e5612b82c7
6 changed files with 16 additions and 2 deletions
|
@ -462,6 +462,7 @@ void GameInterface::app_init()
|
|||
uint32_t etime = I_msTime();
|
||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
||||
}
|
||||
TileFiles.SetBackup();
|
||||
powerupInit();
|
||||
Printf(PRINT_NONOTIFY, "Loading cosine table\n");
|
||||
trigInit();
|
||||
|
|
|
@ -676,6 +676,7 @@ void tileCopy(int tile, int source, int pal, int xoffset, int yoffset, int flags
|
|||
// Clear map specific ART
|
||||
//
|
||||
//==========================================================================
|
||||
static FString currentMapArt;
|
||||
|
||||
void artClearMapArt(void)
|
||||
{
|
||||
|
@ -685,6 +686,7 @@ void artClearMapArt(void)
|
|||
td.picanm = td.picanmbackup;
|
||||
}
|
||||
TileFiles.SetupReverseTileMap();
|
||||
currentMapArt = "";
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -692,7 +694,6 @@ void artClearMapArt(void)
|
|||
// Load map specficied ART
|
||||
//
|
||||
//==========================================================================
|
||||
static FString currentMapArt;
|
||||
|
||||
void artSetupMapArt(const char* filename)
|
||||
{
|
||||
|
|
|
@ -299,6 +299,15 @@ struct BuildTiles
|
|||
CloseAll();
|
||||
}
|
||||
|
||||
void SetBackup()
|
||||
{
|
||||
for (auto& td : tiledata)
|
||||
{
|
||||
td.backup = td.texture;
|
||||
td.picanmbackup = td.picanm;
|
||||
}
|
||||
}
|
||||
|
||||
void CloseAll();
|
||||
|
||||
void AddTile(int tilenum, FGameTexture* tex, bool permap = false);
|
||||
|
|
|
@ -633,6 +633,7 @@ void GameInterface::app_init()
|
|||
uint32_t etime = I_msTime();
|
||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
||||
}
|
||||
TileFiles.SetBackup();
|
||||
|
||||
InitView();
|
||||
InitFX();
|
||||
|
|
|
@ -243,6 +243,7 @@ static void loaddefs()
|
|||
deftimer.Unclock();
|
||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %.3f ms.\n", defsfile, deftimer.TimeMS());
|
||||
}
|
||||
TileFiles.SetBackup();
|
||||
userConfig.AddDefs.reset();
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,8 @@ void GameInterface::app_init()
|
|||
LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information
|
||||
|
||||
if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n");
|
||||
userConfig.AddDefs.reset();
|
||||
TileFiles.SetBackup();
|
||||
userConfig.AddDefs.reset();
|
||||
InitFX();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue