jevsnes.git / packages / alttp / CLAUDE.md
1@README.md
2
3- A step byte (`$7E0011`) means a different thing in each mode, so `Step::read`
4  takes the mode. Never name a step without one.
5- Several bytes share one step name where the game's table points them at the
6  same routine. That is the table, not a shortcut.
7- A MODE or STEP byte with no name stays `Numbered`/`Unrecognised` and carries
8  its value. Name it only from a dispatch table you have read, and cite the file
9  and lines on the type. The source's own `Overworld_FuncNN` entries are not
10  names.
11- **`Mode::kind` has no wildcard arm and must not grow one.** It is what lets
12  a caller handle every screen the game can put up; a new mode is a compile
13  error there until somebody says which kind it is. That is the whole point.
14- Modes 10 and 11 (`0x0A`/`0x0B`) are the special overworld, not the dark
15  world; light or dark is `$7EF3CA` (`research/`, corrected 2026-09-20).
16- **Freeing Zelda is `$7EF3CC` (`Follower`), not `$7EF3C5` (`Progress`).**
17  The progress byte only becomes 2 when she reaches the Sanctuary; reading the
18  rescue off it made the rescue and the Sanctuary one event (see `Follower`'s
19  doc comment).