Skip to content

Commit

Permalink
- delete unused variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Jan 13, 2022
1 parent 40ffb23 commit fcf04a7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion source/core/rendering/scene/hw_drawstructs.h
Expand Up @@ -164,7 +164,6 @@ class HWWall
float ViewDistance;
float visibility;
walltype* walldist;
FVector2 wallpoint;
short shade, palette;

PalEntry fade;
Expand Down
12 changes: 4 additions & 8 deletions source/core/rendering/scene/hw_walls.cpp
Expand Up @@ -50,6 +50,10 @@ DCoreActor* wall_to_sprite_actors[8]; // gets updated each frame. Todo: Encapsul

static walltype* IsOnWall(tspritetype* tspr, int height, DVector2& outpos)
{
if (tspr->picnum == 164)
{
return nullptr;
}
const double maxdistsq = (tspr->ang & 0x1ff)? 3 * 3 : 1; // lower tolerance for perfectly orthogonal sprites

auto sect = tspr->sectp;
Expand Down Expand Up @@ -177,13 +181,6 @@ void HWWall::RenderMirrorSurface(HWDrawInfo *di, FRenderState &state)

void HWWall::RenderTexturedWall(HWDrawInfo *di, FRenderState &state, int rflags)
{
#ifdef _DEBUG
if (seg && (wallnum(seg) == 929 || wallnum(seg) == 930))
{
int a = 0;
}
#endif

SetLightAndFog(di, state, fade, palette, shade, visibility, alpha);

state.SetMaterial(texture, UF_Texture, 0, (flags & (HWF_CLAMPX | HWF_CLAMPY)), TRANSLATION(Translation_Remap + curbasepal, palette), -1);
Expand Down Expand Up @@ -1123,7 +1120,6 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, tspritetype* spr, sectortype* sec

DVector2 vec{};
walldist = IsOnWall(spr, height, vec);
wallpoint = { float(vec.X * (1 / 16.f)), float(vec.Y * (-1 / 16.f)) };
if (walldist)
{
// project the sprite right onto the wall.
Expand Down
1 change: 1 addition & 0 deletions source/games/duke/src/constants.h
Expand Up @@ -316,6 +316,7 @@ enum sflags_t
SFLAG_TRIGGER_IFHITSECTOR = 0x00008000,
SFLAG_MOVEFTA_WAKEUPCHECK = 0x00010000,
SFLAG_MOVEFTA_CHECKSEEWITHPAL8 = 0x00020000, // let's hope this can be done better later. For now this was what blocked merging the Duke and RR variants of movefta
SFLAG_NOSHADOW = 0x00020000,

};

Expand Down

0 comments on commit fcf04a7

Please sign in to comment.