mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 13:10:39 +00:00
- helpers for wall sprite rendering improvement
This commit is contained in:
parent
5aabde1712
commit
1a788c9ba2
2 changed files with 18 additions and 0 deletions
|
@ -396,6 +396,10 @@ void DCoreActor::OnDestroy()
|
|||
assert(prevSect == nullptr && nextSect == nullptr);
|
||||
}
|
||||
Numsprites--;
|
||||
|
||||
if (wallspriteinfo) delete wallspriteinfo;
|
||||
wallspriteinfo = nullptr;
|
||||
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -10,6 +10,19 @@ enum
|
|||
MAXSTATUS = 1024
|
||||
};
|
||||
|
||||
struct FWallSpriteDesc
|
||||
{
|
||||
walltype* wall;
|
||||
float offsetOnWall;
|
||||
};
|
||||
|
||||
// This is for quick determination of walls a wall sprite is attached to.
|
||||
struct FWallSpriteInfo
|
||||
{
|
||||
tspritetype base; // this is needed for checking if something has changed.
|
||||
TArray<FWallSpriteDesc> connections[2]; // two lists - for front and back
|
||||
};
|
||||
|
||||
class DCoreActor : public DObject
|
||||
{
|
||||
DECLARE_CLASS(DCoreActor, DObject)
|
||||
|
@ -22,6 +35,7 @@ public:
|
|||
sectortype* link_sector;
|
||||
DCoreActor* prevStat, * nextStat;
|
||||
DCoreActor* prevSect, * nextSect;
|
||||
FWallSpriteInfo* wallspriteinfo; // this is render data but needs to be attached to the actor so it can be found.
|
||||
|
||||
spritetype spr;
|
||||
spriteext_t sprext;
|
||||
|
|
Loading…
Reference in a new issue