mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 21:20:39 +00:00
- use symbolic constants for all places where globalorientation is checked for the alignment bits.
This commit is contained in:
parent
5ff36f491e
commit
986fccfddc
3 changed files with 4 additions and 10 deletions
|
@ -1183,7 +1183,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
k0 = (float)tspr->z+sext->position_offset.z;
|
||||
f = ((globalorientation & 8) && (spr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_FACING) ? -4.f : 4.f;
|
||||
k0 -= (tspr->yoffset*tspr->yrepeat)*f;
|
||||
if ((globalorientation&128) && !((globalorientation&48)==32))
|
||||
if ((globalorientation&128) && !((globalorientation & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR))
|
||||
k0 += (float)(sizyrep<<1);
|
||||
|
||||
// Parkar: Changed to use the same method as centeroriented sprites
|
||||
|
@ -1206,7 +1206,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
|
||||
// floor aligned
|
||||
k1 = (float)tspr->y+sext->position_offset.y;
|
||||
if ((globalorientation&48)==32)
|
||||
if ((globalorientation & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
{
|
||||
m0.Z = -m0.Z; m1.Z = -m1.Z; a0.Z = -a0.Z;
|
||||
m0.Y = -m0.Y; m1.Y = -m1.Y; a0.Y = -a0.Y;
|
||||
|
@ -1225,7 +1225,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)
|
|||
md3_vox_calcmat_common(tspr, &a0, f, mat);
|
||||
|
||||
// floor aligned
|
||||
if ((globalorientation&48)==32)
|
||||
if ((globalorientation & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
{
|
||||
f = mat[4]; mat[4] = mat[8]*16.f; mat[8] = -f*(1.f/16.f);
|
||||
f = mat[5]; mat[5] = mat[9]*16.f; mat[9] = -f*(1.f/16.f);
|
||||
|
|
|
@ -2662,7 +2662,7 @@ void polymost_drawsprite(int32_t snum)
|
|||
|
||||
vec2_t off = { 0, 0 };
|
||||
|
||||
if ((globalorientation & 48) != 48) // only non-voxel sprites should do this
|
||||
if ((globalorientation & CSTAT_SPRITE_ALIGNMENT_MASK) != CSTAT_SPRITE_ALIGNMENT_SLAB) // only non-voxel sprites should do this
|
||||
{
|
||||
int const flag = hw_hightile && TileFiles.tiledata[globalpicnum].hiofs.xsize;
|
||||
off = { (int32_t)tspr->xoffset + (flag ? TileFiles.tiledata[globalpicnum].hiofs.xoffs : tileLeftOffset(globalpicnum)),
|
||||
|
|
|
@ -1292,12 +1292,6 @@ int ConCompiler::parsecommand()
|
|||
Printf(TEXTCOLOR_RED " * WARNING!(%s, line %d) tried to set cstat 32767, using 32768 instead.\n", fn, line_number);
|
||||
warningcount++;
|
||||
}
|
||||
else if ((i & 48) == 48)
|
||||
{
|
||||
Printf(TEXTCOLOR_RED " * WARNING!(%s, line %d) tried to set cstat %d, using %d instead.\n", fn, line_number, i, i ^ 48);
|
||||
i ^= 48;
|
||||
warningcount++;
|
||||
}
|
||||
appendscriptvalue(i);
|
||||
#endif
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue