mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
moved all Is***Sprite function to animatesprite.cpp because that's the only place they still get used from.
Naked sprite pointers have been removed everywhere else.
This commit is contained in:
parent
7e63ccd57a
commit
aea46548bd
2 changed files with 25 additions and 29 deletions
|
@ -189,35 +189,6 @@ extern const VECTORDATA gVectorData[];
|
|||
|
||||
const int gDudeDrag = 0x2a00;
|
||||
|
||||
template<typename T> bool IsPlayerSprite(T const * const pSprite)
|
||||
{
|
||||
return pSprite->type >= kDudePlayer1 && pSprite->type <= kDudePlayer8;
|
||||
}
|
||||
|
||||
template<typename T> bool IsDudeSprite(T const * const pSprite)
|
||||
{
|
||||
return pSprite->type >= kDudeBase && pSprite->type < kDudeMax;
|
||||
}
|
||||
|
||||
template<typename T> bool IsThingSprite(T const* const pSprite)
|
||||
{
|
||||
return pSprite->type >= kThingBase && pSprite->type < kThingMax;
|
||||
}
|
||||
|
||||
template<typename T> bool IsItemSprite(T const * const pSprite)
|
||||
{
|
||||
return pSprite->type >= kItemBase && pSprite->type < kItemMax;
|
||||
}
|
||||
|
||||
template<typename T> bool IsWeaponSprite(T const * const pSprite)
|
||||
{
|
||||
return pSprite->type >= kItemWeaponBase && pSprite->type < kItemWeaponMax;
|
||||
}
|
||||
|
||||
template<typename T> bool IsAmmoSprite(T const * const pSprite)
|
||||
{
|
||||
return pSprite->type >= kItemAmmoBase && pSprite->type < kItemAmmoMax;
|
||||
}
|
||||
|
||||
|
||||
#ifdef POLYMER
|
||||
|
|
|
@ -49,6 +49,31 @@ DAngle random_angles[16][3];
|
|||
|
||||
// to allow quick replacement later
|
||||
|
||||
bool IsPlayerSprite(tspritetype const* const pSprite)
|
||||
{
|
||||
return pSprite->type >= kDudePlayer1 && pSprite->type <= kDudePlayer8;
|
||||
}
|
||||
|
||||
bool IsDudeSprite(tspritetype const* const pSprite)
|
||||
{
|
||||
return pSprite->type >= kDudeBase && pSprite->type < kDudeMax;
|
||||
}
|
||||
|
||||
bool IsItemSprite(tspritetype const* const pSprite)
|
||||
{
|
||||
return pSprite->type >= kItemBase && pSprite->type < kItemMax;
|
||||
}
|
||||
|
||||
bool IsWeaponSprite(tspritetype const* const pSprite)
|
||||
{
|
||||
return pSprite->type >= kItemWeaponBase && pSprite->type < kItemWeaponMax;
|
||||
}
|
||||
|
||||
bool IsAmmoSprite(tspritetype const* const pSprite)
|
||||
{
|
||||
return pSprite->type >= kItemAmmoBase && pSprite->type < kItemAmmoMax;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue