Revert "TERRAIN: add 'remap' boolean, toggles ENCOREMAP/TWEAKMAP"

This reverts commit d062173bfc.
This commit is contained in:
NepDisk 2024-12-30 08:52:46 -05:00
parent 82f1b11c7d
commit f52d841220
3 changed files with 10 additions and 34 deletions

View file

@ -477,7 +477,7 @@ static void HWR_GenerateTexture(GLMapTexture_t *grtex, INT32 texnum, boolean noe
grtex->mipmap.height = (UINT16)texture->height;
grtex->mipmap.format = textureformat;
if (!noencoremap && R_TextureCanRemap(texnum))
if (!noencoremap && encoremap)
colormap += COLORMAP_REMAPOFFSET;
grtex->mipmap.colormap = Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL);

View file

@ -1629,29 +1629,6 @@ static void K_TerrainDefaults(terrain_t *terrain)
terrain->flags = TRF_REMAP;
}
/*--------------------------------------------------
boolean K_TerrainHasAffect(terrain_t *terrain)
See header file for description.
--------------------------------------------------*/
boolean K_TerrainHasAffect(terrain_t *terrain, boolean badonly)
{
if (terrain->friction > 0
|| terrain->offroad != 0
|| terrain->damageType != -1)
return true;
if (badonly)
return false;
return (terrain->friction != 0
|| terrain->pogoSpring != 0
|| terrain->speedPad != 0
|| terrain->springStrength != 0
|| terrain->flags != 0);
}
/*--------------------------------------------------
static void K_NewTerrainDefs(void)

View file

@ -33,7 +33,6 @@
#include "k_terrain.h"
#include "core/memory.h"
#include "core/thread_pool.h"
#include "k_terrain.h"
extern "C" consvar_t cv_debugfinishline;
@ -49,8 +48,8 @@ static boolean markceiling;
static boolean maskedtexture;
static INT32 toptexture, bottomtexture, midtexture;
static bool topbrightmapped, bottombrightmapped, midbrightmapped;
static bool topremap, bottomremap, midremap;
static boolean topbrightmapped, bottombrightmapped, midbrightmapped;
static boolean topremap, bottomremap, midremap;
static INT32 numthicksides, numbackffloors;
angle_t rw_normalangle;
@ -438,7 +437,7 @@ static void R_RenderMaskedSegLoop(drawcolumndata_t* dc, drawseg_t *drawseg, INT3
dc->colormap = rlight->rcolormap;
dc->lightmap = xwalllights[pindex];
dc->fullbright = colormaps;
if (remap && !(ldef->flags & ML_TFERLINE))
if (encoremap && !(ldef->flags & ML_TFERLINE))
{
dc->colormap += COLORMAP_REMAPOFFSET;
dc->fullbright += COLORMAP_REMAPOFFSET;
@ -1354,11 +1353,6 @@ static void R_DrawWallColumn(drawcolumndata_t* dc, INT32 yl, INT32 yh, fixed_t m
R_SetColumnFunc(colfunctype, dc->brightmap != NULL);
coldrawfunc_t* colfunccopy = colfunc;
drawcolumndata_t dc_copy = *dc;
if (remap)
{
dc_copy.colormap += COLORMAP_REMAPOFFSET;
dc_copy.fullbright += COLORMAP_REMAPOFFSET;
}
colfunccopy(const_cast<drawcolumndata_t*>(&dc_copy));
if (remap)
@ -1568,6 +1562,11 @@ static void R_RenderSegLoop (drawcolumndata_t* dc)
dc->colormap = walllights[pindex];
dc->lightmap = walllights[pindex];
dc->fullbright = colormaps;
if (encoremap && !(curline->linedef->flags & ML_TFERLINE))
{
dc->colormap += COLORMAP_REMAPOFFSET;
dc->fullbright += COLORMAP_REMAPOFFSET;
}
dc->x = rw_x;
dc->iscale = 0xffffffffu / (unsigned)rw_scale;
@ -1800,7 +1799,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
fixed_t ceilingfrontslide, floorfrontslide, ceilingbackslide, floorbackslide;
static size_t maxdrawsegs = 0;
const INT32 twosidedmidtexture = R_GetTwoSidedMidTexture(curline);
const bool wantremap = encoremap && !(curline->linedef->flags & ML_TFERLINE);
const boolean wantremap = encoremap && !(curline->linedef->flags & ML_TFERLINE);
drawcolumndata_t dc {0};
//ZoneScoped;