Entry 503
The console's town changes area the game's way: through the scene's ChangeArea, its event task disabled, so the music holds between towns
11maudio
Filescrates/piney-game/src/session.rsworld.rsarea.rsBUGS.md
Mentioned inBUGS.md:71plans/rust-cleanup.md:334
BUGS.md: the music breaks between towns after the console's town. The
session's own events gave each town its music on field -> Dun Loireag ->
Mac Anu -> Dun Loireag, so the report was left open. It was never told
what was heard or where the jump started.
Every way the jump can go. The town command and the game's own
ChangeArea were compared side by side.
- The game's. Every in-game
ccGame::ChangeAreagoes throughChangeRequest(main 0x001671e0), which callsccDisableThEvent: the event task idles from the next frame until the next set-up'sccEnableThEvent(0). The port's menus do the same:- in a town,
WorldMode'sChangeArearequest disables the VM and marks the mode as leaving; - in a field or dungeon,
FieldWorld::change_areaasks forChangeScene;AreaModethen disables the VM and puts every task but the event's to sleep (ccSleepNoSleepThread). - Gate Out goes these ways.
- in a town,
- The console's (the fault).
townwent straight toSession::go. The scene's event task kept running through the fade and the hold, and a field's tasks did not sleep. A town's or field's next event blocks could start under the change, their sound and music instructions among them.
The fix. town now asks the scene itself:
- in a town,
WorldMode::change_area(the menu's handling, factored out so both use it); - in a field or dungeon, the new
AreaMode::change_area, which callsFieldWorld::change_area, as Gate Out does; - elsewhere it answers as before.
Checked. town_jumps_keep_the_music now takes every way between
Infection's towns:
- from the field to Dun Loireag;
- to the town it is already in;
- to each other town (Mac Anu, Carmina Gadelica, and back);
- a second
town20 frames into an arrival. Each town plays its music afterwards: rms 2556 for Dun Loireag, 5361 for Mac Anu, 5544 for Carmina Gadelica, with the sequences playing. Everytowntest and piney-game's suite (336) pass.
Docs: BUGS.md.
Still unknown: nothing