jevsnes.git / packages / alttp / CLAUDE.md

For agents, on top of README.md, which they read first.

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