mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 04:00:53 +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();
|
uint32_t etime = I_msTime();
|
||||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
||||||
}
|
}
|
||||||
|
TileFiles.SetBackup();
|
||||||
powerupInit();
|
powerupInit();
|
||||||
Printf(PRINT_NONOTIFY, "Loading cosine table\n");
|
Printf(PRINT_NONOTIFY, "Loading cosine table\n");
|
||||||
trigInit();
|
trigInit();
|
||||||
|
|
|
@ -676,6 +676,7 @@ void tileCopy(int tile, int source, int pal, int xoffset, int yoffset, int flags
|
||||||
// Clear map specific ART
|
// Clear map specific ART
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
static FString currentMapArt;
|
||||||
|
|
||||||
void artClearMapArt(void)
|
void artClearMapArt(void)
|
||||||
{
|
{
|
||||||
|
@ -685,6 +686,7 @@ void artClearMapArt(void)
|
||||||
td.picanm = td.picanmbackup;
|
td.picanm = td.picanmbackup;
|
||||||
}
|
}
|
||||||
TileFiles.SetupReverseTileMap();
|
TileFiles.SetupReverseTileMap();
|
||||||
|
currentMapArt = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
@ -692,7 +694,6 @@ void artClearMapArt(void)
|
||||||
// Load map specficied ART
|
// Load map specficied ART
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
static FString currentMapArt;
|
|
||||||
|
|
||||||
void artSetupMapArt(const char* filename)
|
void artSetupMapArt(const char* filename)
|
||||||
{
|
{
|
||||||
|
|
|
@ -299,6 +299,15 @@ struct BuildTiles
|
||||||
CloseAll();
|
CloseAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetBackup()
|
||||||
|
{
|
||||||
|
for (auto& td : tiledata)
|
||||||
|
{
|
||||||
|
td.backup = td.texture;
|
||||||
|
td.picanmbackup = td.picanm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CloseAll();
|
void CloseAll();
|
||||||
|
|
||||||
void AddTile(int tilenum, FGameTexture* tex, bool permap = false);
|
void AddTile(int tilenum, FGameTexture* tex, bool permap = false);
|
||||||
|
|
|
@ -633,6 +633,7 @@ void GameInterface::app_init()
|
||||||
uint32_t etime = I_msTime();
|
uint32_t etime = I_msTime();
|
||||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime);
|
||||||
}
|
}
|
||||||
|
TileFiles.SetBackup();
|
||||||
|
|
||||||
InitView();
|
InitView();
|
||||||
InitFX();
|
InitFX();
|
||||||
|
|
|
@ -243,6 +243,7 @@ static void loaddefs()
|
||||||
deftimer.Unclock();
|
deftimer.Unclock();
|
||||||
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %.3f ms.\n", defsfile, deftimer.TimeMS());
|
Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %.3f ms.\n", defsfile, deftimer.TimeMS());
|
||||||
}
|
}
|
||||||
|
TileFiles.SetBackup();
|
||||||
userConfig.AddDefs.reset();
|
userConfig.AddDefs.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -234,6 +234,7 @@ void GameInterface::app_init()
|
||||||
LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information
|
LoadCustomInfoFromScript("swcustom.txt"); // Load user customisation information
|
||||||
|
|
||||||
if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n");
|
if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n");
|
||||||
|
TileFiles.SetBackup();
|
||||||
userConfig.AddDefs.reset();
|
userConfig.AddDefs.reset();
|
||||||
InitFX();
|
InitFX();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue