mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Add CSTAT_SPRITE_ALIGNMENT_MASK. It's identical to CSTAT_SPRITE_ALIGNMENT_SLAB, but should be used in cases where you're checking either CSTAT_SPRITE_ALIGNMENT_WALL or CSTAT_SPRITE_ALIGNMENT_FLOOR rather than checking for a slab (voxel).
git-svn-id: https://svn.eduke32.com/eduke32@7129 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4059e1918e
commit
3b782aba60
2 changed files with 9 additions and 7 deletions
|
@ -129,9 +129,11 @@ enum
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
CSTAT_SPRITE_ALIGNMENT_FACING = 0,
|
CSTAT_SPRITE_ALIGNMENT_FACING = 0,
|
||||||
CSTAT_SPRITE_ALIGNMENT_WALL = 1u<<4u,
|
CSTAT_SPRITE_ALIGNMENT_WALL = 1u<<4u,
|
||||||
CSTAT_SPRITE_ALIGNMENT_FLOOR = 1u<<5u,
|
CSTAT_SPRITE_ALIGNMENT_FLOOR = 1u<<5u,
|
||||||
CSTAT_SPRITE_ALIGNMENT_SLAB = 1u<<4u | 1u<<5u,
|
CSTAT_SPRITE_ALIGNMENT_SLAB = 1u<<4u | 1u<<5u,
|
||||||
|
|
||||||
|
CSTAT_SPRITE_ALIGNMENT_MASK = 1u<<4u | 1u<<5u,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -11855,9 +11855,9 @@ restart_grand:
|
||||||
#endif
|
#endif
|
||||||
vec2_t v1 = *(vec2_t *)&sprite[j];
|
vec2_t v1 = *(vec2_t *)&sprite[j];
|
||||||
|
|
||||||
switch (cstat&48)
|
switch (cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
|
||||||
{
|
{
|
||||||
case 0:
|
case CSTAT_SPRITE_ALIGNMENT_FACING:
|
||||||
{
|
{
|
||||||
int32_t k = walldist+(sprite[j].clipdist<<2)+1;
|
int32_t k = walldist+(sprite[j].clipdist<<2)+1;
|
||||||
if ((klabs(v1.x-pos->x) <= k) && (klabs(v1.y-pos->y) <= k))
|
if ((klabs(v1.x-pos->x) <= k) && (klabs(v1.y-pos->y) <= k))
|
||||||
|
@ -11869,7 +11869,7 @@ restart_grand:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 16:
|
case CSTAT_SPRITE_ALIGNMENT_WALL:
|
||||||
{
|
{
|
||||||
vec2_t v2;
|
vec2_t v2;
|
||||||
get_wallspr_points((uspritetype *)&sprite[j], &v1.x, &v2.x, &v1.y, &v2.y);
|
get_wallspr_points((uspritetype *)&sprite[j], &v1.x, &v2.x, &v1.y, &v2.y);
|
||||||
|
@ -11884,7 +11884,7 @@ restart_grand:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 32:
|
case CSTAT_SPRITE_ALIGNMENT_FLOOR:
|
||||||
{
|
{
|
||||||
daz = sprite[j].z; daz2 = daz;
|
daz = sprite[j].z; daz2 = daz;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue