mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Blood: Constify some {u,t,}spritetype templates
This is important where tracked spritetype could be involved.
This commit is contained in:
parent
d7a7bb3e78
commit
148c8770e9
3 changed files with 4 additions and 4 deletions
|
@ -204,14 +204,14 @@ extern short gAffectedXWalls[kMaxXWalls];
|
|||
extern
|
||||
#endif
|
||||
|
||||
inline bool IsPlayerSprite(spritetype *pSprite)
|
||||
inline bool IsPlayerSprite(spritetype const * const pSprite)
|
||||
{
|
||||
if (pSprite->type >= kDudePlayer1 && pSprite->type <= kDudePlayer8)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
template<typename T> bool IsDudeSprite(T *pSprite)
|
||||
template<typename T> bool IsDudeSprite(T const * const pSprite)
|
||||
{
|
||||
if (pSprite->type >= kDudeBase && pSprite->type < kDudeMax)
|
||||
return 1;
|
||||
|
|
|
@ -312,7 +312,7 @@ static inline int GetWallType(int nWall)
|
|||
return wall[nWall].type;
|
||||
}
|
||||
|
||||
template<typename T> void GetSpriteExtents(T *pSprite, int *top, int *bottom)
|
||||
template<typename T> void GetSpriteExtents(T const * const pSprite, int *top, int *bottom)
|
||||
{
|
||||
*top = *bottom = pSprite->z;
|
||||
if ((pSprite->cstat & 0x30) != 0x20)
|
||||
|
|
|
@ -1887,7 +1887,7 @@ void viewDrawInterface(ClockTicks arg)
|
|||
|
||||
static fix16_t gCameraAng;
|
||||
|
||||
template<typename T> tspritetype* viewInsertTSprite(int nSector, int nStatnum, T *pSprite)
|
||||
template<typename T> tspritetype* viewInsertTSprite(int nSector, int nStatnum, T const * const pSprite)
|
||||
{
|
||||
int nTSprite = spritesortcnt;
|
||||
tspritetype *pTSprite = &tsprite[nTSprite];
|
||||
|
|
Loading…
Reference in a new issue