- the really final parts of the shared code using s() cleaned up.

This commit is contained in:
Christoph Oelckers 2021-12-22 23:41:19 +01:00
parent ed0c27b240
commit 40a307650d
5 changed files with 7 additions and 7 deletions

View file

@ -1446,7 +1446,7 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
if (abs(intx-sv->X)+abs(inty-sv->Y) > abs((hitinfo.hitpos.X)-sv->X)+abs((hitinfo.hitpos.Y)-sv->Y))
continue;
daz = spr->pos.Z + spriteheightofsptr(&actor->s(), &k, 1);
daz = spr->pos.Z + spriteheightofsptr(&actor->spr, &k, 1);
if (intz > daz-k && intz < daz)
{
if (picanm[tilenum].sf&PICANM_TEXHITSCAN_BIT)

View file

@ -358,7 +358,7 @@ inline tspriteptr_t renderAddTsprite(tspritetype* tsprite, int& spritesortcnt, D
{
if (spritesortcnt >= MAXSPRITESONSCREEN) return nullptr;
auto tspr = &tsprite[spritesortcnt++];
tspr->copyfrom(&actor->s());
tspr->copyfrom(&actor->spr);
tspr->clipdist = 0;
tspr->ownerActor = actor;
return tspr;

View file

@ -670,14 +670,14 @@ bool HWLineToSpritePortal::Setup(HWDrawInfo* di, FRenderState& rstate, Clipper*
di->mClipPortal = this;
auto srccenter = (WallStart(origin) + WallEnd(origin)) / 2;
DVector2 destcenter ={ camera->pos.X / 16.f, camera->pos.Y / -16.f };
DVector2 destcenter ={ camera->spr.pos.X / 16.f, camera->spr.pos.Y / -16.f };
DVector2 npos = vp.Pos - srccenter + destcenter;
int origx = vp.Pos.X * 16;
int origy = vp.Pos.Y * -16;
vp.SectNums = nullptr;
vp.SectCount = camera->sectno();
vp.SectCount = camera->spr.sectno();
vp.Pos.X = npos.X;
vp.Pos.Y = npos.Y;

View file

@ -299,7 +299,7 @@ struct HWLineToSpritePortal : public HWLinePortal
{
walltype clipline = {};
walltype* origin;
spritetype* camera;
DCoreActor* camera;
protected:
bool Setup(HWDrawInfo* di, FRenderState& rstate, Clipper* clipper) override;
virtual void* GetSource() const override { return origin; }
@ -309,7 +309,7 @@ protected:
public:
HWLineToSpritePortal(FPortalSceneState* state, walltype* from, spritetype* to)
HWLineToSpritePortal(FPortalSceneState* state, walltype* from, DCoreActor* to)
: HWLinePortal(state, &clipline), origin(from), camera(to)
{
}

View file

@ -591,7 +591,7 @@ void HWWall::PutPortal(HWDrawInfo *di, int ptype, int plane)
case PORTALTYPE_LINETOSPRITE:
// These are also unique.
assert(seg->portalnum >= 0 && seg->portalnum < 8);
portal = new HWLineToSpritePortal(&portalState, seg, &wall_to_sprite_actors[seg->portalnum]->s());
portal = new HWLineToSpritePortal(&portalState, seg, wall_to_sprite_actors[seg->portalnum]);
di->Portals.Push(portal);
portal->AddLine(this);
break;