Get rid of software affine debug values

This commit is contained in:
yamamama 2026-03-03 07:31:28 -05:00
parent 98efe198ac
commit d650014fd6
5 changed files with 1 additions and 59 deletions

View file

@ -884,14 +884,6 @@ void P_Ticker(boolean run)
{
leveltime++;
#ifdef AFFINEROT_TESTER
if (cv_affinerottest.value == 2)
{
fixed_t newaffineangle = (cv_affineangle.value + (FRACUNIT)) % (360 * FRACUNIT);
CV_StealthSet(&cv_affineangle, va("%f", FIXED_TO_FLOAT(newaffineangle)));
}
#endif
if (starttime > introtime && leveltime == starttime)
{
ACS_RunRaceStartScript();

View file

@ -533,9 +533,6 @@ void R_DrawColumn_Flat(drawcolumndata_t *dc)
while (--count);
}
// Purely for debug; fills all columns in the drawing area with a pair of "background colors"
//#define FILL_DRAW_AREA
template<DrawColumnType Type>
static void R_DrawAffineColumnTemplate(drawcolumndata_t *dc)
{
@ -642,31 +639,14 @@ static void R_DrawAffineColumnTemplate(drawcolumndata_t *dc)
ux += FixedMul(b, ystep_delta);
uy += FixedMul(d, ystep_delta);
#ifdef FILL_DRAW_AREA
UINT16 pixel;
#endif
if (srcx < 0 || srcx >= pw || srcy < 0 || srcy >= ph)
{
#ifdef FILL_DRAW_AREA
pixel = 65461;
*dest = (UINT8)(pixel & 0xff);
#endif
continue;
}
#ifdef FILL_DRAW_AREA
pixel = reinterpret_cast<UINT16 *>(dc->source)[srcy * pw + srcx];
if (pixel < 0xff00)
{
pixel = 65315; // Uhhhhhhhh
}
#else
const UINT8 pixel = R_DrawColumnAffinePixel<Type>(dc, dest, srcy * pw + srcx);
if (pixel == TRANSPARENTPIXEL)
continue;
#endif
*dest = pixel;
}

View file

@ -200,13 +200,6 @@ consvar_t cv_nulldrifttilt = CVAR_INIT ("nulldrifttilt", "On", CV_SAVE, CV_OnOff
static CV_PossibleValue_t affineangle_cons_t[] = {{0, "MIN"}, {360 * FRACUNIT, "MAX"}, {0, NULL}};
static CV_PossibleValue_t affinetest_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "Auto"}, {0, NULL}};
#ifdef AFFINEROT_TESTER
consvar_t cv_affineangle = CVAR_INIT ("affineangle", "0", CV_FLOAT, affineangle_cons_t, NULL);
consvar_t cv_affinecuttest = CVAR_INIT ("affinecuttest", "1.0", CV_FLOAT, CV_Signed, NULL);
consvar_t cv_affinedebugx = CVAR_INIT ("affinedebugx", "0.0", CV_FLOAT, CV_Signed, NULL);
consvar_t cv_affinerottest = CVAR_INIT ("affinerottest", "Off", CV_FLOAT, affinetest_cons_t, NULL);
#endif
void SplitScreen_OnChange(void)
{
UINT8 i;
@ -1822,13 +1815,6 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_playerfade);
#ifdef AFFINEROT_TESTER
CV_RegisterVar(&cv_affineangle);
CV_RegisterVar(&cv_affinecuttest);
CV_RegisterVar(&cv_affinedebugx);
CV_RegisterVar(&cv_affinerottest);
#endif
CV_RegisterVar(&cv_movebob);
// Frame interpolation/uncapped

View file

@ -161,12 +161,6 @@ extern consvar_t cv_sloperoll;
extern consvar_t cv_sliptidetilt;
extern consvar_t cv_nulldriftefx, cv_nulldrifttilt;
#define AFFINEROT_TESTER
#ifdef AFFINEROT_TESTER
extern consvar_t cv_affineangle, cv_affinecuttest, cv_affinedebugx, cv_affinerottest;
#endif
// debugging
typedef enum {

View file

@ -1178,11 +1178,8 @@ static void R_DrawVisSprite(vissprite_t *vis)
dc.affine.d = vis->affine.transform.d;
dc.affine.ox = vis->affine.transform.ox;
dc.affine.oy = vis->affine.transform.oy;
#ifdef AFFINEROT_TESTER
dc.affineoffset.x = vis->affine.offset.x + cv_affinedebugx.value;
#else
dc.affineoffset.x = vis->affine.offset.x;
#endif
dc.affineoffset.y = vis->affine.offset.y;
R_CopyAffineBounds(&vis->affine.bounds, &dc.affinebound);
@ -2329,14 +2326,7 @@ static void R_ProjectSprite(mobj_t *thing)
INT32 flipsign = ((flip) ? -1 : 1);
#ifdef AFFINEROT_TESTER
if (!cv_affinerottest.value)
angle = spriterotangle * flipsign;
else
angle = FixedAngle(cv_affineangle.value);
#else
angle = spriterotangle * flipsign;
#endif
const fixed_t rolloffs_x = FixedDiv(interptarg->rollingxoffset, highresscale) * (((thing->renderflags & RF_FLIPOFFSETS) && flip) ? -1 : 1);
const fixed_t rolloffs_y = FixedDiv(interptarg->rollingyoffset, highresscale);