- renamed floatified wall coordinate to 'pos'.

This commit is contained in:
Christoph Oelckers 2022-01-27 18:52:52 +01:00
parent 7d461fa768
commit 02d508baef
7 changed files with 33 additions and 33 deletions

View file

@ -50,8 +50,8 @@ double Get(int index, DCoreActor* actor, int type)
case Interp_Sect_CeilingPanX: return sector[index].ceilingxpan_; case Interp_Sect_CeilingPanX: return sector[index].ceilingxpan_;
case Interp_Sect_CeilingPanY: return sector[index].ceilingypan_; case Interp_Sect_CeilingPanY: return sector[index].ceilingypan_;
case Interp_Wall_X: return wall[index].__wall_pos.X; case Interp_Wall_X: return wall[index].pos.X;
case Interp_Wall_Y: return wall[index].__wall_pos.Y; case Interp_Wall_Y: return wall[index].pos.Y;
case Interp_Wall_PanX: return wall[index].xpan_; case Interp_Wall_PanX: return wall[index].xpan_;
case Interp_Wall_PanY: return wall[index].ypan_; case Interp_Wall_PanY: return wall[index].ypan_;
@ -74,8 +74,8 @@ void Set(int index, DCoreActor* actor, int type, double val)
case Interp_Sect_CeilingPanX: sector[index].ceilingxpan_ = float(val); break; case Interp_Sect_CeilingPanX: sector[index].ceilingxpan_ = float(val); break;
case Interp_Sect_CeilingPanY: sector[index].ceilingypan_ = float(val); break; case Interp_Sect_CeilingPanY: sector[index].ceilingypan_ = float(val); break;
case Interp_Wall_X: old = wall[index].__wall_pos.X; wall[index].__wall_pos.X = val; if (wall[index].__wall_pos.X != old) wall[index].moved(); break; case Interp_Wall_X: old = wall[index].pos.X; wall[index].pos.X = val; if (wall[index].pos.X != old) wall[index].moved(); break;
case Interp_Wall_Y: old = wall[index].__wall_pos.Y; wall[index].__wall_pos.Y = val; if (wall[index].__wall_pos.Y != old) wall[index].moved(); break; case Interp_Wall_Y: old = wall[index].pos.Y; wall[index].pos.Y = val; if (wall[index].pos.Y != old) wall[index].moved(); break;
case Interp_Wall_PanX: wall[index].xpan_ = float(val); break; case Interp_Wall_PanX: wall[index].xpan_ = float(val); break;
case Interp_Wall_PanY: wall[index].ypan_ = float(val); break; case Interp_Wall_PanY: wall[index].ypan_ = float(val); break;

View file

