- renamed walltype::pos as preparation for refactoring.

no functional changes here
This commit is contained in:
Christoph Oelckers 2022-01-27 17:29:07 +01:00
parent 1d8a11601d
commit 89ef81da55
53 changed files with 433 additions and 433 deletions

View file

@ -219,10 +219,10 @@ DEFINE_ACTION_FUNCTION(_UserMapMenu, DrawPreview)
int minx = INT_MAX, miny = INT_MAX, maxx = INT_MIN, maxy = INT_MIN;
for (auto& wal : entry->walls)
{
if (wal.pos.X < minx) minx = wal.pos.X;
if (wal.pos.X > maxx) maxx = wal.pos.X;
if (wal.pos.Y < miny) miny = wal.pos.Y;
if (wal.pos.Y > maxy) maxy = wal.pos.Y;
if (wal.wall_int_pos.X < minx) minx = wal.wall_int_pos.X;
if (wal.wall_int_pos.X > maxx) maxx = wal.wall_int_pos.X;
if (wal.wall_int_pos.Y < miny) miny = wal.wall_int_pos.Y;
if (wal.wall_int_pos.Y > maxy) maxy = wal.wall_int_pos.Y;
}
float scalex = float(width) / (maxx - minx);
float scaley = float(height) / (maxy - miny);
@ -238,16 +238,16 @@ DEFINE_ACTION_FUNCTION(_UserMapMenu, DrawPreview)
{
if (wal.nextwall < 0) continue;
auto point2 = &entry->walls[wal.point2];
twod->AddLine(dcenterx + (wal.pos.X - centerx) * scale, dcentery + (wal.pos.Y - centery) * scale,
dcenterx + (point2->pos.X - centerx) * scale, dcentery + (point2->pos.Y - centery) * scale,
twod->AddLine(dcenterx + (wal.wall_int_pos.X - centerx) * scale, dcentery + (wal.wall_int_pos.Y - centery) * scale,
dcenterx + (point2->wall_int_pos.X - centerx) * scale, dcentery + (point2->wall_int_pos.Y - centery) * scale,
-1, -1, INT_MAX, INT_MAX, 0xff808080);
}
for (auto& wal : entry->walls)
{
if (wal.nextwall >= 0) continue;
auto point2 = &entry->walls[wal.point2];
twod->AddLine(dcenterx + (wal.pos.X - centerx) * scale, dcentery + (wal.pos.Y - centery) * scale,
dcenterx + (point2->pos.X - centerx) * scale, dcentery + (point2->pos.Y - centery) * scale,
twod->AddLine(dcenterx + (wal.wall_int_pos.X - centerx) * scale, dcentery + (wal.wall_int_pos.Y - centery) * scale,
dcenterx + (point2->wall_int_pos.X - centerx) * scale, dcentery + (point2->wall_int_pos.Y - centery) * scale,
-1, -1, INT_MAX, INT_MAX, 0xffffffff);
}
return 0;