mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +00:00
- fixed compilation (again.)
This commit is contained in:
parent
73683b3ebe
commit
207298aeb4
6 changed files with 30 additions and 30 deletions
|
@ -123,3 +123,21 @@ inline void copyfloorpal(spritetype* spr, const sectortype* sect)
|
|||
{
|
||||
if (!lookups.noFloorPal(sect->floorpal)) spr->pal = sect->floorpal;
|
||||
}
|
||||
|
||||
inline void spriteSetSlope(int spritenum, int heinum)
|
||||
{
|
||||
auto spr = &sprite[spritenum];
|
||||
int cstat = spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK;
|
||||
if (spr->cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
{
|
||||
spr->xoffset = heinum & 255;
|
||||
spr->yoffset = (heinum >> 8) & 255;
|
||||
spr->cstat = (spr->cstat & ~CSTAT_SPRITE_ALIGNMENT_MASK) | (heinum != 0 ? CSTAT_SPRITE_ALIGNMENT_SLOPE : CSTAT_SPRITE_ALIGNMENT_FLOOR);
|
||||
}
|
||||
}
|
||||
|
||||
inline int spriteGetSlope(int spritenum)
|
||||
{
|
||||
auto spr = &sprite[spritenum];
|
||||
return ((spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLOPE) ? 0 : uint8_t(spr->xoffset) + (uint8_t(spr->yoffset) << 8);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue