mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 19:24:01 +02:00
Play the museum-guy cue during Oak's lab walk in Yellow
Yellow's Pallet Town intro (professor catches the wild Pikachu, then walks the player to the lab) played the map's default Pallet Town theme the whole time instead of the dedicated escort cue. Per pokeyellow's actual scripts: PlayDefaultMusicFadeOutCurrent (run on every battle exit) legitimately restores Pallet Town's theme after the Pikachu demo battle for the Whew.../Come with me lines; the escort cue (MUSIC_MUSEUM_GUY, the same "led by an NPC" theme Pewter's museum guide uses) only starts in PalletMovementScript_OakMoveLeft, the first function of the escort script -- but only in pokeyellow's copy. pokered's copy of that same shared Red/Yellow function only sets BIT_NO_MAP_MUSIC and leaves whatever was already playing (MUSIC_MEET_PROF_OAK) running uninterrupted into the lab. Start Music_MuseumGuy at the top of escortToLab, gated on Yellow so Red/Blue keeps its unchanged behavior, and fix the Oak-escort warp's keepMusic comment to say which song rides the warp in each version.
This commit is contained in:
@@ -206,6 +206,19 @@ M.PALLET_TOWN = {
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function escortToLab(oak)
|
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
|
local numSteps = x - 10
|
||||||
if oak and numSteps > 0 then
|
if oak and numSteps > 0 then
|
||||||
ow:scriptMove(oak, "left", numSteps, function()
|
ow:scriptMove(oak, "left", numSteps, function()
|
||||||
|
|||||||
@@ -453,9 +453,12 @@ function OverworldState:setMap(mapId, x, y, facing, opts)
|
|||||||
-- walks out of the warp, not beside him (#863)
|
-- walks out of the warp, not beside him (#863)
|
||||||
require("src.world.PikachuFollower").onMapEntered(Game, self, opts, true)
|
require("src.world.PikachuFollower").onMapEntered(Game, self, opts, true)
|
||||||
|
|
||||||
-- opts.keepMusic: the Oak-escort warp keeps MUSIC_MEET_PROF_OAK
|
-- opts.keepMusic: the Oak-escort warp keeps whatever cutscene song is
|
||||||
-- playing into the lab (BIT_NO_MAP_MUSIC in wStatusFlags7);
|
-- already playing going into the lab instead of cutting to it
|
||||||
-- keepMusicOnce is the play_music opts.keep one-shot of the same bit
|
-- (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
|
local keepMusic = (opts and opts.keepMusic) or self.keepMusicOnce
|
||||||
self.keepMusicOnce = nil
|
self.keepMusicOnce = nil
|
||||||
if not keepMusic then
|
if not keepMusic then
|
||||||
|
|||||||
Reference in New Issue
Block a user