@ -361,10 +361,10 @@ struct sectortype
struct walltype struct walltype
{ {
DVector2 __wall_pos; DVector2 pos;
vec2_t wall_int_pos() const { return vec2_t(__wall_pos.X * worldtomap, __wall_pos.Y * worldtomap); }; vec2_t wall_int_pos() const { return vec2_t(pos.X * worldtomap, pos.Y * worldtomap); };
void setPosFromLoad(int x, int y) { __wall_pos = { x * maptoworld, y * maptoworld }; } void setPosFromLoad(int x, int y) { pos = { x * maptoworld, y * maptoworld }; }
int32_t point2; int32_t point2;
int32_t nextwall; int32_t nextwall;
@ -555,8 +555,8 @@ inline void walltype::moved()
inline void walltype::move(int newx, int newy) inline void walltype::move(int newx, int newy)
{ {
__wall_pos.X = newx * maptoworld; pos.X = newx * maptoworld;
__wall_pos.Y = newy * maptoworld; pos.Y = newy * maptoworld;
lengthflags = 3; lengthflags = 3;
sectorp()->dirty = EDirty::AllDirty; sectorp()->dirty = EDirty::AllDirty;
} }

View file

@ -415,8 +415,8 @@ void HWDrawInfo::CreateScene(bool portal)
for (auto w = 0; w < sect->wallnum; w++) for (auto w = 0; w < sect->wallnum; w++)
{ {
auto wal = sect->firstWall() + w; auto wal = sect->firstWall() + w;
wal->__wall_pos.X += eff.geox[i]; wal->pos.X += eff.geox[i];
wal->__wall_pos.Y += eff.geoy[i]; wal->pos.Y += eff.geoy[i];
} }
sect->dirty = EDirty::AllDirty; sect->dirty = EDirty::AllDirty;
if (eff.geosector[i] == drawsectp) drawsectp = eff.geosectorwarp[i]; if (eff.geosector[i] == drawsectp) drawsectp = eff.geosectorwarp[i];
@ -434,8 +434,8 @@ void HWDrawInfo::CreateScene(bool portal)
for (auto w = 0; w < sect->wallnum; w++) for (auto w = 0; w < sect->wallnum; w++)
{ {
auto wal = sect->firstWall() + w; auto wal = sect->firstWall() + w;
wal->__wall_pos.X -= eff.geox[i]; wal->pos.X -= eff.geox[i];
wal->__wall_pos.Y -= eff.geoy[i]; wal->pos.Y -= eff.geoy[i];
} }
} }
@ -447,8 +447,8 @@ void HWDrawInfo::CreateScene(bool portal)
for (auto w = 0; w < sect->wallnum; w++) for (auto w = 0; w < sect->wallnum; w++)
{ {
auto wal = sect->firstWall() + w; auto wal = sect->firstWall() + w;
wal->__wall_pos.X += eff.geox2[i]; wal->pos.X += eff.geox2[i];
wal->__wall_pos.Y += eff.geoy2[i]; wal->pos.Y += eff.geoy2[i];
} }
sect->dirty = EDirty::AllDirty; sect->dirty = EDirty::AllDirty;
if (eff.geosector[i] == orgdrawsectp) drawsectp = eff.geosectorwarp2[i]; if (eff.geosector[i] == orgdrawsectp) drawsectp = eff.geosectorwarp2[i];
@ -465,8 +465,8 @@ void HWDrawInfo::CreateScene(bool portal)
for (auto w = 0; w < sect->wallnum; w++) for (auto w = 0; w < sect->wallnum; w++)
{ {
auto wal = sect->firstWall() + w; auto wal = sect->firstWall() + w;
wal->__wall_pos.X -= eff.geox2[i]; wal->pos.X -= eff.geox2[i];
wal->__wall_pos.Y -= eff.geoy2[i]; wal->pos.Y -= eff.geoy2[i];
} }
} }
ingeo = false; ingeo = false;

View file

