ref: 6d20cf3e80780af15ed15acea2f7feac1ffd9705
parent: bf074f359886707d2ffb2e0b525b03dc7af0fe29
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Tue Jan 16 18:47:45 EST 2018
"CryHeader" → "Cry"; "Cry" → "MonCry"
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -2474,7 +2474,7 @@
; e8b79
-_PlayCryHeader:: ; e8b79
+_PlayCry:: ; e8b79
; Play cry de using parameters:
; CryPitch
; CryLength
--- a/docs/bugs_and_glitches.md
+++ b/docs/bugs_and_glitches.md
@@ -1002,7 +1002,7 @@
call GetCryIndex
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
ret
```
@@ -1011,7 +1011,7 @@
```asm
.Cry: ; 40340
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
ret
```
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -1272,7 +1272,7 @@
.done_cry_tracks
push hl
- call LoadCryHeader
+ call LoadCry
pop hl
jr c, .done
@@ -1309,7 +1309,7 @@
ld a, 1
ld [wStereoPanningMask], a
- callfar _PlayCryHeader
+ callfar _PlayCry
.done
pop af
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -1825,7 +1825,7 @@
ld [wPokemonWithdrawDepositParameter], a
farcall RemoveMonFromPartyOrBox
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
hlcoord 0, 0
lb bc, 15, 8
call ClearBox
@@ -1880,7 +1880,7 @@
ld [wPokemonWithdrawDepositParameter], a
farcall RemoveMonFromPartyOrBox
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
hlcoord 0, 0
lb bc, 15, 8
call ClearBox
@@ -1934,7 +1934,7 @@
jr c, .skip_cry
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
.skip_cry
ld a, [CurPartySpecies]
--- a/engine/breeding.asm
+++ b/engine/breeding.asm
@@ -891,7 +891,7 @@
ld hl, DayCareMon1Text
call PrintText
ld a, [wBreedMon1Species]
- call PlayCry
+ call PlayMonCry
ld a, [wDayCareLady]
bit 0, a
jr z, DayCareMonCursor
@@ -904,7 +904,7 @@
ld hl, DayCareMon2Text
call PrintText
ld a, [wBreedMon2Species]
- call PlayCry
+ call PlayMonCry
ld a, [wDayCareMan]
bit 0, a
jr z, DayCareMonCursor
--- a/engine/events/daycare.asm
+++ b/engine/events/daycare.asm
@@ -1,3 +1,4 @@
+; PrintDayCareText.TextTable indexes
const_def
const DAYCARETEXT_MAN_INTRO
const DAYCARETEXT_MAN_EGG
@@ -13,12 +14,12 @@
const DAYCARETEXT_GENIUSES
const DAYCARETEXT_ASK_WITHDRAW
const DAYCARETEXT_WITHDRAW
+ const DAYCARETEXT_GOT_BACK
const DAYCARETEXT_TOO_SOON
const DAYCARETEXT_PARTY_FULL
const DAYCARETEXT_NOT_ENOUGH_MONEY
const DAYCARETEXT_OH_FINE
const DAYCARETEXT_COME_AGAIN
- const DAYCARETEXT_13
Special_DayCareMan: ; 166d6
ld hl, wDayCareMan
@@ -44,7 +45,7 @@
call DayCare_AskWithdrawBreedMon
jr c, .print_text
farcall RetrievePokemonFromDayCareMan
- call DayCare_TakeMoney_PlayCry
+ call DayCare_GetBackMonForMoney
ld hl, wDayCareMan
res 0, [hl]
res 5, [hl]
@@ -54,7 +55,7 @@
call PrintDayCareText
.cancel
- ld a, DAYCARETEXT_13
+ ld a, DAYCARETEXT_COME_AGAIN
call PrintDayCareText
ret
; 1672a
@@ -83,7 +84,7 @@
call DayCare_AskWithdrawBreedMon
jr c, .print_text
farcall RetrievePokemonFromDayCareLady
- call DayCare_TakeMoney_PlayCry
+ call DayCare_GetBackMonForMoney
ld hl, wDayCareLady
res 0, [hl]
ld hl, wDayCareMan
@@ -94,7 +95,7 @@
call PrintDayCareText
.cancel
- ld a, DAYCARETEXT_13
+ ld a, DAYCARETEXT_COME_AGAIN
call PrintDayCareText
ret
; 16781
@@ -145,7 +146,7 @@
ret
.Declined:
- ld a, DAYCARETEXT_COME_AGAIN
+ ld a, DAYCARETEXT_OH_FINE
scf
ret
@@ -180,7 +181,7 @@
ld a, DAYCARETEXT_DEPOSIT
call PrintDayCareText
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
ld a, DAYCARETEXT_COME_BACK_LATER
call PrintDayCareText
ret
@@ -190,7 +191,7 @@
ld a, [StringBuffer2 + 1]
and a
jr nz, .grew_at_least_one_level
- ld a, DAYCARETEXT_PARTY_FULL
+ ld a, DAYCARETEXT_TOO_SOON
call PrintDayCareText
call YesNoBox
jr c, .refused
@@ -218,22 +219,22 @@
ret
.refused
- ld a, DAYCARETEXT_COME_AGAIN
+ ld a, DAYCARETEXT_OH_FINE
scf
ret
.not_enough_money
- ld a, DAYCARETEXT_OH_FINE
+ ld a, DAYCARETEXT_NOT_ENOUGH_MONEY
scf
ret
.PartyFull:
- ld a, DAYCARETEXT_NOT_ENOUGH_MONEY
+ ld a, DAYCARETEXT_PARTY_FULL
scf
ret
; 16850
-DayCare_TakeMoney_PlayCry: ; 16850
+DayCare_GetBackMonForMoney: ; 16850
ld bc, StringBuffer2 + 2
ld de, Money
farcall TakeMoney
@@ -240,8 +241,8 @@
ld a, DAYCARETEXT_WITHDRAW
call PrintDayCareText
ld a, [CurPartySpecies]
- call PlayCry
- ld a, DAYCARETEXT_TOO_SOON
+ call PlayMonCry
+ ld a, DAYCARETEXT_GOT_BACK
call PrintDayCareText
ret
; 1686d
@@ -283,6 +284,7 @@
; 168aa
.TextTable: ; 168aa
+; entries correspond to DAYCARETEXT_* constants
dw .DayCareManIntro ; 00
dw .DayCareManOddEgg ; 01
dw .DayCareLadyIntro ; 02
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -80,7 +80,7 @@
jr c, .skip_cry
ld a, [wEvolutionOldSpecies]
- call PlayCry
+ call PlayMonCry
.skip_cry
ld de, MUSIC_EVOLUTION
@@ -148,7 +148,7 @@
ret c
ld a, [PlayerHPPal]
- call PlayCry
+ call PlayMonCry
ret
; 4e703
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -754,7 +754,7 @@
text_jump _OakText2
start_asm
ld a, WOOPER
- call PlayCry
+ call PlayMonCry
call WaitSFX
ld hl, OakText3
ret
--- a/engine/pic_animation.asm
+++ b/engine/pic_animation.asm
@@ -249,7 +249,7 @@
PokeAnim_Cry: ; d017a
ld a, [wPokeAnimSpecies]
- call _PlayCry
+ call _PlayMonCry
ld a, [wPokeAnimSceneIndex]
inc a
ld [wPokeAnimSceneIndex], a
@@ -258,7 +258,7 @@
PokeAnim_CryNoWait: ; d0188
ld a, [wPokeAnimSpecies]
- call PlayCry2
+ call PlayMonCry2
ld a, [wPokeAnimSceneIndex]
inc a
ld [wPokeAnimSceneIndex], a
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -346,7 +346,7 @@
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
call Pokedex_IncrementDexPointer
ret
@@ -415,7 +415,7 @@
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
ld hl, wJumptableIndex
dec [hl]
ret
@@ -471,7 +471,7 @@
call GetCryIndex
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
ret
.Print: ; 4034f
@@ -2558,7 +2558,7 @@
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]
- call PlayCry
+ call PlayMonCry
ret
--- a/engine/routines/playslowcry.asm
+++ b/engine/routines/playslowcry.asm
@@ -1,6 +1,6 @@
Special_PlaySlowCry: ; fb841
ld a, [ScriptVar]
- call LoadCryHeader
+ call LoadCry
jr c, .done
ld hl, CryPitch
@@ -23,7 +23,7 @@
ld [CryLength], a
ld a, h
ld [CryLength + 1], a
- farcall _PlayCryHeader
+ farcall _PlayCry
call WaitSFX
.done
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -938,7 +938,7 @@
jr nz, .ok
ld a, [ScriptVar]
.ok
- call PlayCry
+ call PlayMonCry
ret
GetScriptObject:
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -413,7 +413,7 @@
Special_PlayCurMonCry: ; c472
ld a, [CurPartySpecies]
- jp PlayCry
+ jp PlayMonCry
; c478
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -829,7 +829,7 @@
call SetPalettes
call .AnimateMon
ld a, [CurPartySpecies]
- call PlayCry2
+ call PlayMonCry2
ret
.AnimateMon: ; 4e253 (13:6253)
--- a/engine/trade_animation.asm
+++ b/engine/trade_animation.asm
@@ -847,7 +847,7 @@
jr c, .skip_cry
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
.skip_cry
call TradeAnim_AdvanceScriptPointer
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -141,7 +141,7 @@
; 3be3
-PlayCryHeader:: ; 3be3
+PlayCry:: ; 3be3
; Play cry header de.
push hl
@@ -176,11 +176,11 @@
ld a, [hl]
ld [CryLength + 1], a
- ld a, BANK(_PlayCryHeader)
+ ld a, BANK(_PlayCry)
ld [hROMBank], a
ld [MBC3RomBank], a
- call _PlayCryHeader
+ call _PlayCry
pop af
ld [hROMBank], a
--- a/home/cry.asm
+++ b/home/cry.asm
@@ -3,7 +3,7 @@
ld a, 1
ld [wStereoPanningMask], a
pop af
- call _PlayCry
+ call _PlayMonCry
call WaitSFX
ret
; 37c4
@@ -15,16 +15,16 @@
ld a, 1
ld [wStereoPanningMask], a
pop af
- jp _PlayCry
+ jp _PlayMonCry
; 37ce
-PlayCry:: ; 37ce
- call PlayCry2
+PlayMonCry:: ; 37ce
+ call PlayMonCry2
call WaitSFX
ret
; 37d5
-PlayCry2:: ; 37d5
+PlayMonCry2:: ; 37d5
; Don't wait for the cry to end.
push af
xor a
@@ -31,11 +31,11 @@
ld [wStereoPanningMask], a
ld [CryTracks], a
pop af
- call _PlayCry
+ call _PlayMonCry
ret
; 37e2
-_PlayCry:: ; 37e2
+_PlayMonCry:: ; 37e2
push hl
push de
push bc
@@ -45,7 +45,7 @@
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
.done
pop bc
@@ -54,7 +54,7 @@
ret
; 37f3
-LoadCryHeader:: ; 37f3
+LoadCry:: ; 37f3
; Load cry header bc.
call GetCryIndex
--- a/home/text.asm
+++ b/home/text.asm
@@ -1019,7 +1019,7 @@
ld e, [hl]
inc hl
ld d, [hl]
- call PlayCry
+ call PlayMonCry
pop de
pop hl
pop bc
--- a/mobile/mobile_42.asm
+++ b/mobile/mobile_42.asm
@@ -518,7 +518,7 @@
jr c, .skip_cry
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
.skip_cry
ld c, 80
@@ -653,7 +653,7 @@
jr c, .skip_cry
ld e, c
ld d, b
- call PlayCryHeader
+ call PlayCry
.skip_cry
ld c, 80
--- a/mobile/mobile_5f.asm
+++ b/mobile/mobile_5f.asm
@@ -1253,7 +1253,7 @@
dec a
ld e, a
ld d, $0
- call PlayCryHeader
+ call PlayCry
call WaitSFX
call HlToCrashCheckPointer
ret