The surroundings on a plot of their own; the stadium views fill the window

The surroundings no longer show the ground: their fourteen objects stand along
an avenue on their own plot. Both views use the whole width of the window; the
lists on the right are gone, the pointer names a part and its state, and the
card of a chosen part lies over the picture.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-15 08:44:54 +01:00
1 parent 6e3475493f
commit b2500eb7b6
4 files changed
+96 -79

No files matched your search

+5 -5
View File
@@ -552,14 +552,14 @@ int main(int argc, char **argv) try {
require(scene.centres.contains("block:7") && scene.centres.contains("facility:0") && !scene.centres.contains("periphery:0"),
"The stadium's view should offer stands and facilities only");
const auto inside = stadium3d::fixed_camera(false);
const auto whole = stadium3d::draw(scene, inside, 1790, 1600);
const auto again = stadium3d::draw(stadium3d::build(overview, "#aa2233", true), inside, 1790, 1600);
const auto whole = stadium3d::draw(scene, inside, 2612, 1600);
const auto again = stadium3d::draw(stadium3d::build(overview, "#aa2233", true), inside, 2612, 1600);
require(whole.svg == again.svg && whole.svg.size() > 4000, "Stadium model is not drawn the same way twice");
require(std::count_if(whole.anchors.begin(), whole.anchors.end(), [](const auto &a) { return a.id == "facility:0"; }) == 4,
"Each floodlight mast should choose the floodlights");
for (const auto &part : whole.parts)
if (part.id.starts_with("block:"))
require(part.cx > 100 && part.cx < 1690 && part.cy > 100 && part.cy < 1500, "A stand lies outside the fixed camera's picture");
require(part.cx > 100 && part.cx < 2512 && part.cy > 100 && part.cy < 1500, "A stand lies outside the fixed camera's picture");
// the surroundings: every object is a part of its own, and every level draws more
const auto around = stadium3d::build(overview, "#aa2233", true, 1);
require(around.centres.size() == 14 && around.centres.contains("periphery:13") && !around.centres.contains("block:0"),
@@ -569,9 +569,9 @@ int main(int argc, char **argv) try {
grown["periphery"][4]["level"] = 3;
require(stadium3d::build(grown, "#aa2233", true, 1).faces.size() > around.faces.size() + 20,
"Higher levels of road and parking should show more");
const auto outside = stadium3d::draw(around, stadium3d::fixed_camera(true), 1790, 1600);
const auto outside = stadium3d::draw(around, stadium3d::fixed_camera(true), 2612, 1600);
for (const auto &anchor : outside.anchors)
require(anchor.x > 40 && anchor.x < 1750 && anchor.y > 40 && anchor.y < 1560, "An object of the surroundings lies outside the picture");
require(anchor.x > 40 && anchor.x < 2572 && anchor.y > 40 && anchor.y < 1560, "An object of the surroundings lies outside the picture");
}
auto corrupt = layout;
corrupt["objects"]["calendar"]["x"] = 999999;