@ -606,8 +606,8 @@ FSerializer &Serialize(FSerializer &arc, const char *key, walltype &c, walltype
{ {
if (arc.BeginObject(key)) if (arc.BeginObject(key))
{ {
arc("x", c.__wall_pos.X, def->__wall_pos.X) arc("x", c.pos.X, def->pos.X)
("y", c.__wall_pos.Y, def->__wall_pos.Y) ("y", c.pos.Y, def->pos.Y)
("point2", c.point2, def->point2) ("point2", c.point2, def->point2)
("nextwall", c.nextwall, def->nextwall) ("nextwall", c.nextwall, def->nextwall)
("nextsector", c.nextsector, def->nextsector) ("nextsector", c.nextsector, def->nextsector)

View file

@ -220,14 +220,14 @@ void DrawMirrors(int x, int y, int z, fixed_t a, fixed_t horiz, int smooth, int
pWall->nextsector = mirrorsector; pWall->nextsector = mirrorsector;
wallarr[mirrorwall[0]].nextwall = nWall; wallarr[mirrorwall[0]].nextwall = nWall;
wallarr[mirrorwall[0]].nextsector = nSector; wallarr[mirrorwall[0]].nextsector = nSector;
wallarr[mirrorwall[0]].__wall_pos.X = pWall->point2Wall()->__wall_pos.X; wallarr[mirrorwall[0]].pos.X = pWall->point2Wall()->pos.X;
wallarr[mirrorwall[0]].__wall_pos.Y = pWall->point2Wall()->__wall_pos.Y; wallarr[mirrorwall[0]].pos.Y = pWall->point2Wall()->pos.Y;
wallarr[mirrorwall[1]].__wall_pos.X = pWall->__wall_pos.X; wallarr[mirrorwall[1]].pos.X = pWall->pos.X;
wallarr[mirrorwall[1]].__wall_pos.Y = pWall->__wall_pos.Y; wallarr[mirrorwall[1]].pos.Y = pWall->pos.Y;
wallarr[mirrorwall[2]].__wall_pos.X = wallarr[mirrorwall[1]].__wall_pos.X + (wallarr[mirrorwall[1]].__wall_pos.X - wallarr[mirrorwall[0]].__wall_pos.X) * 16; wallarr[mirrorwall[2]].pos.X = wallarr[mirrorwall[1]].pos.X + (wallarr[mirrorwall[1]].pos.X - wallarr[mirrorwall[0]].pos.X) * 16;
wallarr[mirrorwall[2]].__wall_pos.Y = wallarr[mirrorwall[1]].__wall_pos.Y + (wallarr[mirrorwall[1]].__wall_pos.Y - wallarr[mirrorwall[0]].__wall_pos.Y) * 16; wallarr[mirrorwall[2]].pos.Y = wallarr[mirrorwall[1]].pos.Y + (wallarr[mirrorwall[1]].pos.Y - wallarr[mirrorwall[0]].pos.Y) * 16;
wallarr[mirrorwall[3]].__wall_pos.X = wallarr[mirrorwall[0]].__wall_pos.X + (wallarr[mirrorwall[0]].__wall_pos.X - wallarr[mirrorwall[1]].__wall_pos.X) * 16; wallarr[mirrorwall[3]].pos.X = wallarr[mirrorwall[0]].pos.X + (wallarr[mirrorwall[0]].pos.X - wallarr[mirrorwall[1]].pos.X) * 16;
wallarr[mirrorwall[3]].__wall_pos.Y = wallarr[mirrorwall[0]].__wall_pos.Y + (wallarr[mirrorwall[0]].__wall_pos.Y - wallarr[mirrorwall[1]].__wall_pos.Y) * 16; wallarr[mirrorwall[3]].pos.Y = wallarr[mirrorwall[0]].pos.Y + (wallarr[mirrorwall[0]].pos.Y - wallarr[mirrorwall[1]].pos.Y) * 16;
sector.Data()[mirrorsector].setfloorz(sector[nSector].floorz, true); sector.Data()[mirrorsector].setfloorz(sector[nSector].floorz, true);
sector.Data()[mirrorsector].setceilingz(sector[nSector].ceilingz, true); sector.Data()[mirrorsector].setceilingz(sector[nSector].ceilingz, true);
int cx, cy, ca; int cx, cy, ca;

View file

@ -319,11 +319,11 @@ void setanimatevalue(int type, int index, double value)
break; break;
case anim_vertexx: case anim_vertexx:
wall[index].moved(); wall[index].moved();
wall[index].__wall_pos.X = value * maptoworld; wall[index].pos.X = value * maptoworld;
break; break;
case anim_vertexy: case anim_vertexy:
wall[index].moved(); wall[index].moved();
wall[index].__wall_pos.Y = value * maptoworld; wall[index].pos.Y = value * maptoworld;
break; break;
default: default:
assert(false); assert(false);

View file

@ -95,9 +95,9 @@ static double getvalue(so_interp::interp_data& element)
switch (type) switch (type)
{ {
case soi_wallx: case soi_wallx:
return wall[index].__wall_pos.X; return wall[index].pos.X;
case soi_wally: case soi_wally:
return wall[index].__wall_pos.Y; return wall[index].pos.Y;
case soi_ceil: case soi_ceil:
return sector[index].ceilingz; return sector[index].ceilingz;
case soi_floor: case soi_floor:
@ -134,11 +134,11 @@ static void setvalue(so_interp::interp_data& element, double value)
{ {
case soi_wallx: case soi_wallx:
wall[index].moved(); wall[index].moved();
wall[index].__wall_pos.X = value; wall[index].pos.X = value;
break; break;
case soi_wally: case soi_wally:
wall[index].moved(); wall[index].moved();
wall[index].__wall_pos.Y = value; wall[index].pos.Y = value;
break; break;
case soi_ceil: case soi_ceil:
sector[index].setceilingz((int)value); sector[index].setceilingz((int)value);