From 38998f36b56c63047088fdf29a7d09cbfb6eb565 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 26 Sep 2022 20:34:49 +0200 Subject: [PATCH] - minor int_* replacements in the backend. --- source/build/src/clip.cpp | 5 +---- source/core/rendering/scene/hw_walls.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 35e874223..b789f4cc5 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -61,10 +61,7 @@ static inline void get_floorspr_points(DCoreActor *spr, int32_t px, int32_t py, inline int32_t spriteGetZOfSlope(const spritetypebase* tspr, int dax, int day, int heinum) { - if (heinum == 0) return tspr->int_pos().Z; - - int const j = DMulScale(bsin(tspr->int_ang() + 1024), day - tspr->int_pos().Y, -bsin(tspr->int_ang() + 512), dax - tspr->int_pos().X, 4); - return tspr->int_pos().Z + MulScale(heinum, j, 18); + return spriteGetZOfSlopef(tspr, DVector2(dax * inttoworld, day * inttoworld), heinum) * zworldtoint; } diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index ce30f8b88..b6c67f0f6 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -1101,7 +1101,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec int HWWall::CheckWallSprite(tspritetype* spr, tspritetype* last) { // If the position changed we need to recalculate everything. - if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->int_ang() != last->int_ang()) return 3; + if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->angle != last->angle) return 3; // if the horizontal orientation changes we need to recalculate the walls this attaches to, but not the positioning. if (spr->xrepeat != last->xrepeat || spr->xoffset != last->xoffset || spr->picnum != last->picnum || ((spr->cstat ^ last->cstat) & CSTAT_SPRITE_XFLIP)) return 2;