From c8de2e42e9760597f08d2f7927110c09b1d22f44 Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 22 Sep 2026 04:16:48 +0000 Subject: [PATCH] docs(gb): the module header names the corner the cartridge settled --- .../flysim/crates/flybrain-gb/src/pokemon_red/mapgrid.rs | 7 ++++--- .../crates/flybrain-gb/src/pokemon_red/mapgrid/tests.rs | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid.rs b/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid.rs index a9184ea..d13e630 100644 --- a/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid.rs +++ b/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid.rs @@ -21,9 +21,10 @@ //! cartridge's *blocks* are 4x4 screen tiles; the player moves in *map tiles* of 2x2 screen tiles, //! which is the unit `wXCoord`, the warp table and everything in `macros/` is in. So one block is //! [`TILES_PER_BLOCK`] map tiles each way, and the screen tile a map tile's walkability is read -//! from is the top left of its 2x2 quadrant -- the same corner `_GetTileAndCoordsInFrontOfPlayer` -//! reads at screen `(8, 9)` for the tile the player stands on, which is what -//! [`super::state::map_grid`]'s cross-check against the window predicate proves on a cartridge. +//! from is the **lower** left of its 2x2 quadrant ([`ANCHOR_ROW`]) -- the corner +//! `_GetTileAndCoordsInFrontOfPlayer` reads at screen `(8, 9)` for the tile the player stands on, +//! measured rather than argued and pinned by [`super::state::map_grid`]'s cross-check against the +//! window predicate on a cartridge. //! //! What it does **not** model is what it did not model before: sprites standing on ground (the //! sprite list answers that, and [`super::macros::path::frontier`] reads it), warps that fire on diff --git a/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid/tests.rs b/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid/tests.rs index da7c6c7..4ce210a 100644 --- a/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid/tests.rs +++ b/services/flysim/crates/flybrain-gb/src/pokemon_red/mapgrid/tests.rs @@ -12,7 +12,8 @@ use crate::pokemon_red::macros::state::{Facing, Walkable}; /// four different tile ids. /// /// A block is four screen tiles each way and a map tile is two, so the quadrants are the four -/// corners and the tile a map tile's walkability comes from is the top left of its own quadrant. +/// corners and the tile a map tile's walkability comes from is the lower left of its own quadrant +/// ([`ANCHOR_ROW`], which the cartridge settled). fn blockset() -> Vec { let floor = [FLOOR; 16]; let wall = [WALL; 16];