mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-28 18:52:31 +00:00
Merge branch 'high-contrast-debug-waypoints' into 'render-highlight'
Make debugwaypoints radiuses more visible See merge request KartKrew/Kart!1022
This commit is contained in:
commit
cb6391c2cc
4 changed files with 21 additions and 4 deletions
|
|
@ -6303,6 +6303,7 @@ struct int_const_s const INT_CONST[] = {
|
|||
{"RF_FULLDARK",RF_FULLDARK},
|
||||
{"RF_SEMIBRIGHT",RF_SEMIBRIGHT},
|
||||
{"RF_NOCOLORMAPS",RF_NOCOLORMAPS},
|
||||
{"RF_ALWAYSONTOP",RF_ALWAYSONTOP},
|
||||
{"RF_SPRITETYPEMASK",RF_SPRITETYPEMASK},
|
||||
{"RF_PAPERSPRITE",RF_PAPERSPRITE},
|
||||
{"RF_FLOORSPRITE",RF_FLOORSPRITE},
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ static void K_DebugWaypointDrawRadius(waypoint_t *const waypoint)
|
|||
|
||||
spawnX = waypointmobj->x;
|
||||
spawnY = waypointmobj->y;
|
||||
spawnZ = waypointmobj->z + 16*mapobjectscale;
|
||||
spawnZ = waypointmobj->z;
|
||||
|
||||
radiusOrb = P_SpawnMobj(spawnX, spawnY, spawnZ, MT_SPARK);
|
||||
|
||||
|
|
@ -586,8 +586,9 @@ static void K_DebugWaypointDrawRadius(waypoint_t *const waypoint)
|
|||
radiusOrb->tics = 1;
|
||||
|
||||
radiusOrb->frame &= ~FF_TRANSMASK;
|
||||
radiusOrb->frame |= FF_FULLBRIGHT;
|
||||
radiusOrb->frame |= FF_FULLBRIGHT|FF_REVERSESUBTRACT;
|
||||
radiusOrb->color = SKINCOLOR_PURPLE;
|
||||
radiusOrb->renderflags |= RF_ALWAYSONTOP;
|
||||
|
||||
radiusOrb->destscale = FixedDiv(waypointmobj->radius, spriteRadius);
|
||||
P_SetScale(radiusOrb, radiusOrb->destscale);
|
||||
|
|
@ -627,6 +628,7 @@ void K_DebugWaypointsVisualise(void)
|
|||
|
||||
debugmobj->frame &= ~FF_TRANSMASK;
|
||||
debugmobj->frame |= FF_FULLBRIGHT; //FF_TRANS20
|
||||
debugmobj->renderflags |= RF_ALWAYSONTOP;
|
||||
|
||||
// There's a waypoint setup for this mobj! So draw that it's a valid waypoint and draw lines to its connections
|
||||
if (waypoint != NULL)
|
||||
|
|
|
|||
|
|
@ -932,6 +932,8 @@ typedef enum
|
|||
|
||||
RF_NOCOLORMAPS = 0x00000400, // Sprite is not drawn with colormaps
|
||||
|
||||
RF_ALWAYSONTOP = 0x00000800, // Sprite is drawn on top of level geometry
|
||||
|
||||
RF_SPRITETYPEMASK = 0x00003000, // --Different sprite types
|
||||
RF_PAPERSPRITE = 0x00001000, // Paper sprite
|
||||
RF_FLOORSPRITE = 0x00002000, // Floor sprite
|
||||
|
|
|
|||
|
|
@ -2975,6 +2975,9 @@ static void R_CreateDrawNodes(maskcount_t* mask, drawnode_t* head, boolean temps
|
|||
|
||||
for (rover = vsprsortedhead.prev; rover != &vsprsortedhead; rover = rover->prev)
|
||||
{
|
||||
const boolean alwaysontop = cv_debugrender_spriteclip.value || (rover->renderflags & RF_ALWAYSONTOP);
|
||||
const INT32 ontopflag = cv_debugrender_spriteclip.value ? 0 : (rover->renderflags & RF_ALWAYSONTOP);
|
||||
|
||||
if (rover->szt > vid.height || rover->sz < 0)
|
||||
continue;
|
||||
|
||||
|
|
@ -2982,7 +2985,7 @@ static void R_CreateDrawNodes(maskcount_t* mask, drawnode_t* head, boolean temps
|
|||
|
||||
for (r2 = head->next; r2 != head; r2 = r2->next)
|
||||
{
|
||||
if (cv_debugrender_spriteclip.value)
|
||||
if (alwaysontop)
|
||||
{
|
||||
// Only sort behind other sprites; sorts in
|
||||
// front of everything else.
|
||||
|
|
@ -2990,6 +2993,15 @@ static void R_CreateDrawNodes(maskcount_t* mask, drawnode_t* head, boolean temps
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Only sort behind other RF_ALWAYSONTOP sprites.
|
||||
// This avoids sorting behind a sprite that is
|
||||
// behind level geometry and thus sorting this
|
||||
// one behind level geometry too.
|
||||
if (r2->sprite->renderflags ^ ontopflag)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (r2->plane)
|
||||
|
|
@ -3254,7 +3266,7 @@ void R_ClipVisSprite(vissprite_t *spr, INT32 x1, INT32 x2, portal_t* portal)
|
|||
fixed_t lowscale;
|
||||
INT32 silhouette;
|
||||
|
||||
if (cv_debugrender_spriteclip.value)
|
||||
if ((spr->renderflags & RF_ALWAYSONTOP) || cv_debugrender_spriteclip.value)
|
||||
{
|
||||
for (x = x1; x <= x2; x++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue