diff --git a/data/scripts/story2.lua b/data/scripts/story2.lua index b7e40f3d..958ba2a2 100644 --- a/data/scripts/story2.lua +++ b/data/scripts/story2.lua @@ -206,6 +206,19 @@ M.PALLET_TOWN = { end local function escortToLab(oak) + -- PalletMovementScript_OakMoveLeft (engine/overworld/auto_movement + -- .asm) is shared by Red and Yellow, but only Yellow's copy starts + -- MUSIC_MUSEUM_GUY there (the instant the movement script is + -- armed, before Oak or the player takes a single step); pokered's + -- copy only sets BIT_NO_MAP_MUSIC and leaves whatever was already + -- playing (MUSIC_MEET_PROF_OAK, started when Oak first appears) + -- running uninterrupted all the way into the lab. Until Yellow's + -- switch fires (including the Whew.../Come with me lines right + -- after the Pikachu battle) the map's default Pallet Town theme + -- plays, restored by the battle's own exit path. + if yellow then + Music.play(game.data, "Music_MuseumGuy") + end local numSteps = x - 10 if oak and numSteps > 0 then ow:scriptMove(oak, "left", numSteps, function() diff --git a/src/world/OverworldController.lua b/src/world/OverworldController.lua index a345ba6c..9330f879 100644 --- a/src/world/OverworldController.lua +++ b/src/world/OverworldController.lua @@ -453,9 +453,12 @@ function OverworldState:setMap(mapId, x, y, facing, opts) -- walks out of the warp, not beside him (#863) require("src.world.PikachuFollower").onMapEntered(Game, self, opts, true) - -- opts.keepMusic: the Oak-escort warp keeps MUSIC_MEET_PROF_OAK - -- playing into the lab (BIT_NO_MAP_MUSIC in wStatusFlags7); - -- keepMusicOnce is the play_music opts.keep one-shot of the same bit + -- opts.keepMusic: the Oak-escort warp keeps whatever cutscene song is + -- already playing going into the lab instead of cutting to it + -- (BIT_NO_MAP_MUSIC in wStatusFlags7) -- MUSIC_MUSEUM_GUY in Yellow + -- (started in escortToLab when Oak begins walking), MUSIC_MEET_PROF_OAK + -- in Red/Blue (pokered never switches songs for this walk); keepMusicOnce + -- is the play_music opts.keep one-shot of the same bit local keepMusic = (opts and opts.keepMusic) or self.keepMusicOnce self.keepMusicOnce = nil if not keepMusic then