Port the Pokédex list, entries and tab (#35)
The start menu's POKéDEX runs Pokedex in New mode: the list up to the last seen Pokémon, its cursor and page moves, and DisplayDexEntry with the category, number, footprint, and the height, weight and pages once caught. The Pokédex tab shows the same records from the loaded game. Order, entries and footprints are compared with the pinned PRET source. AREA, CRY, PRNT, the option and search screens, Old and A to Z modes and Unown mode remain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
03aa913a94
commit
cdee576818
20 files changed
+1624
-29
No files matched your search
+17
-6
@@ -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 | Not started (current-area minimap only) |
|
||||
| 5. World map and Pokédex | Early (Pokédex list, entries and tab) |
|
||||
| 6. Internet Link and friends | Not started |
|
||||
| 7. Optional Pokéwalker-style egg assistance | Not started |
|
||||
|
||||
@@ -37,7 +37,7 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
- Original initial event flags, readable signs, bedroom radio, bookshelves and supported conversations. Unknown interactions abort without committing partial changes.
|
||||
- Native DOM dialogue, name/avatar choice, touch/keyboard controls and pause/resume. (The name and character are now chosen in the introduction; see below.)
|
||||
- A minimal Crystal-style shell with Game, Savegames, Map, Pokédex, Link and Friends tabs across the top. The game uses the available native canvas, and leaving Game releases input and pauses play.
|
||||
- Existing save, backup export and backup import actions in Savegames. Map shares a live local minimap with the game and shows the current supported area, player position and coordinates. Pokédex, Link and Friends are clearly marked as planned rather than populated with placeholder data.
|
||||
- Existing save, backup export and backup import actions in Savegames. Map shares a live local minimap with the game and shows the current supported area, player position and coordinates. Link and Friends are clearly marked as planned rather than populated with placeholder data. (The Pokédex tab now shows the game's records; see the Pokédex section.)
|
||||
- Native JSON state inside the backup envelope, separate IndexedDB storage and a separate tab lock. No emulator snapshot or cartridge save migration is implied.
|
||||
- Synthetic tests, local-ROM tests, browser checks, and comparisons against the original decompression routine running in the reference emulator.
|
||||
- Native production output excludes the emulator and original game assets.
|
||||
@@ -165,7 +165,7 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
|
||||
## Implemented: the start menu, party menu and pack
|
||||
|
||||
- Start opens `StartMenu` with the items `SetUpMenuItems` lists for the player's progress (POKéDEX, POKéMON, PACK, POKéGEAR, the player's name, SAVE, OPTION, EXIT) and their ROM descriptions. POKéDEX gives a notice (POKéGEAR, the trainer card and OPTION run since the sections below); SAVE points to the automatic session saves.
|
||||
- Start opens `StartMenu` with the items `SetUpMenuItems` lists for the player's progress (POKéDEX, POKéMON, PACK, POKéGEAR, the player's name, SAVE, OPTION, EXIT) and their ROM descriptions. POKéDEX opens the Pokédex (see the Pokédex section below; POKéGEAR, the trainer card and OPTION run since the sections below); SAVE points to the automatic session saves.
|
||||
- POKéMON: the party menu with the ROM's prompts and `GetMonSubmenuItems`: field moves the Pokémon knows (from `MonMenuOptions`), STATS, SWITCH, MOVE, ITEM or MAIL, and CANCEL when there is room. STATS opens the stats screen; SWITCH asks "Move to where?" and swaps the two Pokémon; MOVE (`MoveScreenLoop`) swaps two moves with their PP; ITEM gives an item from the pack (key items and untossable items "can't be held"), swaps it with the held item or takes it back, with the pack-full checks of `TryGiveItemToPartymon` and `TakePartyItem`.
|
||||
- PACK: the Items, Balls, Key and TM pockets (left and right change pockets; there are no TMs or HMs yet), and each item's submenu chosen by its permissions and field menu (`USE`, `GIVE`, `TOSS`, `SEL`, `QUIT`). TOSS asks how many and confirms. USE follows `UseItem`: Oak's warning without a field use, "You don't have a POKéMON!" for party items without one, and `_DoItemEffect` by the item's `ItemEffects` address: Potions and the other `HealingHPAmounts` items, status healers, Full Restore, Revive and Max Revive, the bitter Energypowder, Energy Root, Heal Powder and Revival Herb, Ethers, Elixers, the MysteryBerry and PP Up. The Bicycle closes the menu and runs `Script_GetOnBike` or `Script_GetOffBike` outdoors; elsewhere Oak objects, because `wFieldMoveSucceeded` shares `wItemEffectSucceeded`'s byte.
|
||||
- PP Up keeps a quirk: `wUsePPUp` shares `wTempPP`'s byte, so `ComputeMaxPP` adds one step (a fifth of the base PP, at most 7) to the current PP as well as the maximum. Sketch and moves with three PP Ups are "maxed out".
|
||||
@@ -218,6 +218,15 @@ The numbered sections below keep their full scope. Each one opens with a checkli
|
||||
- `wGameTime` is new: `GameTimer` counts 60 frames to the second, two per overworld tick, from the end of the introduction through scenes, menus and battles, and caps at 999:59:59. A save made during a scene keeps the current play time; everything else in it is still the state before the scene. Save format 3 gained `gameTime`, migrated by absence to zero. The save screen and the Hall of Fame, which pause it in the original, are not ported.
|
||||
- The labels drawn as tiles ("ID NO", "STATUS" and "BADGES") are presented as text; the other strings come from the ROM.
|
||||
|
||||
## Implemented: the Pokédex
|
||||
|
||||
- POKéDEX in the start menu runs `Pokedex` in New mode and returns to the start menu. `StartMenu_Pokedex` needs a party. The list follows `NewPokedexOrder` up to the last seen Pokémon (`.FindLastSeen`), seven rows at a time. Unseen rows show `NameNotSeen` ("-----") and owned ones the ball. The picture beside the list is the selected Pokémon or `LoadQuestionMarkPic`, in `PokedexQuestionMarkPalette`, with the SEEN and OWN counts.
|
||||
- Up and down move a row and left and right a page, as `Pokedex_ListingHandleDPadInput` does. A opens a seen Pokémon's entry and B leaves. The cursor reopens on `wPrevDexEntry` through `Pokedex_InitCursorPosition`. `wPrevDexEntry` lives with the menu cursors in the world's memory, survives battles and is not saved.
|
||||
- `DisplayDexEntry` shows the name, category and number of every seen Pokémon. The height, weight and page text appear only once it is caught; otherwise `.Height` and `.Weight` keep their question marks. The picture takes the species' palette, and the footprint comes from `Footprints`. Left and right move the arrow over PAGE, AREA, CRY and PRNT without wrapping. A on PAGE turns the page. Up and down step to the previous or next seen Pokémon, back on page 1 with the arrow on PAGE. B returns to the list where the entries left the cursor.
|
||||
- The Pokédex tab reads the loaded game's state. It lists New mode's order up to the last seen Pokémon and shows a selected entry with the same rules: unseen Pokémon stay unnamed, and uncaught ones show no measurements or text. Without a ROM or before the Pokédex is received, it says so.
|
||||
- `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 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`.
|
||||
@@ -335,7 +344,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 screen, 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, Pokédex records, 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, a Johto/Kanto atlas, online Link, friends and real-world steps come later.
|
||||
|
||||
## 1. Complete the overworld foundation
|
||||
|
||||
@@ -450,7 +459,7 @@ Acceptance: main-game/postgame playthroughs, representative optional content, ba
|
||||
- [x] Mom's bank: the amount box with its digit cursor, on keyboard, D-pad and on-screen buttons
|
||||
- [x] Trainer card: both pages, with the ROM's card picture, leader faces and animated badges
|
||||
- [x] Options screen, with the battle style and menu account in effect
|
||||
- [ ] Pokédex screen
|
||||
- [x] Pokédex screen: New mode list and entries
|
||||
- [ ] Scalable text, configurable controls and fuller accessibility
|
||||
- [ ] Save slots with migration, atomic writes and import previews
|
||||
- [ ] Installable web app with offline app shell, safe updates and quota handling
|
||||
@@ -475,7 +484,9 @@ 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
|
||||
- [ ] Pokédex tab with ROM-derived records and habitat views
|
||||
- [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
|
||||
|
||||
Promote the current-area minimap into a Johto/Kanto atlas after all map groups, connections and location names can be decoded from the selected ROM. Derive region geometry, visited areas, player location and Fly destinations from native map and story state. Do not ship copied map artwork or claim navigation through maps whose collisions and events are still unsupported.
|
||||
|
||||
|
||||
Reference in new issue
Block a user