"""Build the map viewer: every track, drawn the way the pod's map draws it. This is a dev tool, not something that ships. It exists to answer "what does the map screen actually show here?" without booting the game, which matters because the answer is not obvious: the engine drops whole objects at low zoom rather than simplifying them, and you cannot see that happen from a static picture. What it reproduces, from the engine: NavDisplay::CalculateBounds (RP_L4/RPL4GAUG.cpp:1587) pixelsPerMeter = (halfWidth<<1) / currentScale metersPerPixel = 1 / pixelsPerMeter LODIndex = metersPerPixel // N = 1.0 pixels/meter L4GaugeImage::Draw (MUNGA_L4/L4GAUIMA.cpp:908) for (i = 0; i < LODCount; ++i) if (LOD_value <= LODScales[i]) break; if (i < LODCount) draw LODList[i]; // else NOT DRAWN AT ALL That last line is the whole point. LODScales ascend, so index 0 is the finest, and when the LOD value runs past the largest scale the object is skipped entirely. Zooming out in this viewer makes objects vanish exactly where the pod makes them vanish. The GPS gauge is the other case: L4GAUGE.CFG has gps(R,ModeAlwaysActive, (125,203),1.0), so its LOD value is pinned at 1.0 by the config and only its scale follows the track. Both modes are here - G switches. Usage: build_mapview.py """ import json, os, re, struct, sys HERE = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.join(HERE, '..', 'pages')) import navmap # noqa: E402 (path first) ROOT = 'c:/VWE/RP412' RES = open(ROOT + '/assets/RP411/RPL4.RES', 'rb').read() LISTING, OUT = sys.argv[1], sys.argv[2] TABLE = navmap.resource_table(RES, LISTING) def gauge_image(addr): """The whole stream, every LOD - not just the finest, which is what the page builder wants and exactly what a viewer must not assume.""" o = addr def i32(): nonlocal o v = struct.unpack_from('