mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- call the game specific analyzesprites functions.
This commit is contained in:
parent
098db655ab
commit
fd0e9824b6
6 changed files with 13 additions and 0 deletions
|
@ -156,6 +156,7 @@ EXTERN sectortype *sector;
|
|||
EXTERN walltype *wall;
|
||||
EXTERN spritetype *sprite;
|
||||
EXTERN tspriteptr_t tsprite;
|
||||
EXTERN int leveltimer;
|
||||
|
||||
extern sectortype sectorbackup[MAXSECTORS];
|
||||
extern walltype wallbackup[MAXWALLS];
|
||||
|
|
|
@ -255,6 +255,7 @@ struct spritetype
|
|||
};
|
||||
int16_t extra;
|
||||
int16_t detail;
|
||||
int time;
|
||||
|
||||
#if 0
|
||||
// make sure we do not accidentally copy this
|
||||
|
|
|
@ -344,6 +344,7 @@ int32_t insertsprite(int16_t sectnum, int16_t statnum)
|
|||
Numsprites++;
|
||||
}
|
||||
|
||||
sprite[newspritenum].time = leveltimer++;
|
||||
return newspritenum;
|
||||
|
||||
}
|
||||
|
@ -702,6 +703,7 @@ int32_t engineInit(void)
|
|||
void (*initspritelists_replace)(void) = NULL;
|
||||
void initspritelists(void)
|
||||
{
|
||||
leveltimer = 0;
|
||||
if (initspritelists_replace)
|
||||
{
|
||||
initspritelists_replace();
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "hw_clipper.h"
|
||||
#include "v_draw.h"
|
||||
#include "gamecvars.h"
|
||||
#include "gamestruct.h"
|
||||
|
||||
EXTERN_CVAR(Float, r_visibility)
|
||||
CVAR(Bool, gl_bandedswlight, false, CVAR_ARCHIVE)
|
||||
|
@ -306,6 +307,8 @@ void HWDrawInfo::CreateScene()
|
|||
screen->mVertexData->Map();
|
||||
screen->mLights->Map();
|
||||
|
||||
spritesortcnt = 0;
|
||||
|
||||
vec2_t view = { int(vp.Pos.X * 16), int(vp.Pos.Y * -16) };
|
||||
mDrawer.Init(this, mClipper, view);
|
||||
if (vp.SectNums)
|
||||
|
@ -313,6 +316,10 @@ void HWDrawInfo::CreateScene()
|
|||
else
|
||||
mDrawer.RenderScene(&vp.SectCount, 1);
|
||||
|
||||
SetupSprite.Clock();
|
||||
gi->processSprites(view.x, view.y, vp.Pos.Z * -256, bamang(vp.RotAngle), vp.TicFrac * 65536);
|
||||
SetupSprite.Unclock();
|
||||
|
||||
screen->mLights->Unmap();
|
||||
screen->mVertexData->Unmap();
|
||||
|
||||
|
|
|
@ -496,6 +496,7 @@ FSerializer &Serialize(FSerializer &arc, const char *key, spritetype &c, spritet
|
|||
("hitag", c.hitag, def->hitag)
|
||||
("extra", c.extra, def->extra)
|
||||
("detail", c.detail, def->detail)
|
||||
("time", c.time, def->time)
|
||||
.EndObject();
|
||||
}
|
||||
return arc;
|
||||
|
|
|
@ -201,6 +201,7 @@ int InsertSprite(int nSector, int nStat)
|
|||
|
||||
Numsprites++;
|
||||
|
||||
sprite[nSprite].time = leveltimer++;
|
||||
return nSprite;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue