diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 16:37:47 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-07-03 16:37:47 -0400 |
commit | 9878f01e29b1443d6c894c1332cbf381fa12646e (patch) | |
tree | 8e763ca94f2b90faaa470416055c320dbdb89cbf /engine | |
parent | ccb01731fe8cd44ae4c8840ee8ddc02e6bdea97e (diff) |
Organize macros/ like pokecrystal
While doing so I replaced the StopAllMusic macro with a SFX_STOP_ALL_MUSIC constant and applied it throughout the code.
Diffstat (limited to 'engine')
-rwxr-xr-x | engine/battle/core.asm | 2 | ||||
-rw-r--r-- | engine/events/hidden_objects/bills_house_pc.asm | 2 | ||||
-rw-r--r-- | engine/events/hidden_objects/safari_game.asm | 2 | ||||
-rwxr-xr-x | engine/items/item_effects.asm | 4 | ||||
-rwxr-xr-x | engine/link/cable_club.asm | 4 | ||||
-rwxr-xr-x | engine/movie/credits.asm | 2 | ||||
-rwxr-xr-x | engine/movie/evolution.asm | 4 | ||||
-rwxr-xr-x | engine/movie/oak_speech/oak_speech.asm | 8 | ||||
-rwxr-xr-x | engine/overworld/elevator.asm | 4 | ||||
-rwxr-xr-x | engine/overworld/healing_machine.asm | 4 |
10 files changed, 18 insertions, 18 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 86c3f5e5..647436ff 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -958,7 +958,7 @@ TrainerDefeatedText: PlayBattleVictoryMusic: push af - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySoundWaitForCurrent ld c, BANK(Music_DefeatedTrainer) diff --git a/engine/events/hidden_objects/bills_house_pc.asm b/engine/events/hidden_objects/bills_house_pc.asm index 1ffb6954..836aace0 100644 --- a/engine/events/hidden_objects/bills_house_pc.asm +++ b/engine/events/hidden_objects/bills_house_pc.asm @@ -52,7 +52,7 @@ BillsHouseInitiatedText:: TX_FAR _BillsHouseInitiatedText TX_BLINK TX_ASM - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound ld c, 16 diff --git a/engine/events/hidden_objects/safari_game.asm b/engine/events/hidden_objects/safari_game.asm index 785bab7f..68fc943f 100644 --- a/engine/events/hidden_objects/safari_game.asm +++ b/engine/events/hidden_objects/safari_game.asm @@ -27,7 +27,7 @@ SafariZoneGameOver: call EnableAutoTextBoxDrawing xor a ld [wAudioFadeOutControl], a - dec a + dec a ; SFX_STOP_ALL_MUSIC call PlaySound ld c, BANK(SFX_Safari_Zone_PA) ld a, SFX_SAFARI_ZONE_PA diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index e1723118..1214a3f8 100755 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1844,8 +1844,8 @@ PlayedFluteHadEffectText: and a jr nz, .done ; play out-of-battle pokeflute music - ld a, $ff - call PlaySound ; turn off music + ld a, SFX_STOP_ALL_MUSIC + call PlaySound ld a, SFX_POKEFLUTE ld c, BANK(SFX_Pokeflute) call PlayMusic diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 141ed396..8aadf1e5 100755 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -139,7 +139,7 @@ CableClub_DoBattleOrTradeAgain: call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) ld [rIE], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK @@ -261,7 +261,7 @@ CableClub_DoBattleOrTradeAgain: ld [wUnusedCF8D + 1], a xor a ld [wTradeCenterPointerTableIndex], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index f6900602..dd735df6 100755 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -21,7 +21,7 @@ HallOfFamePC: ld a, %11000000 ld [rBGP], a call EnableLCD - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySoundWaitForCurrent ld c, BANK(Music_Credits) ld a, MUSIC_CREDITS diff --git a/engine/movie/evolution.asm b/engine/movie/evolution.asm index 731735c5..af2ed13b 100755 --- a/engine/movie/evolution.asm +++ b/engine/movie/evolution.asm @@ -9,7 +9,7 @@ EvolveMon: xor a ld [wLowHealthAlarm], a ld [wChannelSoundIDs + Ch5], a - dec a + dec a ; SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound ld a, $1 @@ -67,7 +67,7 @@ EvolveMon: ld a, [wEvoNewSpecies] .done ld [wWholeScreenPaletteMonSpecies], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound ld a, [wWholeScreenPaletteMonSpecies] diff --git a/engine/movie/oak_speech/oak_speech.asm b/engine/movie/oak_speech/oak_speech.asm index b1acfb65..fdcb4778 100755 --- a/engine/movie/oak_speech/oak_speech.asm +++ b/engine/movie/oak_speech/oak_speech.asm @@ -32,8 +32,8 @@ SetDefaultNames: jp CopyData OakSpeech: - ld a, $FF - call PlaySound ; stop music + ld a, SFX_STOP_ALL_MUSIC + call PlaySound ld a, BANK(Music_Routes2) ld c, a ld a, MUSIC_ROUTES2 @@ -133,9 +133,9 @@ OakSpeech: ld [wAudioSavedROMBank], a ld a, 10 ld [wAudioFadeOutControl], a - ld a, $FF + ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a - call PlaySound ; stop music + call PlaySound pop af ld [H_LOADEDROMBANK], a ld [MBC1RomBank], a diff --git a/engine/overworld/elevator.asm b/engine/overworld/elevator.asm index d36e2f2c..05ca08c9 100755 --- a/engine/overworld/elevator.asm +++ b/engine/overworld/elevator.asm @@ -4,7 +4,7 @@ ShakeElevator:: ld de, SCREEN_HEIGHT * $20 call ShakeElevatorRedrawRow call Delay3 - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld a, [hSCY] ld d, a @@ -27,7 +27,7 @@ ShakeElevator:: jr nz, .shakeLoop ld a, d ld [hSCY], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC call PlaySound ld c, BANK(SFX_Safari_Zone_PA) ld a, SFX_SAFARI_ZONE_PA diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 510f963b..836af44d 100755 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -17,7 +17,7 @@ AnimateHealingMachine: call CopyHealingMachineOAM ld a, 4 ld [wAudioFadeOutControl], a - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound .waitLoop @@ -38,7 +38,7 @@ AnimateHealingMachine: cp BANK(Audio3_UpdateMusic) ld [wAudioSavedROMBank], a jr nz, .next - ld a, $ff + ld a, SFX_STOP_ALL_MUSIC ld [wNewSoundID], a call PlaySound ld a, BANK(Music_PkmnHealed) |