Entry 577
The Root Town as an AreaMap, held by the town's world as WORLD_MAN::GO(0) made it
Documented in The minimap - town, field and dungeon maps, the map button and ShowMap.
Linked from One world, leg 1: the one World with Combat and a Cast, the town's state and logic on it behind a façade.
Files18 in 14 directories
mod.rsride.rscrates/piney-world/src/lib.rscrates/piney-world/src/area/mod.rsmap.rscrates/piney-world/src/map/mod.rscrates/piney-world/src/event/mod.rscrates/piney-world/src/chara/party.rscrates/piney-world/src/grunty/race.rscrates/piney-world/src/field/area.rscrates/piney-world/src/dungeon/mod.rscrates/piney-world/src/story_map/mod.rscrates/piney-world/examples/world_probe.rscrates/piney-game/src/world.rsarea.rssession.rsdocs/engine/map.mdplans/rust-cleanup.mdThe fourth step of "One world, one area system" (plans/rust-cleanup.md):
the Root Town is an area::AreaMap as the field, the dungeon and the story
map are (572), and the town's world holds it as Box<dyn AreaMap>,
made from its def by the registry (TownDef::of, Town::build) as
WORLD_MAN::GO(0) makes a ROOTTOWN0n. World::town() and town_mut()
are gone; nothing outside town/ names the Town type but the session
tests' view of Dun Loireag's systems (through <dyn AreaMap>::get, a test).
Nothing drawn or played changed.
What the town answers
core/core_mut: itsAreaCore, which every use of the town's file, collision and lights in the town's world now goes through.start:WORLD_MAN::SetCharPosition's town case (INF main 0x001a120c-0x001a13d4): Kite at the town's place (the def's, elseStartPosas the scene before left it,Town::keep_start), andStartPos[1..3]at (+200, +100), (-200, +100) and (0, +300) from him facing as he does, the same arithmetic as a field's (area::map::party_starts; the game writes a slot only if its x is not -1.0, which no caller of the port's sets).clear: the def'sccSys.bgColor.put:fieldrandas its draws leave it and the scroll statics, what the town'sstate_outwrote by hand.disp:ROOTTOWN0n::Draw(its def's steps), the pieces painted, itsccEffs intoDisp.spritesand what its steps started (the airship's smoke and hum) intoDisp.events, as every area's. The world hands it the sameDispthe field world builds; a town's entry control holds no enemies, soccCheckActiveObjectis true for every room, which no town draw reads.marker_file: the town's own file (ccEvMarker2Pos).setup_map/minimap: itsDrawMap'sTownMap, made from the def'sMinimapDefas a field's and a dungeon's map are, drawn throughmap::area_frame(town_minimap); the Flag Race's riders come in theMapFrame(race). The town's mode held the map before.
written (the dummies the Event NPC turned, 406) moved from Town to
AreaCore: it belongs to the loaded file, whatever area holds it. The
town's number is game.town (Scene::town) wherever the world read the
def's no; the window's title takes the name from TownDef::of.
Checked
The full harness on the four volumes (60 runs) as the baseline at b95f324;
the golden shots, 4548 files, none differ; the crates' tests and the
piney-game suite pass; clippy and fmt clean; too_many_arguments 141 (was
142: town_frame went), dead_code 0.
Still unknown: nothing