Xobjects editor wip

# Conflicts:
#	source/blood/src/mapedit.cpp
This commit is contained in:
nukeykt 2019-07-01 17:29:55 +09:00 committed by Christoph Oelckers
parent 14401ca694
commit 599f086fd9
2 changed files with 12 additions and 12 deletions

View file

@ -177,18 +177,6 @@ extern int gDudeDrag;
extern short gAffectedSectors[kMaxSectors];
extern short gAffectedXWalls[kMaxXWalls];
inline void GetSpriteExtents(spritetype *pSprite, int *top, int *bottom)
{
*top = *bottom = pSprite->z;
if ((pSprite->cstat & 0x30) != 0x20)
{
int height = tilesiz[pSprite->picnum].y;
int center = height / 2 + picanm[pSprite->picnum].yofs;
*top -= (pSprite->yrepeat << 2)*center;
*bottom += (pSprite->yrepeat << 2)*(height - center);
}
}
inline bool IsPlayerSprite(spritetype *pSprite)
{

View file

@ -293,6 +293,18 @@ static inline int GetWallType(int nWall)
return wall[nWall].lotag;
}
inline void GetSpriteExtents(spritetype *pSprite, int *top, int *bottom)
{
*top = *bottom = pSprite->z;
if ((pSprite->cstat & 0x30) != 0x20)
{
int height = tilesiz[pSprite->picnum].y;
int center = height / 2 + picanm[pSprite->picnum].yofs;
*top -= (pSprite->yrepeat << 2)*center;
*bottom += (pSprite->yrepeat << 2)*(height - center);
}
}
void InsertSpriteSect(int nSprite, int nSector);
void RemoveSpriteSect(int nSprite);
void InsertSpriteStat(int nSprite, int nStat);