Paingod's Passage
pain
@@ -217,14 +217,14 @@ h1 em { font-style: normal; color: var(--sys); }244 of 255 placements carry map art; the rest the map screen does not draw either
From 99030e4aacd356f8c66aecc7add3e2c4757dff17 Mon Sep 17 00:00:00 2001
From: Cyd Red Planet 4.12 · plans drawn from RPL4.RES There are no track maps in the game's files — the console had
- pictures of them and those pictures did not survive. So these plans are drawn
- from the tracks themselves: every plan below is that map's own scenery,
- placed where the game places it, viewed from overhead with height
- shown as brightness.Every track,
seen from above
pain
@@ -217,14 +217,14 @@ h1 em { font-style: normal; color: var(--sys); }244 of 255 placements carry map art; the rest the map screen does not draw either
blade
@@ -233,14 +233,14 @@ h1 em { font-style: normal; color: var(--sys); }203 of 216 placements carry map art; the rest the map screen does not draw either
yip
@@ -249,14 +249,14 @@ h1 em { font-style: normal; color: var(--sys); }114 of 127 placements carry map art; the rest the map screen does not draw either
otto
@@ -265,14 +265,14 @@ h1 em { font-style: normal; color: var(--sys); }190 of 203 placements carry map art; the rest the map screen does not draw either
frstrm
@@ -281,14 +281,14 @@ h1 em { font-style: normal; color: var(--sys); }312 of 325 placements carry map art; the rest the map screen does not draw either
wise
@@ -297,14 +297,14 @@ h1 em { font-style: normal; color: var(--sys); }Same footprint and instance count as -- Wiserguy's --
+Same footprint and instance count as -- Wiserguy's --
120 of 133 placements carry map art; the rest the map screen does not draw either
burnt
@@ -313,14 +313,14 @@ h1 em { font-style: normal; color: var(--sys); }240 of 251 placements carry map art; the rest the map screen does not draw either
brewers
@@ -329,14 +329,14 @@ h1 em { font-style: normal; color: var(--sys); }595 of 607 placements carry map art; the rest the map screen does not draw either
lyzlane
@@ -345,14 +345,14 @@ h1 em { font-style: normal; color: var(--sys); }94 of 105 placements carry map art; the rest the map screen does not draw either
headoff
@@ -361,14 +361,14 @@ h1 em { font-style: normal; color: var(--sys); }251 of 264 placements carry map art; the rest the map screen does not draw either
headmf
@@ -377,14 +377,14 @@ h1 em { font-style: normal; color: var(--sys); }263 of 274 placements carry map art; the rest the map screen does not draw either
tourdemars
@@ -393,14 +393,14 @@ h1 em { font-style: normal; color: var(--sys); }595 of 607 placements carry map art; the rest the map screen does not draw either
donut
@@ -409,14 +409,14 @@ h1 em { font-style: normal; color: var(--sys); }314 of 325 placements carry map art; the rest the map screen does not draw either
trough
@@ -425,14 +425,14 @@ h1 em { font-style: normal; color: var(--sys); }631 of 633 instances decoded
+582 of 633 placements carry map art; the rest the map screen does not draw either
rpweekend2014
@@ -441,14 +441,14 @@ h1 em { font-style: normal; color: var(--sys); }678 of 695 placements carry map art; the rest the map screen does not draw either
wiserguys
@@ -457,14 +457,14 @@ h1 em { font-style: normal; color: var(--sys); }Same footprint and instance count as Wiseguy's Wake
+Same footprint and instance count as Wiseguy's Wake
119 of 133 placements carry map art; the rest the map screen does not draw either
demoderb
@@ -473,14 +473,14 @@ h1 em { font-style: normal; color: var(--sys); }438 of 455 placements carry map art; the rest the map screen does not draw either
arena
@@ -489,23 +489,26 @@ h1 em { font-style: normal; color: var(--sys); }678 of 695 placements carry map art; the rest the map screen does not draw either
No track matches that.
-18 tracks: 9 shipped in the 4.10 arcade cabinets, 2 added in 4.11, 7 built by the community afterwards. Each plan
- is the map's instance stream — the scenery the game places — read out of
- assets/RP411/RPL4.RES. Records are 76 bytes carrying a position and a
- unit quaternion, so a placement validates itself and a mis-read cannot pass as a
- building. Extent and relief are the span of those placements in world units, not a
- measured track length: a long thin plan is a point-to-point run, a squat one a
- circuit or an arena.
What is not here: the driving surface. Only placed objects are - stored this way, so a plan shows what lines the route rather than the route itself. +
18 tracks: 9 shipped in the 4.10 arcade cabinets, 2 added
+ in 4.11, 7 built by the community afterwards. Each plan follows
+ NavDisplay::DrawStatic: for every placement in the map's instance
+ stream, look up that model's GaugeImage — a small set of outlines
+ in world units, the same ones the pod's map screen draws — and lay it down
+ rotated and positioned. A placement whose model has no gauge image is skipped here
+ exactly as the map screen skips it, which is why a card can say fewer placements
+ carry map art than the track contains.
So the walls are the canyon walls and the chambers are real chambers, + but there is still no driving surface: the map draws what lines the route, never the + tarmac. Extent and relief are the span of the drawn outlines in world units, so a + long thin plan is a point-to-point run and a squat one a circuit or an arena. Tracks marked NOT IN THE MENU exist in the resource file but the setup screen does not offer them.
Same footprint and instance count as ' + ', '.join(tracks[k]['name'] for k in kin) + '
') if kin else '' - short = ('%d of %d instances decoded
' - % (t['parsed'], t['instances'])) if t['parsed'] != t['instances'] else '' + short = ('%d of %d placements carry map art; the rest the ' + 'map screen does not draw either
' % (t['drawn'], t['instances']) + ) if t['skipped'] else '' art = ('' % (html.escape(t['name']), t['art'], t['aw'], t['ah'])) if t['art'] else '' diff --git a/tools/pages/navmap.py b/tools/pages/navmap.py new file mode 100644 index 0000000..f36124a --- /dev/null +++ b/tools/pages/navmap.py @@ -0,0 +1,142 @@ +"""Recreate the map display's own overhead track drawing. + +NavDisplay::DrawStatic (RP_L4/RPL4GAUG.cpp) walks the static entities, looks +up each one's L4GaugeImage by resource id, and draws it through +localToWorld x worldToView. An entity with no gauge image is skipped. This +does the same thing offline: same outlines, same placements, straight down. + +GaugeImage stream (MUNGA_L4/L4GAUIMA.cpp): + int vertexCount + Point3D vertices[vertexCount] + int LODCount + Scalar LODScales[LODCount] + per LOD: int primitiveCount + per primitive: int type, int colour, int attributes, + int indexCount, int indices[indexCount] +""" +import re, struct + + +def resource_table(res, listing): + rows = [] + for line in open(listing, encoding='latin1'): + m = re.match(r'\s*(\d+)\s+(\d+)?\s*(.*)$', line.rstrip('\n')) + if m and m.group(3).strip(): + rows.append((int(m.group(1)), m.group(3).strip())) + walk, o, n = [], res.find(b'StaticAudioStream\x00') - 8, len(res) + while o + 0x38 <= n: + name = res[o + 8:o + 0x28].split(b'\x00')[0].decode('latin1', 'replace') + addr, size = struct.unpack_from('Red Planet 4.12 · plans drawn from RPL4.RES
There are no track maps in the game's files — the console had - pictures of them and those pictures did not survive. So these plans are drawn - from the tracks themselves: every plan below is that map's own scenery, - placed where the game places it, viewed from overhead with height - shown as brightness.
+ pictures of them and those pictures did not survive. But the game draws one every + race: the map screen in the pod renders the track from above. These plans + are that same drawing, reconstructed outside the game — the same + outlines, from the same placements, straight down. @@ -34,7 +34,7 @@No track matches that.
-{n} tracks: {arcade} shipped in the 4.10 arcade cabinets, {r411} added in 4.11, {later} built by the community afterwards. Each plan
- is the map's instance stream — the scenery the game places — read out of
- assets/RP411/RPL4.RES. Records are 76 bytes carrying a position and a
- unit quaternion, so a placement validates itself and a mis-read cannot pass as a
- building. Extent and relief are the span of those placements in world units, not a
- measured track length: a long thin plan is a point-to-point run, a squat one a
- circuit or an arena.
What is not here: the driving surface. Only placed objects are - stored this way, so a plan shows what lines the route rather than the route itself. +
{n} tracks: {arcade} shipped in the 4.10 arcade cabinets, {r411} added
+ in 4.11, {later} built by the community afterwards. Each plan follows
+ NavDisplay::DrawStatic: for every placement in the map's instance
+ stream, look up that model's GaugeImage — a small set of outlines
+ in world units, the same ones the pod's map screen draws — and lay it down
+ rotated and positioned. A placement whose model has no gauge image is skipped here
+ exactly as the map screen skips it, which is why a card can say fewer placements
+ carry map art than the track contains.
So the walls are the canyon walls and the chambers are real chambers, + but there is still no driving surface: the map draws what lines the route, never the + tarmac. Extent and relief are the span of the drawn outlines in world units, so a + long thin plan is a point-to-point run and a squat one a circuit or an arena. Tracks marked NOT IN THE MENU exist in the resource file but the setup screen does not offer them.