mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 00:02:23 +02:00
G2 support
This commit is contained in:
@@ -413,6 +413,18 @@ function Music.oneShotPlaying()
|
||||
return state.pendingRestore == true
|
||||
end
|
||||
|
||||
-- The label of the song that is current, or nil. A read-only window on the
|
||||
-- state, for drivers and tests that need to assert what is playing.
|
||||
function Music.current()
|
||||
return state.current
|
||||
end
|
||||
|
||||
-- The remembered map song (wMapMusic), the same read-only window: what a
|
||||
-- battle's restore will replay. setMapSong below is the write half.
|
||||
function Music.mapSong()
|
||||
return state.mapSong
|
||||
end
|
||||
|
||||
function Music.restoreMap(data)
|
||||
state.current = nil
|
||||
state.pendingRestore = nil
|
||||
@@ -420,6 +432,14 @@ function Music.restoreMap(data)
|
||||
if play then Music.play(data, play, nil, { reason = "map" }) end
|
||||
end
|
||||
|
||||
-- Overwrite the remembered map song without playing anything: the wMapMusic
|
||||
-- write in pokegold engine/pokegear/pokegear.asm RadioMusicRestartDE. A radio
|
||||
-- station's song becomes the map music itself, so a battle's restoreMap brings
|
||||
-- the STATION back and only the next playMap (a map change) replaces it.
|
||||
function Music.setMapSong(song)
|
||||
state.mapSong = song
|
||||
end
|
||||
|
||||
-- 0-7 music volume (0 mutes), applied to the playing song and the
|
||||
-- queued loop body as well as everything played later
|
||||
function Music.setVolumeLevel(level)
|
||||
|
||||
Reference in New Issue
Block a user