mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 23:32:02 +00:00
- initialize model data at engine start, not at level start.
This commit is contained in:
parent
412d6499d9
commit
3e9b9c280b
6 changed files with 8 additions and 14 deletions
|
@ -477,9 +477,8 @@ void gl_RecalcVertexHeights(vertex_t * v)
|
||||||
|
|
||||||
void gl_InitData()
|
void gl_InitData()
|
||||||
{
|
{
|
||||||
LineSpecials[157]=LS_SetGlobalFogParameter;
|
LineSpecials[157] = LS_SetGlobalFogParameter;
|
||||||
LineSpecials[159]=LS_Sector_SetPlaneReflection;
|
LineSpecials[159] = LS_Sector_SetPlaneReflection;
|
||||||
gl_InitModels();
|
|
||||||
AdjustSpriteOffsets();
|
AdjustSpriteOffsets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ extern TArray<BYTE> currentmapsection;
|
||||||
|
|
||||||
void gl_InitPortals();
|
void gl_InitPortals();
|
||||||
void gl_BuildPortalCoverage(FPortalCoverage *coverage, subsector_t *subsector, FPortal *portal);
|
void gl_BuildPortalCoverage(FPortalCoverage *coverage, subsector_t *subsector, FPortal *portal);
|
||||||
|
void gl_InitData();
|
||||||
|
|
||||||
extern long gl_frameMS;
|
extern long gl_frameMS;
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
#include "gl/gl_functions.h"
|
#include "gl/gl_functions.h"
|
||||||
|
|
||||||
void InitGLRMapinfoData();
|
void InitGLRMapinfoData();
|
||||||
void gl_InitData();
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
@ -613,15 +612,6 @@ void gl_PreprocessLevel()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
static int datadone=-1;
|
|
||||||
|
|
||||||
|
|
||||||
if (datadone != restart)
|
|
||||||
{
|
|
||||||
datadone = restart;
|
|
||||||
gl_InitData();
|
|
||||||
}
|
|
||||||
|
|
||||||
PrepareSegs();
|
PrepareSegs();
|
||||||
PrepareSectorData();
|
PrepareSectorData();
|
||||||
InitVertexData();
|
InitVertexData();
|
||||||
|
|
|
@ -333,7 +333,6 @@ struct FSpriteModelFrame
|
||||||
|
|
||||||
class GLSprite;
|
class GLSprite;
|
||||||
|
|
||||||
void gl_InitModels();
|
|
||||||
FSpriteModelFrame * gl_FindModelFrame(const PClass * ti, int sprite, int frame, bool dropped);
|
FSpriteModelFrame * gl_FindModelFrame(const PClass * ti, int sprite, int frame, bool dropped);
|
||||||
|
|
||||||
void gl_RenderModel(GLSprite * spr);
|
void gl_RenderModel(GLSprite * spr);
|
||||||
|
|
|
@ -1224,6 +1224,7 @@ void FGLInterface::RenderView(player_t *player)
|
||||||
void FGLInterface::Init()
|
void FGLInterface::Init()
|
||||||
{
|
{
|
||||||
gl_ParseDefs();
|
gl_ParseDefs();
|
||||||
|
gl_InitData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include "r_data/voxels.h"
|
#include "r_data/voxels.h"
|
||||||
#include "textures/textures.h"
|
#include "textures/textures.h"
|
||||||
|
|
||||||
|
void gl_InitModels();
|
||||||
|
|
||||||
// variables used to look up
|
// variables used to look up
|
||||||
// and range check thing_t sprites patches
|
// and range check thing_t sprites patches
|
||||||
TArray<spritedef_t> sprites;
|
TArray<spritedef_t> sprites;
|
||||||
|
@ -988,6 +990,8 @@ void R_InitSprites ()
|
||||||
|
|
||||||
// [RH] Sort the skins, but leave base as skin 0
|
// [RH] Sort the skins, but leave base as skin 0
|
||||||
//qsort (&skins[PlayerClasses.Size ()], numskins-PlayerClasses.Size (), sizeof(FPlayerSkin), skinsorter);
|
//qsort (&skins[PlayerClasses.Size ()], numskins-PlayerClasses.Size (), sizeof(FPlayerSkin), skinsorter);
|
||||||
|
|
||||||
|
gl_InitModels();
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_DeinitSpriteData()
|
void R_DeinitSpriteData()
|
||||||
|
|
Loading…
Reference in a new issue