Entry 474
Root Towns' scroll statics live in the executable's data and carry across visits, log ins and resets, with the arena's, dungeons' and field's; test_evarea_rs passes on all four volumes
Documented in Carmina Gade, Fort Ouph and Lia Fail - ROOTTOWN03, 04 and 05.
Linked from A field's lake and background as the code draws them: the lake's three animations and mirror, the hacked fields' backgrounds, DrawBG's turns and aurora, The minimaps' arrow pulses run on from power-on as the game's statics.
Files24 in 8 directories
save.rslib.rscrates/piney-world/src/town.rstown01.rstown02.rstown03.rstown04.rstown05.rstown06.rslib.rsstory_map.rsfield_world.rsfield_area.rsdungeon_area.rsevarea_b0.rsevarea_sky.rscrates/piney-world/examples/evarea_probe.rscrates/piney-game/src/session.rsdesktop.rscrates/piney-game/src/session/tests/mirror_world.rstools/test_evarea_rs.pydocs/engine/root-towns.mdtown02.mdUNKNOWNS.mdMentioned incrates/piney-game/src/session/tests/mirror_world.rs:520crates/piney-world/examples/field_probe.rs:43
Two items left after worklog 473: tools/test_evarea_rs.py's
test_frames error, and the Root Towns' scroll statics, which the port
started at 0 with each visit.
test_evarea_rs
On a clean worktree of HEAD^ (23bc0d9, its own target), test_frames
errors the same way, KeyError 'arms'. It predates worklogs 472 and 473.
Worklog 378 (86c2571) added arms (ArmsEffect / ClearArmsEffect
from ccPlayer::Main) to the shared world harness's state and to
world_probe, but not to evarea_probe. That probe now reports it as
world_probe does.
The harness then ran on Infection and Mutation but not on Outbreak or Quarantine. Three fixes:
- Stripped vtables. Their executables name no
EVENTAREA02orB0vtable. Where none is named, the check is that the constructor stored one. - Unnamed functions.
EVENTAREAB0::Drawis called through its vtable (+0x08).SwitchLayeris found as the function just beforeDrawthat opens onlw $v1, n($a0). Its field is +0x2b8 on Outbreak, not Infection's +0x2b4. - A port bug. On Outbreak, frame 52 of a random walk gave Kite's
transparency3 ulps off.evarea_probebuilt its player and camera without the disc's volume, so it took Infection's doublesqrtwhere Outbreak's code hassqrt.s. It now builds them asworld_probedoes.
The harness passes in full on all four volumes (7 tests each).
The scroll statics
Each Root Town's DrawBG (and Draw, for its water) scrolls by
function statics:
- Mac Anu:
v$1334(two),u$1841. - Dun Loireag:
v$1346(two),v2$1347,u$1777. - Carmina Gade:
v$1474(two),u$1875. - Fort Ouph:
v$1269(two). - Lia Fail:
v$1244(two),v2$1245. - Quarantine's town 5: three words at gp 0x00279980.
Infection's symbols place every one in main's small data
(0x00378168-0x00378b98), 0 in the image. Outbreak's draws reach the same
kind of gp words (0x00386e98-0x00386ee8). They are not gcmn's data, so
GCMN.PRG's load at log in leaves them, and ccThMother's soft reset
boots nothing. Each scroll goes on from its town's last visit until
power-off.
The same holds for the other draws' statics the port models:
EVENTAREAB0::DrawBG'sv$1597;DUNGEON::DrawWater'su$8862;- the lakes'
DrawBGv$8917; WORLD::DrawBG's skyv$4519. Its first use is guarded byinit$4520, also in main, so it too is 0 once.
The port. SaveState::scroll_statics holds the 22 slots, named in
town::scroll_statics:
- Towns.
RootTown::take_staticsandput_statics;World::enterhands them in andstate_outtakes them back. - The rest. The arena (
StoryMap::take_statics),DungeonAreaandFieldAreatake them as they are made, andFieldWorld::state_outhands them back. - Soft reset.
SaveState::carry_memorycarries them through, withrand(),fieldrandand gcmn's scrolls (until log in).
The desktop's Stage::Setup now boxes its state, which grew past
clippy's size limit.
A sky map's draw while the tasks slept, before its first step, indexed
the clouds a step makes and then put back. It now draws the pieces
before putting the state back. the_sky_maps checks it.
Checks
session::tests::mirror_world::dun_loireags_scrolls_carry_across_visits: Dun Loireag, its words to field 66, Gate Out back. The field carried the town'su$1777. The town back goes on from it, as doesv$1346, and log in leaves the statics. It fails with the town not taking them (u$1777 restarted: 0.46 then 0).save::tests::a_soft_reset_carries_memoryandevarea_b0::tests::the_arenas_scroll_is_the_executables.test_evarea_rson all four volumes;test_town02_rsandtest_town03_rs.- The piney-game suite (331 passed); piney-world, piney-data, piney-fieldui and piney-desktop; clippy and fmt.
ccSys.count at WORLD_MAN::Init on a console: the
frames GCMN.PRG's read takes, which only the drive decides (worklog 473).
The field's other function statics (field_ambient::Statics, TOBJ's
cloth) still carry over in a process-wide store rather than the state.
They behave the same within a run.