summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 16:37:47 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-03 16:37:47 -0400
commit9878f01e29b1443d6c894c1332cbf381fa12646e (patch)
tree8e763ca94f2b90faaa470416055c320dbdb89cbf /scripts
parentccb01731fe8cd44ae4c8840ee8ddc02e6bdea97e (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 'scripts')
-rwxr-xr-xscripts/CeruleanCity.asm4
-rwxr-xr-xscripts/OaksLab.asm4
-rwxr-xr-xscripts/PalletTown.asm4
-rwxr-xr-xscripts/PewterPokecenter.asm3
-rwxr-xr-xscripts/PokemonTower2F.asm4
-rwxr-xr-xscripts/Route22.asm10
-rwxr-xr-xscripts/SSAnne2F.asm4
-rwxr-xr-xscripts/SSAnneCaptainsRoom.asm2
-rwxr-xr-xscripts/SilphCo7F.asm4
-rwxr-xr-xscripts/VermilionDock.asm2
10 files changed, 21 insertions, 20 deletions
diff --git a/scripts/CeruleanCity.asm b/scripts/CeruleanCity.asm
index 117ec4da..94ec2496 100755
--- a/scripts/CeruleanCity.asm
+++ b/scripts/CeruleanCity.asm
@@ -64,7 +64,7 @@ CeruleanCityScript0:
ld a, [wWalkBikeSurfState]
and a
jr z, .asm_19512
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
.asm_19512
@@ -171,7 +171,7 @@ CeruleanCityScript2:
ld a, $1
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm
index 11abdf65..79de99ff 100755
--- a/scripts/OaksLab.asm
+++ b/scripts/OaksLab.asm
@@ -510,7 +510,7 @@ OaksLabScript15:
xor a
ld [hJoyHeld], a
call EnableAutoTextBoxDrawing
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
@@ -611,7 +611,7 @@ OaksLabScript16:
xor a ; NPC_MOVEMENT_DOWN
call FillMemory
ld [hl], $ff
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
diff --git a/scripts/PalletTown.asm b/scripts/PalletTown.asm
index 5ad7d40f..4c6ab015 100755
--- a/scripts/PalletTown.asm
+++ b/scripts/PalletTown.asm
@@ -27,8 +27,8 @@ PalletTownScript0:
ld [hJoyHeld], a
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
- ld a, $FF
- call PlaySound ; stop music
+ ld a, SFX_STOP_ALL_MUSIC
+ call PlaySound
ld a, BANK(Music_MeetProfOak)
ld c, a
ld a, MUSIC_MEET_PROF_OAK ; “oak appears” music
diff --git a/scripts/PewterPokecenter.asm b/scripts/PewterPokecenter.asm
index 22d2fb6b..be933fee 100755
--- a/scripts/PewterPokecenter.asm
+++ b/scripts/PewterPokecenter.asm
@@ -21,7 +21,8 @@ PewterJigglypuffText:
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
ld hl, .Text
call PrintText
- StopAllMusic
+ ld a, SFX_STOP_ALL_MUSIC
+ call PlaySound
ld c, 32
call DelayFrames
ld hl, JigglypuffFacingDirections
diff --git a/scripts/PokemonTower2F.asm b/scripts/PokemonTower2F.asm
index 81f4c0b3..94916e37 100755
--- a/scripts/PokemonTower2F.asm
+++ b/scripts/PokemonTower2F.asm
@@ -22,7 +22,7 @@ PokemonTower2Script0:
ld hl, CoordsData_6055e
call ArePlayerCoordsInArray
ret nc
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_MeetRival)
@@ -76,7 +76,7 @@ PokemonTower2Script1:
ld a, $1
ld [H_SPRITEINDEX], a
call MoveSprite
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
diff --git a/scripts/Route22.asm b/scripts/Route22.asm
index 7226e509..1fd7e09a 100755
--- a/scripts/Route22.asm
+++ b/scripts/Route22.asm
@@ -88,7 +88,7 @@ Route22Script0:
ld a, [wWalkBikeSurfState]
and a
jr z, .asm_50f4e
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
.asm_50f4e
@@ -167,7 +167,7 @@ Route22Script2:
ld a, $1
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
@@ -241,11 +241,11 @@ Route22Script_5104e:
ld a, [wWalkBikeSurfState]
and a
jr z, .skipYVisibilityTesta
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
.skipYVisibilityTesta
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateTempo
@@ -326,7 +326,7 @@ Route22Script5:
ld a, $2
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStartAndTempo
diff --git a/scripts/SSAnne2F.asm b/scripts/SSAnne2F.asm
index ba900748..2795d1d1 100755
--- a/scripts/SSAnne2F.asm
+++ b/scripts/SSAnne2F.asm
@@ -24,7 +24,7 @@ SSAnne2Script0:
ld hl, CoordsData_61411
call ArePlayerCoordsInArray
ret nc
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_MeetRival)
@@ -145,7 +145,7 @@ SSAnne2Script2:
ld a, $2
ld [H_SPRITEINDEX], a
call MoveSprite
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
diff --git a/scripts/SSAnneCaptainsRoom.asm b/scripts/SSAnneCaptainsRoom.asm
index de0272e4..5723c32d 100755
--- a/scripts/SSAnneCaptainsRoom.asm
+++ b/scripts/SSAnneCaptainsRoom.asm
@@ -48,7 +48,7 @@ SSAnne7RubText:
cp BANK(Audio3_UpdateMusic)
ld [wAudioSavedROMBank], a
jr nz, .asm_61908
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
ld a, Bank(Music_PkmnHealed)
diff --git a/scripts/SilphCo7F.asm b/scripts/SilphCo7F.asm
index e7594663..84a94c92 100755
--- a/scripts/SilphCo7F.asm
+++ b/scripts/SilphCo7F.asm
@@ -130,7 +130,7 @@ SilphCo7Script0:
ld [wJoyIgnore], a
ld a, PLAYER_DIR_DOWN
ld [wPlayerMovingDirection], a
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
ld c, BANK(Music_MeetRival)
@@ -219,7 +219,7 @@ SilphCo7Script4:
ld a, $f
ld [hSpriteIndexOrTextID], a
call DisplayTextID
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
callba Music_RivalAlternateStart
diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm
index 65b66c52..cc237f8e 100755
--- a/scripts/VermilionDock.asm
+++ b/scripts/VermilionDock.asm
@@ -38,7 +38,7 @@ VermilionDock_Script:
VermilionDock_1db9b:
SetEventForceReuseHL EVENT_SS_ANNE_LEFT
- ld a, $ff
+ ld a, SFX_STOP_ALL_MUSIC
ld [wJoyIgnore], a
ld [wNewSoundID], a
call PlaySound