diff options
Diffstat (limited to 'engine')
-rwxr-xr-x | engine/battle/animations.asm | 18 | ||||
-rw-r--r-- | engine/battle/common_text.asm | 4 | ||||
-rwxr-xr-x | engine/battle/core.asm | 16 | ||||
-rwxr-xr-x | engine/battle/end_of_battle.asm | 2 | ||||
-rwxr-xr-x | engine/cable_club.asm | 16 | ||||
-rwxr-xr-x | engine/evolution.asm | 6 | ||||
-rwxr-xr-x | engine/hall_of_fame.asm | 8 | ||||
-rwxr-xr-x | engine/hidden_object_functions7.asm | 6 | ||||
-rwxr-xr-x | engine/intro.asm | 6 | ||||
-rwxr-xr-x | engine/items/items.asm | 8 | ||||
-rwxr-xr-x | engine/menu/pokedex.asm | 4 | ||||
-rwxr-xr-x | engine/menu/status_screen.asm | 4 | ||||
-rwxr-xr-x | engine/oak_speech.asm | 10 | ||||
-rwxr-xr-x | engine/overworld/elevator.asm | 2 | ||||
-rwxr-xr-x | engine/overworld/healing_machine.asm | 40 | ||||
-rwxr-xr-x | engine/overworld/npc_movement.asm | 12 | ||||
-rwxr-xr-x | engine/overworld/pokecenter.asm | 12 | ||||
-rwxr-xr-x | engine/slot_machine.asm | 4 | ||||
-rwxr-xr-x | engine/titlescreen.asm | 6 |
19 files changed, 92 insertions, 92 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index b46842ec..1bd48988 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -772,7 +772,7 @@ DoBallTossSpecialEffects: ; 78f3e (1e:4f3e) dec b jr nz,.loop ld a,%00001000 - ld [$ff10],a ; Channel 1 sweep register + ld [rNR10],a ; Channel 1 sweep register ret .isTrainerBattle ; if it's a trainer battle, shorten the animation by one frame ld a,[W_SUBANIMCOUNTER] @@ -2335,19 +2335,19 @@ GetMoveSound: ; 7986f (1e:586f) call GetCryData ld b,a pop hl - ld a,[wc0f1] + ld a,[wFrequencyModifier] add [hl] - ld [wc0f1],a + ld [wFrequencyModifier],a inc hl - ld a,[wc0f2] + ld a,[wTempoModifier] add [hl] - ld [wc0f2],a + ld [wTempoModifier],a jr .done .NotCryMove ld a,[hli] - ld [wc0f1],a + ld [wFrequencyModifier],a ld a,[hli] - ld [wc0f2],a + ld [wTempoModifier],a .done ld a,b ret @@ -3029,8 +3029,8 @@ PlayApplyingAttackSound: ; 79e6a (1e:5e6a) ld b, $1 ld c, SFX_NOT_VERY_EFFECTIVE .playSound - ld [wc0f1], a + ld [wFrequencyModifier], a ld a, b - ld [wc0f2], a + ld [wTempoModifier], a ld a, c jp PlaySound diff --git a/engine/battle/common_text.asm b/engine/battle/common_text.asm index a00e9d59..a1afcb75 100644 --- a/engine/battle/common_text.asm +++ b/engine/battle/common_text.asm @@ -61,9 +61,9 @@ PrintBeginningBattleText: ; 58d99 (16:4d99) .playSFX xor a - ld [wc0f1], a + ld [wFrequencyModifier], a ld a, $80 - ld [wc0f2], a + ld [wTempoModifier], a ld a, SFX_SILPH_SCOPE call PlaySound jp WaitForSoundToFinish diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 004859da..22a47908 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -867,12 +867,12 @@ FaintEnemyPokemon: ; 0x3c567 dec a jr z, .wild_win xor a - ld [wc0f1], a - ld [wc0f2], a + ld [wFrequencyModifier], a + ld [wTempoModifier], a ld a, SFX_FAINT_FALL call PlaySoundWaitForCurrent .sfxwait - ld a, [wc02a] + ld a, [wChannelSoundIDs + CH4] cp SFX_FAINT_FALL jr z, .sfxwait ld a, SFX_FAINT_THUD @@ -952,7 +952,7 @@ EnemyMonFaintedText: ; 0x3c63e EndLowHealthAlarm: ; 3c643 (f:4643) xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wc02a], a + ld [wChannelSoundIDs + CH4], a inc a ld [wccf6], a ret @@ -1045,7 +1045,7 @@ TrainerDefeatedText: ; 3c6e9 (f:46e9) PlayBattleVictoryMusic: ; 3c6ee (f:46ee) push af ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySoundWaitForCurrent ld c, BANK(Music_DefeatedTrainer) pop af @@ -1944,7 +1944,7 @@ DrawPlayerHUDAndHPBar: ; 3cd60 (f:4d60) ld [hl], $0 ret z xor a - ld [wc02a], a + ld [wChannelSoundIDs + CH4], a ret .asm_3cde6 ld hl, wLowHealthAlarm @@ -6993,8 +6993,8 @@ _LoadTrainerPic: ; 3f04b (f:704b) ; unreferenced ResetCryModifiers: ; 3f069 (f:7069) xor a - ld [wc0f1], a - ld [wc0f2], a + ld [wFrequencyModifier], a + ld [wTempoModifier], a jp PlaySound ; animates the mon "growing" out of the pokeball diff --git a/engine/battle/end_of_battle.asm b/engine/battle/end_of_battle.asm index c642d206..f1de313c 100755 --- a/engine/battle/end_of_battle.asm +++ b/engine/battle/end_of_battle.asm @@ -46,7 +46,7 @@ EndOfBattle: ; 137aa (4:77aa) .resetVariables xor a ld [wLowHealthAlarm], a ;disable low health alarm - ld [wc02a], a + ld [wChannelSoundIDs + CH4], a ld [W_ISINBATTLE], a ld [W_BATTLETYPE], a ld [W_MOVEMISSED], a diff --git a/engine/cable_club.asm b/engine/cable_club.asm index 078ae5c2..dec18fe3 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -824,12 +824,12 @@ TradeCenter_Trade: add hl, bc ld a, [hl] ld [wTradedEnemyMonSpecies], a - ld a, $a - ld [wMusicHeaderPointer], a + ld a, 10 + ld [wAudioFadeOutControl], a ld a, $2 - ld [wc0f0], a + ld [wAudioSavedROMBank], a ld a, MUSIC_SAFARI_ZONE - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, 100 call DelayFrames @@ -915,12 +915,12 @@ CableClub_Run: ; 5a5f (1:5a5f) inc a ; LINK_STATE_IN_CABLE_CLUB ld [wLinkState], a ld [$ffb5], a - ld a, $a - ld [wMusicHeaderPointer], a + ld a, 10 + ld [wAudioFadeOutControl], a ld a, BANK(Music_Celadon) - ld [wc0f0], a + ld [wAudioSavedROMBank], a ld a, MUSIC_CELADON - ld [wc0ee], a + ld [wNewSoundID], a jp PlaySound EmptyFunc3: ; 5aaf (1:5aaf) diff --git a/engine/evolution.asm b/engine/evolution.asm index 720e77cd..8fbf568a 100755 --- a/engine/evolution.asm +++ b/engine/evolution.asm @@ -8,9 +8,9 @@ EvolveMon: ; 7bde9 (1e:7de9) push af xor a ld [wLowHealthAlarm], a - ld [wc02a], a + ld [wChannelSoundIDs + CH4], a dec a - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, $1 ld [H_AUTOBGTRANSFERENABLED], a @@ -68,7 +68,7 @@ EvolveMon: ; 7bde9 (1e:7de9) .done ld [wcf1d], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, [wcf1d] call PlayCry diff --git a/engine/hall_of_fame.asm b/engine/hall_of_fame.asm index ce1430e3..293c756f 100755 --- a/engine/hall_of_fame.asm +++ b/engine/hall_of_fame.asm @@ -280,9 +280,9 @@ HoFRecordMonInfo: ; 70404 (1c:4404) jp CopyData HoFFadeOutScreenAndMusic: ; 70423 (1c:4423) - ld a, $a - ld [wcfc8], a - ld [wcfc9], a + ld a, 10 + ld [wAudioFadeOutCounterReloadValue], a + ld [wAudioFadeOutCounter], a ld a, $ff - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a jp GBFadeOutToWhite diff --git a/engine/hidden_object_functions7.asm b/engine/hidden_object_functions7.asm index 0753531e..67e75301 100755 --- a/engine/hidden_object_functions7.asm +++ b/engine/hidden_object_functions7.asm @@ -63,14 +63,14 @@ SafariZoneGameStillGoing: ; 1e9ab (7:69ab) SafariZoneGameOver: ; 1e9b0 (7:69b0) call EnableAutoTextBoxDrawing xor a - ld [wMusicHeaderPointer], a + ld [wAudioFadeOutControl], a dec a call PlaySound ld c, BANK(SFX_Safari_Zone_PA) ld a, SFX_SAFARI_ZONE_PA call PlayMusic .asm_1e9c2 - ld a, [wc02a] + ld a, [wChannelSoundIDs + CH4] cp $b9 jr nz, .asm_1e9c2 ld a, TEXT_SAFARI_GAME_OVER @@ -374,7 +374,7 @@ BillsHouseInitiatedText: ; 1ebe2 (7:6be2) db $06 TX_ASM ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld c, 16 call DelayFrames diff --git a/engine/intro.asm b/engine/intro.asm index 154c41fd..572d51fa 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -325,10 +325,10 @@ PlayShootingStar: ; 4188a (10:588a) call DelayFrames .next ld a, BANK(Music_IntroBattle) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, MUSIC_INTRO_BATTLE - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound call IntroClearMiddleOfScreen call ClearSprites diff --git a/engine/items/items.asm b/engine/items/items.asm index a45b9185..84490521 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -856,7 +856,7 @@ ItemUseMedicine: ; dabb (3:5abb) .notFullHP ; if the pokemon's current HP doesn't equal its max HP xor a ld [wLowHealthAlarm],a ;disable low health alarm - ld [wc02a],a + ld [wChannelSoundIDs + CH4],a push hl push de ld bc,32 @@ -1643,7 +1643,7 @@ ItemUsePokeflute: ; e140 (3:6140) call WaitForSoundToFinish ; wait for sound to end callba Music_PokeFluteInBattle ; play in-battle pokeflute music .musicWaitLoop ; wait for music to finish playing - ld a,[wc02c] + ld a,[wChannelSoundIDs + CH6] and a ; music off? jr nz,.musicWaitLoop .skipMusic @@ -1716,8 +1716,8 @@ PlayedFluteHadEffectText: ; e215 (3:6215) ld c, BANK(SFX_Pokeflute) call PlayMusic .musicWaitLoop ; wait for music to finish playing - ld a,[wc028] - cp a,$b8 + ld a,[wChannelSoundIDs + CH2] + cp a, SFX_POKEFLUE jr z,.musicWaitLoop call PlayDefaultMusic ; start playing normal music again .done diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index b5ebd83e..fd8a928d 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -397,7 +397,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld hl,wd72c set 1,[hl] ld a,$33 ; 3/7 volume - ld [$ff24],a + ld [rNR50],a call GBPalWhiteOut ; zero all palettes call ClearScreen ld a,[wd11e] ; pokemon ID @@ -566,7 +566,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2) ld hl,wd72c res 1,[hl] ld a,$77 ; max volume - ld [$ff24],a + ld [rNR50],a ret HeightWeightText: ; 40448 (10:4448) diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index c13d7c85..bc58ba21 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -80,7 +80,7 @@ StatusScreen: ; 12953 (4:6953) ld hl, wd72c set 1, [hl] ld a, $33 - ld [$ff24], a ; Reduce the volume + ld [rNR50], a ; Reduce the volume call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites @@ -430,7 +430,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld hl, wd72c res 1, [hl] ld a, $77 - ld [$ff24], a + ld [rNR50], a call GBPalWhiteOut jp ClearScreen diff --git a/engine/oak_speech.asm b/engine/oak_speech.asm index 98499d7f..566bd880 100755 --- a/engine/oak_speech.asm +++ b/engine/oak_speech.asm @@ -129,12 +129,12 @@ OakSpeech: ; 6115 (1:6115) ld a,[H_LOADEDROMBANK] push af ld a, BANK(Music_PalletTown) - ld [wc0ef],a - ld [wc0f0],a - ld a,$A - ld [wMusicHeaderPointer],a + ld [wAudioROMBank],a + ld [wAudioSavedROMBank],a + ld a, 10 + ld [wAudioFadeOutControl],a ld a,$FF - ld [wc0ee],a + ld [wNewSoundID],a call PlaySound ; stop music pop af ld [H_LOADEDROMBANK],a diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index eb62fee7..05a9cc4e 100755 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -33,7 +33,7 @@ ShakeElevator: ; 7bf15 (1e:7f15) ld a, SFX_SAFARI_ZONE_PA call PlayMusic .musicLoop - ld a, [wc02a] + ld a, [wChannelSoundIDs + CH4] cp $b9 jr z, .musicLoop call UpdateSprites diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index d3513b0d..0c04ff0e 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -15,44 +15,44 @@ AnimateHealingMachine: ; 70433 (1c:4433) ld hl, wOAMBuffer + $84 ld de, PokeCenterOAMData call CopyHealingMachineOAM - ld a, $4 - ld [wMusicHeaderPointer], a + ld a, 4 + ld [wAudioFadeOutControl], a ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound -.asm_70464 - ld a, [wMusicHeaderPointer] - and a - jr nz, .asm_70464 +.waitLoop + ld a, [wAudioFadeOutControl] + and a ; is fade-out finished? + jr nz, .waitLoop ; if not, check again ld a, [wPartyCount] ld b, a -.asm_7046e +.partyLoop call CopyHealingMachineOAM ld a, SFX_HEALING_MACHINE call PlaySound ld c, 30 call DelayFrames dec b - jr nz, .asm_7046e - ld a, [wc0ef] + jr nz, .partyLoop + ld a, [wAudioROMBank] cp BANK(Audio3_UpdateMusic) - ld [wc0f0], a - jr nz, .asm_70495 + ld [wAudioSavedROMBank], a + jr nz, .next ld a, $ff - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, BANK(Music_PkmnHealed) - ld [wc0ef], a -.asm_70495 + ld [wAudioROMBank], a +.next ld a, MUSIC_PKMN_HEALED - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld d, $28 call FlashSprite8Times -.asm_704a2 - ld a, [wc026] - cp MUSIC_PKMN_HEALED - jr z, .asm_704a2 +.waitLoop2 + ld a, [wChannelSoundIDs] + cp MUSIC_PKMN_HEALED ; is the healed music still playing? + jr z, .waitLoop2 ; if so, check gain ld c, 32 call DelayFrames pop af diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 0c01e38c..fa5ac222 100755 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -163,10 +163,10 @@ PewterMuseumGuyMovementScriptPointerTable: ; 1a510 (6:6510) PewterMovementScript_WalkToMuseum: ; 1a514 (6:6514) ld a, BANK(Music_MuseumGuy) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, MUSIC_MUSEUM_GUY - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, [wSpriteIndex] swap a @@ -219,10 +219,10 @@ PewterGymGuyMovementScriptPointerTable: ; 1a57d (6:657d) PewterMovementScript_WalkToGym: ; 1a581 (6:6581) ld a, BANK(Music_MuseumGuy) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a ld a, MUSIC_MUSEUM_GUY - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound ld a, [wSpriteIndex] swap a diff --git a/engine/overworld/pokecenter.asm b/engine/overworld/pokecenter.asm index 5b2e4cbb..f302d994 100755 --- a/engine/overworld/pokecenter.asm +++ b/engine/overworld/pokecenter.asm @@ -24,12 +24,12 @@ DisplayPokemonCenterDialogue_: ; 6fe6 (1:6fe6) predef HealParty callba AnimateHealingMachine ; do the healing machine animation xor a - ld [wMusicHeaderPointer], a - ld a, [wc0f0] - ld [wc0ef], a - ld a, [wd35b] - ld [wcfca], a - ld [wc0ee], a + ld [wAudioFadeOutControl], a + ld a, [wAudioSavedROMBank] + ld [wAudioROMBank], a + ld a, [wMapMusicSoundID] + ld [wLastMusicSoundID], a + ld [wNewSoundID], a call PlaySound ld hl, PokemonFightingFitText call PrintText diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index 3b392dde..b68b9294 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -411,7 +411,7 @@ SlotMachine_CheckForMatches: ; 37588 (d:7588) call PrintText .done xor a - ld [wc002], a + ld [wMuteAudioAndPauseMusic], a ret .rollWheel3DownByOneSymbol call SlotMachine_AnimWheel3 @@ -654,7 +654,7 @@ SlotMachine_PrintPayoutCoins: ; 3775f (d:775f) SlotMachine_PayCoinsToPlayer: ; 3776b (d:776b) ld a, $1 - ld [wc002], a + ld [wMuteAudioAndPauseMusic], a call WaitForSoundToFinish ; Put 1 in the temp coins variable. This value is added to the player's coins diff --git a/engine/titlescreen.asm b/engine/titlescreen.asm index df47275b..17609786 100755 --- a/engine/titlescreen.asm +++ b/engine/titlescreen.asm @@ -18,8 +18,8 @@ SetDefaultNamesBeforeTitlescreen: ; 42b7 (1:42b7) ld [hli], a ld [hl], a ld a, BANK(Music_TitleScreen) - ld [wc0ef], a - ld [wc0f0], a + ld [wAudioROMBank], a + ld [wAudioSavedROMBank], a DisplayTitleScreen: ; 42dd (1:42dd) call GBPalWhiteOut @@ -219,7 +219,7 @@ ENDC call Delay3 call WaitForSoundToFinish ld a, MUSIC_TITLE_SCREEN - ld [wc0ee], a + ld [wNewSoundID], a call PlaySound xor a ld [wcc5b], a |