docs/tracks.html joins the roster page: all 18 tracks with a plan view, what the console calls them, which scenarios offer them, and how big they are. There are no track maps in the game's files. The console had pictures of them and those pictures did not survive - RPConfig.xml still points at "images/red planet maps/Wiseguy's Wake.bmp" and the folder is gone. So the plans are drawn from the tracks themselves. A map's instance stream places its scenery: 76-byte records carrying a position at +48 and a unit quaternion at +60, a few of them longer, so the reader resyncs on an unexpected class id rather than trusting the stride. The quaternion doubles as a checksum - a mis-read almost never yields a unit one - and 17 of the 18 decode every instance the header promises. Trough gives up 631 of 633 and the card says so. Seen this way the tracks have obvious shapes: Brewer's Bane turns two corners, Tour De Mars is one 23,000-unit run, and both arenas are a regular lattice of obstacles rather than a route at all. The eras come from the resource-file archaeology rather than a guess: 9 tracks shipped in the 4.10 cabinets, headoff and headmf arrived with 4.11, and 7 were built by the community afterwards. Scenario legality is read out of the front end's own kMaps and kFootballMaps, so the page cannot claim a track is offered when the menu does not offer it. tools/pages carries the generators for both reference pages, with a README covering the two formats they read and the id-alignment the listing is needed for. They were scratch scripts until now, which made a committed page harder to regenerate than to rebuild by hand. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
31 lines
959 B
JavaScript
31 lines
959 B
JavaScript
const cards = [...document.querySelectorAll('.trk')];
|
|
const count = document.getElementById('count');
|
|
const search = document.getElementById('search');
|
|
let filter = 'all';
|
|
|
|
function apply() {
|
|
const q = search.value.trim().toLowerCase();
|
|
let shown = 0;
|
|
for (const c of cards) {
|
|
const tags = c.dataset.tags.split(' ');
|
|
const okTag = filter === 'all' || tags.includes(filter);
|
|
const okQ = !q || c.dataset.search.includes(q);
|
|
const on = okTag && okQ;
|
|
c.hidden = !on;
|
|
if (on) shown++;
|
|
}
|
|
count.textContent = shown + ' / ' + cards.length + ' TRACKS';
|
|
document.getElementById('nomatch').hidden = shown > 0;
|
|
}
|
|
|
|
for (const b of document.querySelectorAll('[data-filter]')) {
|
|
b.addEventListener('click', () => {
|
|
filter = b.dataset.filter;
|
|
for (const o of document.querySelectorAll('[data-filter]'))
|
|
o.setAttribute('aria-pressed', String(o === b));
|
|
apply();
|
|
});
|
|
}
|
|
search.addEventListener('input', apply);
|
|
apply();
|