Add the Johto and Kanto atlas to the Map tab
Checks / web (push) Failing after 17s
Private ROM checks / private-rom (push) Failing after 14m39s

The Map tab draws the region's Town Map from the ROM with the player's
landmark, the visited flypoints as Fly destinations and the landmarks
whose maps are ported. Kanto opens with the Fly map's Indigo Plateau
rule. Landmark positions and flypoints are compared with the pinned
PRET source.

Closes #36

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
samyandClaude Opus 5.5 committed 2026-10-03 20:34:29 +02:00
1 parent cdee576818
commit 29248172bd
13 files changed
+536 -30

No files matched your search

+11 -3
View File
@@ -21,7 +21,7 @@ The emulator-backed prototype is now at `/reference.html`. The default applicati
| 2. Opening story and first battle slice | Mostly done |
| 3. Complete Crystal | Early |
| 4. Modern mobile presentation and delivery | First increment done |
| 5. World map and Pokédex | Early (Pokédex list, entries and tab) |
| 5. World map and Pokédex | Early (atlas, Pokédex list and entries) |
| 6. Internet Link and friends | Not started |
| 7. Optional Pokéwalker-style egg assistance | Not started |
@@ -227,6 +227,14 @@ The numbered sections below keep their full scope. Each one opens with a checkli
- `tests/pokedex.test.ts` compares the order, all 251 entries and every footprint with the pinned PRET source.
- Not ported: AREA (`Pokedex_GetArea`), CRY (no audio), PRNT (no printer), the option screen (SELECT), the search screen (START), Old and A to Z modes (`wLastDexMode` stays New), Unown mode and the arrow's blink. Screens are native; the strings, entries and graphics come from the ROM.
## Implemented: the region atlas
- The Map tab shows the region's Town Map from the ROM under the local map, in the player's Pokégear palettes. Johto is always available. Kanto becomes available once the player stands there or has visited Indigo Plateau, as `_FlyMap` requires.
- The player's landmark follows `GetWorldMapLocation`, with the backup map's landmark in `LANDMARK_SPECIAL` rooms. The Fast Ship's landmark lies outside both regions, so no marker shows there.
- Visited areas are the visited flypoints (`wVisitedSpawns` through `EngineFlags`). The original records no other visits, so the atlas adds no save data. Visited flypoints are the Fly destinations, listed by their ROM landmark names.
- "Open in this port" lists the landmarks with at least one map in `NATIVE_MAPS`, so the atlas never suggests travel through unported areas.
- `tests/atlas.test.ts` compares every landmark position with `data/maps/landmarks.asm` and the flypoints with `data/maps/flypoints.asm`.
## Implemented: the options
- OPTION in the start menu runs `_Option` and returns to the start menu. The labels come from `StringOptions` and the settings from each routine's strings. Up and down move the ▶ with `OptionsControl`'s wrapping, left and right change the option under it, A on CANCEL, B or Start leaves. Each routine is ported from its bit handling: text speed cycles FAST, MID and SLOW through `GetTextSpeed` (`.Save` keeps only the high nybble), the battle scene, battle style, sound and menu account toggle with either direction, printing cycles through the five `GBPRINTER_*` levels through `GetPrinterSetting`, and the frame wraps through `TYPE 1` to `8`.
@@ -344,7 +352,7 @@ The numbered sections below keep their full scope. Each one opens with a checkli
The battle core, ROM tables, encounter hooks, battle UI and whiteout hooks are present. Unit tests cover wins, escape, loss, experience, move learning and capture; reference tests compare damage, type effectiveness, stat calculation and experience curves. Browser tests drive a test-only wild encounter through the real UI: victory with level-up and move learning, escape, whiteout, catching with a nickname, keyboard and on-screen D-pad menu navigation, mid-battle backup restore, rollback of unsupported effects, switching through the party menu and a Potion from the Items pocket. Real Route 29 encounters now use the ROM's encounter tables. Every ball can be thrown; only the contest's Park Ball handling remains.
This is still not a complete new game. The Pokégear's radio, the Pokédex's area view, search and other modes, story progression beyond Violet City and Falkner's gym, and audio remain unfinished. The start menu opens the party menu and the pack, and Select uses the registered item, such as the Bicycle; the PCs store Pokémon, items and decorations. Surfing and terrain animation now have native implementations; later maps remain gated. Save slots, a Johto/Kanto atlas, online Link, friends and real-world steps come later.
This is still not a complete new game. The Pokégear's radio, the Pokédex's area view, search and other modes, story progression beyond Violet City and Falkner's gym, and audio remain unfinished. The start menu opens the party menu and the pack, and Select uses the registered item, such as the Bicycle; the PCs store Pokémon, items and decorations. Surfing and terrain animation now have native implementations; later maps remain gated. Save slots, online Link, friends and real-world steps come later.
## 1. Complete the overworld foundation
@@ -483,7 +491,7 @@ Acceptance: installation, offline startup, portrait/landscape, touch/audio, back
- [x] Current-area minimap in the game and Map tab
- [x] Seen and caught sets saved from real game state
- [ ] Johto/Kanto atlas with visited areas and Fly destinations
- [x] Johto/Kanto atlas with visited areas and Fly destinations
- [x] Start menu Pokédex and Pokédex tab with ROM-derived records
- [ ] Habitat (AREA) view from the encounter tables
- [ ] Old and A to Z modes, type search and Unown mode