mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Rename predef functions so they aren't excessive in length.
This is mostly because of an rgbasm bug that prevents macro arguments from exceeding 16 characters, but the names were bad anyway.
This commit is contained in:
parent
38ac74f222
commit
35f2bb90d4
|
@ -1,4 +1,4 @@
|
||||||
HallOfFameComputer: ; 7405c (1d:405c)
|
HallOfFamePC: ; 7405c (1d:405c)
|
||||||
callba AnimateHallOfFame
|
callba AnimateHallOfFame
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
ld c, $64
|
ld c, $64
|
||||||
|
|
|
@ -430,6 +430,7 @@ BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
|
||||||
ld [wd09f], a
|
ld [wd09f], a
|
||||||
jr .done2_
|
jr .done2_
|
||||||
|
|
||||||
|
FlashScreen:
|
||||||
BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
|
BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
|
||||||
ld hl, BattleTransition_FlashScreenPalettes
|
ld hl, BattleTransition_FlashScreenPalettes
|
||||||
.loop
|
.loop
|
||||||
|
|
|
@ -241,7 +241,7 @@ Func_3c11e: ; 3c11e (f:411e)
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
call SaveScreenTilesToBuffer1
|
call SaveScreenTilesToBuffer1
|
||||||
.asm_3c14f
|
.asm_3c14f
|
||||||
call AnyPlayerPokemonAliveCheck
|
call AnyPartyAlive
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
jp z, HandlePlayerBlackOut
|
jp z, HandlePlayerBlackOut
|
||||||
|
@ -774,7 +774,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525)
|
||||||
xor a
|
xor a
|
||||||
ld [wccf0], a
|
ld [wccf0], a
|
||||||
call FaintEnemyPokemon
|
call FaintEnemyPokemon
|
||||||
call AnyPlayerPokemonAliveCheck
|
call AnyPartyAlive
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
jp z, HandlePlayerBlackOut
|
jp z, HandlePlayerBlackOut
|
||||||
|
@ -870,7 +870,7 @@ FaintEnemyPokemon ; 0x3c567
|
||||||
jr nz, .playermonnotfaint
|
jr nz, .playermonnotfaint
|
||||||
call Func_3c741
|
call Func_3c741
|
||||||
.playermonnotfaint
|
.playermonnotfaint
|
||||||
call AnyPlayerPokemonAliveCheck
|
call AnyPartyAlive
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
@ -1021,7 +1021,7 @@ HandlePlayerMonFainted: ; 3c700 (f:4700)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wccf0], a
|
ld [wccf0], a
|
||||||
call Func_3c741
|
call Func_3c741
|
||||||
call AnyPlayerPokemonAliveCheck ; test if any more mons are alive
|
call AnyPartyAlive ; test if any more mons are alive
|
||||||
ld a, d
|
ld a, d
|
||||||
and a
|
and a
|
||||||
jp z, HandlePlayerBlackOut
|
jp z, HandlePlayerBlackOut
|
||||||
|
@ -1492,7 +1492,7 @@ TrainerSentOutText: ; 3ca7e (f:4a7e)
|
||||||
|
|
||||||
; tests if the player has any pokemon that are not fainted
|
; tests if the player has any pokemon that are not fainted
|
||||||
; sets d = 0 if all fainted, d != 0 if some mons are still alive
|
; sets d = 0 if all fainted, d != 0 if some mons are still alive
|
||||||
AnyPlayerPokemonAliveCheck: ; 3ca83 (f:4a83)
|
AnyPartyAlive: ; 3ca83 (f:4a83)
|
||||||
ld a, [wPartyCount] ; wPartyCount
|
ld a, [wPartyCount] ; wPartyCount
|
||||||
ld e, a
|
ld e, a
|
||||||
xor a
|
xor a
|
||||||
|
@ -6930,7 +6930,7 @@ asm_3f0d0: ; 3f0d0 (f:70d0)
|
||||||
jr nz, .asm_3f0f4
|
jr nz, .asm_3f0f4
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LoadMonBackSprite:
|
LoadMonBackPic:
|
||||||
; Assumes the monster's attributes have
|
; Assumes the monster's attributes have
|
||||||
; been loaded with GetMonHeader.
|
; been loaded with GetMonHeader.
|
||||||
ld a, [wBattleMonSpecies2]
|
ld a, [wBattleMonSpecies2]
|
||||||
|
|
|
@ -758,7 +758,7 @@ ReadTrainer: ; 39c53 (e:5c53)
|
||||||
ld a,1
|
ld a,1
|
||||||
ld [wcc49],a
|
ld [wcc49],a
|
||||||
push hl
|
push hl
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
pop hl
|
pop hl
|
||||||
jr .LoopTrainerData
|
jr .LoopTrainerData
|
||||||
.SpecialTrainer
|
.SpecialTrainer
|
||||||
|
@ -775,7 +775,7 @@ ReadTrainer: ; 39c53 (e:5c53)
|
||||||
ld a,1
|
ld a,1
|
||||||
ld [wcc49],a
|
ld [wcc49],a
|
||||||
push hl
|
push hl
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
pop hl
|
pop hl
|
||||||
jr .SpecialTrainer
|
jr .SpecialTrainer
|
||||||
.AddLoneMove
|
.AddLoneMove
|
||||||
|
|
|
@ -41,7 +41,7 @@ _GivePokemon: ; 4fda5 (13:7da5)
|
||||||
ret
|
ret
|
||||||
.asm_4fe01
|
.asm_4fe01
|
||||||
call SetPokedexOwnedFlag
|
call SetPokedexOwnedFlag
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcc3c], a
|
ld [wcc3c], a
|
||||||
ld [wccd3], a
|
ld [wccd3], a
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
UpdateHPBar_LoadRegisters: ; f9dc (3:79dc)
|
HPBarLength: ; f9dc (3:79dc)
|
||||||
call GetPredefRegisters
|
call GetPredefRegisters
|
||||||
|
|
||||||
; calculates bc * 48 / de, the number of pixels the HP bar has
|
; calculates bc * 48 / de, the number of pixels the HP bar has
|
||||||
; the result is always at least 1
|
; the result is always at least 1
|
||||||
UpdateHPBar_CalcNumberOfHPBarPixels: ; f9df (3:79df)
|
GetHPBarLength: ; f9df (3:79df)
|
||||||
push hl
|
push hl
|
||||||
xor a
|
xor a
|
||||||
ld hl, H_MULTIPLICAND
|
ld hl, H_MULTIPLICAND
|
||||||
|
@ -254,12 +254,12 @@ UpdateHPBar_CalcOldNewHPBarPixels: ; fb30 (3:7b30)
|
||||||
ld l, a
|
ld l, a
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
call UpdateHPBar_CalcNumberOfHPBarPixels ; calc num pixels for old HP
|
call GetHPBarLength ; calc num pixels for old HP
|
||||||
ld a, e
|
ld a, e
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
push af
|
push af
|
||||||
call UpdateHPBar_CalcNumberOfHPBarPixels ; calc num pixels for new HP
|
call GetHPBarLength ; calc num pixels for new HP
|
||||||
pop af
|
pop af
|
||||||
ld d, e
|
ld d, e
|
||||||
ld e, a
|
ld e, a
|
||||||
|
|
|
@ -136,7 +136,7 @@ Func_71c07: ; 71c07 (1c:5c07)
|
||||||
call RemovePokemon
|
call RemovePokemon
|
||||||
ld a,$80
|
ld a,$80
|
||||||
ld [wcc49],a
|
ld [wcc49],a
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
call Func_71d19
|
call Func_71d19
|
||||||
callab EvolveTradeMon
|
callab EvolveTradeMon
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
|
|
|
@ -431,7 +431,7 @@ ItemUseBall: ; d687 (3:5687)
|
||||||
xor a
|
xor a
|
||||||
ld [wcc49],a
|
ld [wcc49],a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call AddPokemonToParty ;add mon to Party
|
call AddPartyMon ;add mon to Party
|
||||||
jr .End
|
jr .End
|
||||||
.sendToBox ;$5907
|
.sendToBox ;$5907
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
; tests if mon [wcf91] can learn move [wd0e0]
|
; tests if mon [wcf91] can learn move [wd0e0]
|
||||||
TestMonMoveCompatibility: ; 1373e (4:773e)
|
CanLearnTM: ; 1373e (4:773e)
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
ld [wd0b5], a
|
ld [wd0b5], a
|
||||||
call GetMonHeader
|
call GetMonHeader
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
AskForMonNickname: ; 64eb (1:64eb)
|
AskName: ; 64eb (1:64eb)
|
||||||
call SaveScreenTilesToBuffer1
|
call SaveScreenTilesToBuffer1
|
||||||
call GetPredefRegisters
|
call GetPredefRegisters
|
||||||
push hl
|
push hl
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
DisplayPokedexMenu_: ; 40000 (10:4000)
|
ShowPokedexMenu: ; 40000 (10:4000)
|
||||||
call GBPalWhiteOut
|
call GBPalWhiteOut
|
||||||
call ClearScreen
|
call ClearScreen
|
||||||
call UpdateSprites ; move sprites
|
call UpdateSprites ; move sprites
|
||||||
|
|
|
@ -71,7 +71,7 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
|
||||||
ld hl, $ffde
|
ld hl, $ffde
|
||||||
ld de, wPlayerMoney + 2 ; wd349
|
ld de, wPlayerMoney + 2 ; wd349
|
||||||
ld c, $3
|
ld c, $3
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld [wd125], a
|
ld [wd125], a
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
PrintEmotionBubble: ; 17c47 (5:7c47)
|
EmotionBubble: ; 17c47 (5:7c47)
|
||||||
ld a, [wcd50]
|
ld a, [wcd50]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
|
|
|
@ -32,7 +32,7 @@ PickupItem:
|
||||||
|
|
||||||
ld a, [$ffdb]
|
ld a, [$ffdb]
|
||||||
ld [wcc4d], a
|
ld [wcc4d], a
|
||||||
ld a, $11 ; RemoveMissableObject
|
ld a, $11 ; HideObject
|
||||||
call Predef
|
call Predef
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wcc3c], a
|
ld [wcc3c], a
|
||||||
|
|
|
@ -89,7 +89,7 @@ Func_705aa: ; 705aa (1c:45aa)
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
jp Func_70755
|
jp Func_70755
|
||||||
|
|
||||||
_DoFlyOrTeleportAwayGraphics: ; 705ba (1c:45ba)
|
_LeaveMapAnim: ; 705ba (1c:45ba)
|
||||||
call Func_706ef
|
call Func_706ef
|
||||||
call Func_70787
|
call Func_70787
|
||||||
ld a, b
|
ld a, b
|
||||||
|
|
|
@ -159,7 +159,7 @@ Func_56903: ; 56903 (15:6903)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; tests if this trainer is in the right position to engage the player and do so if she is.
|
; tests if this trainer is in the right position to engage the player and do so if she is.
|
||||||
CheckEngagePlayer: ; 5690f (15:690f)
|
TrainerEngage: ; 5690f (15:690f)
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld a, [wTrainerSpriteOffset] ; wWhichTrade
|
ld a, [wTrainerSpriteOffset] ; wWhichTrade
|
||||||
|
|
|
@ -379,7 +379,7 @@ SendSGBPacket: ; 71feb (1c:5feb)
|
||||||
; else send 16 more bytes
|
; else send 16 more bytes
|
||||||
jr .loop2
|
jr .loop2
|
||||||
|
|
||||||
LoadSGBBorderAndPalettes: ; 7202b (1c:602b)
|
LoadSGB: ; 7202b (1c:602b)
|
||||||
xor a
|
xor a
|
||||||
ld [wcf1b], a
|
ld [wcf1b], a
|
||||||
call Func_7209b
|
call Func_7209b
|
||||||
|
|
|
@ -56,8 +56,7 @@ PredefPointers: ; 4fe79 (13:7e79)
|
||||||
dbw BANK(Func_3f0c6),Func_3f0c6
|
dbw BANK(Func_3f0c6),Func_3f0c6
|
||||||
dbw BANK(Func_3f073),Func_3f073
|
dbw BANK(Func_3f073),Func_3f073
|
||||||
dbw BANK(ScaleSpriteByTwo), ScaleSpriteByTwo
|
dbw BANK(ScaleSpriteByTwo), ScaleSpriteByTwo
|
||||||
db BANK(LoadMonBackSprite) ; dbw macro gives an error for some reason
|
dbw BANK(LoadMonBackPic), LoadMonBackPic
|
||||||
dw LoadMonBackSprite
|
|
||||||
dbw BANK(Func_79aba),Func_79aba
|
dbw BANK(Func_79aba),Func_79aba
|
||||||
dbw BANK(Func_f132),Func_f132
|
dbw BANK(Func_f132),Func_f132
|
||||||
HealPartyPredef: ; 4fe8e (13:7e8e)
|
HealPartyPredef: ; 4fe8e (13:7e8e)
|
||||||
|
@ -66,32 +65,24 @@ MoveAnimationPredef: ; 4fe91 (13:7e91)
|
||||||
dbw BANK(MoveAnimation),MoveAnimation; 08 play move animation
|
dbw BANK(MoveAnimation),MoveAnimation; 08 play move animation
|
||||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||||
dbw BANK(AddBCDPredef),AddBCDPredef
|
dbw BANK(AddBCDPredef), AddBCDPredef
|
||||||
db BANK(SubtractBCDPredef)
|
dbw BANK(SubBCDPredef), SubBCDPredef
|
||||||
dw SubtractBCDPredef
|
|
||||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||||
db BANK(InitializePlayerData)
|
dbw BANK(InitPlayerData), InitPlayerData
|
||||||
dw InitializePlayerData
|
|
||||||
dbw BANK(FlagActionPredef),FlagActionPredef
|
dbw BANK(FlagActionPredef),FlagActionPredef
|
||||||
db BANK(RemoveMissableObject)
|
dbw BANK(HideObject), HideObject
|
||||||
dw RemoveMissableObject
|
dbw BANK(IsObjectHidden), IsObjectHidden
|
||||||
db BANK(IsMissableObjectHidden)
|
|
||||||
dw IsMissableObjectHidden
|
|
||||||
dbw BANK(Func_c69c),Func_c69c
|
dbw BANK(Func_c69c),Func_c69c
|
||||||
db BANK(AnyPlayerPokemonAliveCheck)
|
dbw BANK(AnyPartyAlive), AnyPartyAlive
|
||||||
dw AnyPlayerPokemonAliveCheck
|
dbw BANK(ShowObject), ShowObject
|
||||||
db BANK(AddMissableObject)
|
dbw BANK(ShowObject), ShowObject
|
||||||
dw AddMissableObject
|
|
||||||
db BANK(AddMissableObject)
|
|
||||||
dw AddMissableObject
|
|
||||||
dbw BANK(Func_ee9e),Func_ee9e
|
dbw BANK(Func_ee9e),Func_ee9e
|
||||||
db BANK(InitializePlayerData)
|
dbw BANK(InitPlayerData), InitPlayerData
|
||||||
dw InitializePlayerData
|
|
||||||
dbw BANK(Func_c754),Func_c754
|
dbw BANK(Func_c754),Func_c754
|
||||||
dbw BANK(Func_3af5b),Func_3af5b
|
dbw BANK(Func_3af5b),Func_3af5b
|
||||||
dbw BANK(LearnMove),LearnMove
|
dbw BANK(LearnMove),LearnMove
|
||||||
dbw BANK(IsItemInBag_),IsItemInBag_; 1C, used in Pokémon Tower
|
dbw BANK(IsItemInBag_),IsItemInBag_ ; 1C, used in Pokémon Tower
|
||||||
dbw $03,Func_3eb5 ; for these two, the bank number is actually 0
|
dbw $03,Func_3eb5 ; for these two, the bank number is actually 0
|
||||||
dbw $03,GiveItem
|
dbw $03,GiveItem
|
||||||
dbw BANK(Func_480eb),Func_480eb
|
dbw BANK(Func_480eb),Func_480eb
|
||||||
|
@ -101,12 +92,10 @@ MoveAnimationPredef: ; 4fe91 (13:7e91)
|
||||||
dbw BANK(Func_f9a0),Func_f9a0
|
dbw BANK(Func_f9a0),Func_f9a0
|
||||||
dbw BANK(Func_48125),Func_48125
|
dbw BANK(Func_48125),Func_48125
|
||||||
dbw BANK(UpdateHPBar),UpdateHPBar
|
dbw BANK(UpdateHPBar),UpdateHPBar
|
||||||
db BANK(UpdateHPBar_LoadRegisters)
|
dbw BANK(HPBarLength), HPBarLength
|
||||||
dw UpdateHPBar_LoadRegisters
|
|
||||||
dbw BANK(Func_5ab0),Func_5ab0
|
dbw BANK(Func_5ab0),Func_5ab0
|
||||||
dbw BANK(Func_3ed02),Func_3ed02
|
dbw BANK(Func_3ed02),Func_3ed02
|
||||||
db BANK(DisplayPokedexMenu_)
|
dbw BANK(ShowPokedexMenu), ShowPokedexMenu
|
||||||
dw DisplayPokedexMenu_
|
|
||||||
dbw BANK(Func_3ad1c),Func_3ad1c
|
dbw BANK(Func_3ad1c),Func_3ad1c
|
||||||
dbw BANK(SaveSAVtoSRAM0),SaveSAVtoSRAM0
|
dbw BANK(SaveSAVtoSRAM0),SaveSAVtoSRAM0
|
||||||
dbw BANK(InitOpponent),InitOpponent
|
dbw BANK(InitOpponent),InitOpponent
|
||||||
|
@ -117,58 +106,46 @@ MoveAnimationPredef: ; 4fe91 (13:7e91)
|
||||||
dbw BANK(Func_79dda),Func_79dda
|
dbw BANK(Func_79dda),Func_79dda
|
||||||
dbw BANK(PlayIntro),PlayIntro
|
dbw BANK(PlayIntro),PlayIntro
|
||||||
dbw BANK(Func_79869),Func_79869
|
dbw BANK(Func_79869),Func_79869
|
||||||
db BANK(BattleTransition_FlashScreen_)
|
dbw BANK(FlashScreen), FlashScreen
|
||||||
dw BattleTransition_FlashScreen_
|
|
||||||
dbw BANK(Func_c586),Func_c586
|
dbw BANK(Func_c586),Func_c586
|
||||||
dbw BANK(StatusScreen),StatusScreen ; 37 0x12953
|
dbw BANK(StatusScreen),StatusScreen ; 37 0x12953
|
||||||
dbw BANK(StatusScreen2),StatusScreen2 ; 38
|
dbw BANK(StatusScreen2),StatusScreen2 ; 38
|
||||||
dbw BANK(Func_410e2),Func_410e2
|
dbw BANK(Func_410e2),Func_410e2
|
||||||
db BANK(CheckEngagePlayer)
|
dbw BANK(TrainerEngage), TrainerEngage
|
||||||
dw CheckEngagePlayer
|
|
||||||
dbw BANK(IndexToPokedex),IndexToPokedex
|
dbw BANK(IndexToPokedex),IndexToPokedex
|
||||||
dbw BANK(Predef3B),Predef3B; 3B display pic?
|
dbw BANK(Predef3B),Predef3B; 3B display pic?
|
||||||
dbw BANK(UsedCut),UsedCut
|
dbw BANK(UsedCut),UsedCut
|
||||||
dbw BANK(ShowPokedexData),ShowPokedexData
|
dbw BANK(ShowPokedexData),ShowPokedexData
|
||||||
dbw BANK(WriteMonMoves),WriteMonMoves
|
dbw BANK(WriteMonMoves),WriteMonMoves
|
||||||
dbw BANK(SaveSAV),SaveSAV
|
dbw BANK(SaveSAV),SaveSAV
|
||||||
db BANK(LoadSGBBorderAndPalettes)
|
dbw BANK(LoadSGB), LoadSGB
|
||||||
dw LoadSGBBorderAndPalettes
|
|
||||||
dbw BANK(Func_f113),Func_f113
|
dbw BANK(Func_f113),Func_f113
|
||||||
dbw BANK(SetPartyMonTypes),SetPartyMonTypes
|
dbw BANK(SetPartyMonTypes),SetPartyMonTypes
|
||||||
db BANK(TestMonMoveCompatibility)
|
dbw BANK(CanLearnTM), CanLearnTM
|
||||||
dw TestMonMoveCompatibility
|
|
||||||
dbw BANK(TMToMove),TMToMove
|
dbw BANK(TMToMove),TMToMove
|
||||||
dbw BANK(Func_71ddf),Func_71ddf
|
dbw BANK(Func_71ddf),Func_71ddf
|
||||||
db BANK(DisplayStarterMonDex)
|
dbw BANK(StarterDex), StarterDex ; 46
|
||||||
dw DisplayStarterMonDex; 46 load dex screen
|
dbw BANK(_AddPartyMon), _AddPartyMon
|
||||||
db BANK(_AddPokemonToParty)
|
|
||||||
dw _AddPokemonToParty
|
|
||||||
dbw BANK(UpdateHPBar),UpdateHPBar
|
dbw BANK(UpdateHPBar),UpdateHPBar
|
||||||
dbw BANK(Func_3cdec),Func_3cdec
|
dbw BANK(Func_3cdec),Func_3cdec
|
||||||
dbw BANK(LoadTownMap_Nest),LoadTownMap_Nest
|
dbw BANK(LoadTownMap_Nest),LoadTownMap_Nest
|
||||||
dbw BANK(Func_27d6b),Func_27d6b
|
dbw BANK(Func_27d6b),Func_27d6b
|
||||||
db BANK(PrintEmotionBubble)
|
dbw BANK(EmotionBubble), EmotionBubble; 4C player exclamation
|
||||||
dw PrintEmotionBubble; 4C player exclamation
|
|
||||||
dbw BANK(Func_5aaf),Func_5aaf; return immediately
|
dbw BANK(Func_5aaf),Func_5aaf; return immediately
|
||||||
db BANK(AskForMonNickname)
|
dbw BANK(AskName), AskName
|
||||||
dw AskForMonNickname
|
|
||||||
dbw BANK(PewterGuys),PewterGuys
|
dbw BANK(PewterGuys),PewterGuys
|
||||||
dbw BANK(SaveSAVtoSRAM2),SaveSAVtoSRAM2
|
dbw BANK(SaveSAVtoSRAM2),SaveSAVtoSRAM2
|
||||||
dbw BANK(LoadSAVCheckSum2),LoadSAVCheckSum2
|
dbw BANK(LoadSAVCheckSum2),LoadSAVCheckSum2
|
||||||
dbw BANK(LoadSAV),LoadSAV
|
dbw BANK(LoadSAV),LoadSAV
|
||||||
dbw BANK(SaveSAVtoSRAM1),SaveSAVtoSRAM1
|
dbw BANK(SaveSAVtoSRAM1),SaveSAVtoSRAM1
|
||||||
dbw BANK(Predef54),Predef54 ; 54 initiate trade
|
dbw BANK(Predef54),Predef54 ; 54 initiate trade
|
||||||
db BANK(HallOfFameComputer)
|
dbw BANK(HallOfFamePC), HallOfFamePC
|
||||||
dw HallOfFameComputer
|
|
||||||
dbw BANK(DisplayDexRating),DisplayDexRating
|
dbw BANK(DisplayDexRating),DisplayDexRating
|
||||||
db $1E ; uses wrong bank number
|
dbw $1E, _LeaveMapAnim ; wrong bank
|
||||||
dw _DoFlyOrTeleportAwayGraphics
|
dbw $1E, Func_70510 ; wrong bank
|
||||||
db $1E ; uses wrong bank number
|
|
||||||
dw Func_70510
|
|
||||||
dbw BANK(Func_c5be),Func_c5be
|
dbw BANK(Func_c5be),Func_c5be
|
||||||
dbw BANK(Func_c60b),Func_c60b
|
dbw BANK(Func_c60b),Func_c60b
|
||||||
db BANK(PrintUsedStrengthText)
|
dbw BANK(PrintStrengthTxt), PrintStrengthTxt
|
||||||
dw PrintUsedStrengthText
|
|
||||||
dbw BANK(PickupItem),PickupItem
|
dbw BANK(PickupItem),PickupItem
|
||||||
dbw BANK(Func_27d98),Func_27d98
|
dbw BANK(Func_27d98),Func_27d98
|
||||||
dbw BANK(LoadMovePPs),LoadMovePPs
|
dbw BANK(LoadMovePPs),LoadMovePPs
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
; this function temporarily makes the starters (and Ivysaur) seen
|
; this function temporarily makes the starters (and Ivysaur) seen
|
||||||
; so that the full Pokedex information gets displayed in Oak's lab
|
; so that the full Pokedex information gets displayed in Oak's lab
|
||||||
DisplayStarterMonDex: ; 5c0dc (17:40dc)
|
StarterDex: ; 5c0dc (17:40dc)
|
||||||
ld a, %01001011 ; set starter flags
|
ld a, %01001011 ; set starter flags
|
||||||
ld [wPokedexOwned], a ; wPokedexOwned
|
ld [wPokedexOwned], a ; wPokedexOwned
|
||||||
ld a, $3d
|
ld a, $3d
|
||||||
|
|
|
@ -618,7 +618,7 @@ SlotMachine_37741: ; 37741 (d:7741)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld de, wPlayerCoins + 1
|
ld de, wPlayerCoins + 1
|
||||||
ld c, $2
|
ld c, $2
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
|
|
||||||
SlotMachine_37754: ; 37754 (d:7754)
|
SlotMachine_37754: ; 37754 (d:7754)
|
||||||
|
|
4
home.asm
4
home.asm
|
@ -4146,11 +4146,11 @@ RemovePokemon:: ; 391f (0:391f)
|
||||||
ld b, BANK(_RemovePokemon)
|
ld b, BANK(_RemovePokemon)
|
||||||
jp Bankswitch
|
jp Bankswitch
|
||||||
|
|
||||||
AddPokemonToParty:: ; 3927 (0:3927)
|
AddPartyMon:: ; 3927 (0:3927)
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
callba _AddPokemonToParty
|
callba _AddPartyMon
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
|
|
|
@ -332,7 +332,7 @@ OverworldLoopLessDelay::
|
||||||
ld a,[W_CURMAP]
|
ld a,[W_CURMAP]
|
||||||
cp a,OAKS_LAB
|
cp a,OAKS_LAB
|
||||||
jp z,.noFaintCheck
|
jp z,.noFaintCheck
|
||||||
callab AnyPlayerPokemonAliveCheck ; check if all the player's pokemon fainted
|
callab AnyPartyAlive ; check if all the player's pokemon fainted
|
||||||
ld a,d
|
ld a,d
|
||||||
and a
|
and a
|
||||||
jr z,.allPokemonFainted
|
jr z,.allPokemonFainted
|
||||||
|
@ -507,7 +507,7 @@ WarpFound2:: ; 073c (0:073c)
|
||||||
; if it's a Silph Co. teleporter
|
; if it's a Silph Co. teleporter
|
||||||
ld hl,wd732
|
ld hl,wd732
|
||||||
set 3,[hl]
|
set 3,[hl]
|
||||||
call DoFlyOrTeleportAwayGraphics
|
call LeaveMapAnim
|
||||||
jr .skipMapChangeSound
|
jr .skipMapChangeSound
|
||||||
.notTeleporter
|
.notTeleporter
|
||||||
call PlayMapChangeSound
|
call PlayMapChangeSound
|
||||||
|
@ -778,16 +778,16 @@ HandleFlyOrTeleportAway::
|
||||||
ld hl, wd732
|
ld hl, wd732
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
res 5, [hl]
|
res 5, [hl]
|
||||||
call DoFlyOrTeleportAwayGraphics
|
call LeaveMapAnim
|
||||||
ld a, Bank(Func_62ce)
|
ld a, Bank(Func_62ce)
|
||||||
ld [H_LOADEDROMBANK], a
|
ld [H_LOADEDROMBANK], a
|
||||||
ld [$2000], a
|
ld [$2000], a
|
||||||
call Func_62ce
|
call Func_62ce
|
||||||
jp Func_5d5f
|
jp Func_5d5f
|
||||||
|
|
||||||
DoFlyOrTeleportAwayGraphics::
|
LeaveMapAnim::
|
||||||
ld b, BANK(_DoFlyOrTeleportAwayGraphics)
|
ld b, BANK(_LeaveMapAnim)
|
||||||
ld hl, _DoFlyOrTeleportAwayGraphics
|
ld hl, _LeaveMapAnim
|
||||||
jp Bankswitch
|
jp Bankswitch
|
||||||
|
|
||||||
LoadPlayerSpriteGraphics::
|
LoadPlayerSpriteGraphics::
|
||||||
|
|
26
main.asm
26
main.asm
|
@ -487,7 +487,7 @@ TestBattle:
|
||||||
xor a
|
xor a
|
||||||
ld [wcc49], a
|
ld [wcc49], a
|
||||||
ld [W_CURMAP], a
|
ld [W_CURMAP], a
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
|
|
||||||
; Fight against a
|
; Fight against a
|
||||||
; level 20 Rhydon.
|
; level 20 Rhydon.
|
||||||
|
@ -686,7 +686,7 @@ SetIshiharaTeam: ; 64ca (1:64ca)
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [W_CURENEMYLVL], a
|
ld [W_CURENEMYLVL], a
|
||||||
inc de
|
inc de
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
IshiharaTeam: ; 64df (1:64df)
|
IshiharaTeam: ; 64df (1:64df)
|
||||||
|
@ -2638,7 +2638,7 @@ Func_c8de: ; c8de (3:48de)
|
||||||
|
|
||||||
INCLUDE "data/hide_show_data.asm"
|
INCLUDE "data/hide_show_data.asm"
|
||||||
|
|
||||||
PrintUsedStrengthText: ; cd99 (3:4d99)
|
PrintStrengthTxt: ; cd99 (3:4d99)
|
||||||
ld hl, wd728
|
ld hl, wd728
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ld hl, UsedStrengthText
|
ld hl, UsedStrengthText
|
||||||
|
@ -3231,7 +3231,7 @@ InitializeMissableObjectsFlags: ; f175 (3:7175)
|
||||||
jr .missableObjectsLoop
|
jr .missableObjectsLoop
|
||||||
|
|
||||||
; tests if current sprite is a missable object that is hidden/has been removed
|
; tests if current sprite is a missable object that is hidden/has been removed
|
||||||
IsMissableObjectHidden: ; f1a6 (3:71a6)
|
IsObjectHidden: ; f1a6 (3:71a6)
|
||||||
ld a, [H_CURRENTSPRITEOFFSET]
|
ld a, [H_CURRENTSPRITEOFFSET]
|
||||||
swap a
|
swap a
|
||||||
ld b, a
|
ld b, a
|
||||||
|
@ -3258,7 +3258,7 @@ IsMissableObjectHidden: ; f1a6 (3:71a6)
|
||||||
|
|
||||||
; adds missable object (items, leg. pokemon, etc.) to the map
|
; adds missable object (items, leg. pokemon, etc.) to the map
|
||||||
; [wcc4d]: index of the missable object to be added (global index)
|
; [wcc4d]: index of the missable object to be added (global index)
|
||||||
AddMissableObject: ; f1c8 (3:71c8)
|
ShowObject: ; f1c8 (3:71c8)
|
||||||
ld hl, W_MISSABLEOBJECTFLAGS
|
ld hl, W_MISSABLEOBJECTFLAGS
|
||||||
ld a, [wcc4d]
|
ld a, [wcc4d]
|
||||||
ld c, a
|
ld c, a
|
||||||
|
@ -3268,7 +3268,7 @@ AddMissableObject: ; f1c8 (3:71c8)
|
||||||
|
|
||||||
; removes missable object (items, leg. pokemon, etc.) from the map
|
; removes missable object (items, leg. pokemon, etc.) from the map
|
||||||
; [wcc4d]: index of the missable object to be removed (global index)
|
; [wcc4d]: index of the missable object to be removed (global index)
|
||||||
RemoveMissableObject: ; f1d7 (3:71d7)
|
HideObject: ; f1d7 (3:71d7)
|
||||||
ld hl, W_MISSABLEOBJECTFLAGS
|
ld hl, W_MISSABLEOBJECTFLAGS
|
||||||
ld a, [wcc4d]
|
ld a, [wcc4d]
|
||||||
ld c, a
|
ld c, a
|
||||||
|
@ -3452,7 +3452,7 @@ Func_f2dd: ; f2dd (3:72dd)
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
_AddPokemonToParty: ; f2e5 (3:72e5)
|
_AddPartyMon: ; f2e5 (3:72e5)
|
||||||
ld de, wPartyCount ; wPartyCount
|
ld de, wPartyCount ; wPartyCount
|
||||||
ld a, [wcc49]
|
ld a, [wcc49]
|
||||||
and $f
|
and $f
|
||||||
|
@ -3668,7 +3668,7 @@ _AddPokemonToParty: ; f2e5 (3:72e5)
|
||||||
inc de
|
inc de
|
||||||
inc de
|
inc de
|
||||||
pop hl
|
pop hl
|
||||||
call AddPokemonToParty_WriteMovePP
|
call AddPartyMon_WriteMovePP
|
||||||
inc de
|
inc de
|
||||||
ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
|
ld a, [W_CURENEMYLVL] ; W_CURENEMYLVL
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
@ -3694,7 +3694,7 @@ _AddPokemonToParty: ; f2e5 (3:72e5)
|
||||||
LoadMovePPs: ; f473 (3:7473)
|
LoadMovePPs: ; f473 (3:7473)
|
||||||
call GetPredefRegisters
|
call GetPredefRegisters
|
||||||
; fallthrough
|
; fallthrough
|
||||||
AddPokemonToParty_WriteMovePP: ; f476 (3:7476)
|
AddPartyMon_WriteMovePP: ; f476 (3:7476)
|
||||||
ld b, $4
|
ld b, $4
|
||||||
.pploop
|
.pploop
|
||||||
ld a, [hli] ; read move ID
|
ld a, [hli] ; read move ID
|
||||||
|
@ -4286,7 +4286,7 @@ Func_f800: ; f800 (3:7800)
|
||||||
ld de, $ffa1
|
ld de, $ffa1
|
||||||
ld hl, $ffa4
|
ld hl, $ffa4
|
||||||
push bc
|
push bc
|
||||||
call SubtractBCD
|
call SubBCD
|
||||||
pop bc
|
pop bc
|
||||||
jr .asm_f803
|
jr .asm_f803
|
||||||
|
|
||||||
|
@ -4318,10 +4318,10 @@ AddBCD::
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
SubtractBCDPredef::
|
SubBCDPredef::
|
||||||
call GetPredefRegisters
|
call GetPredefRegisters
|
||||||
|
|
||||||
SubtractBCD::
|
SubBCD::
|
||||||
and a
|
and a
|
||||||
ld b, c
|
ld b, c
|
||||||
.sub
|
.sub
|
||||||
|
@ -4346,7 +4346,7 @@ SubtractBCD::
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
InitializePlayerData:
|
InitPlayerData:
|
||||||
|
|
||||||
call Random
|
call Random
|
||||||
ld a, [hRandomSub]
|
ld a, [hRandomSub]
|
||||||
|
|
|
@ -157,7 +157,7 @@ CeladonGameCornerText2: ; 48ca9 (12:4ca9)
|
||||||
ld hl, $ffa1
|
ld hl, $ffa1
|
||||||
ld de, wPlayerMoney + 2
|
ld de, wPlayerMoney + 2
|
||||||
ld c, $3
|
ld c, $3
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
xor a
|
xor a
|
||||||
ldh [$9f], a
|
ldh [$9f], a
|
||||||
|
|
|
@ -156,7 +156,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1)
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wPlayerMoney + 2
|
ld de, wPlayerMoney + 2
|
||||||
ld c, $3
|
ld c, $3
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
ld a, (SFX_02_5a - SFX_Headers_02) / 3
|
ld a, (SFX_02_5a - SFX_Headers_02) / 3
|
||||||
call PlaySoundWaitForCurrent
|
call PlaySoundWaitForCurrent
|
||||||
|
|
|
@ -55,7 +55,7 @@ MtMoonPokecenterText4: ; 492ec (12:52ec)
|
||||||
ld hl, wTrainerFacingDirection
|
ld hl, wTrainerFacingDirection
|
||||||
ld de, wPlayerMoney + 2
|
ld de, wPlayerMoney + 2
|
||||||
ld c, $3
|
ld c, $3
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld [wd125], a
|
ld [wd125], a
|
||||||
|
|
|
@ -103,7 +103,7 @@ Museum1FText1: ; 5c135 (17:4135)
|
||||||
ld hl, wTrainerFacingDirection
|
ld hl, wTrainerFacingDirection
|
||||||
ld de, wPlayerMoney + 2
|
ld de, wPlayerMoney + 2
|
||||||
ld c, $3
|
ld c, $3
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld [wd125], a
|
ld [wd125], a
|
||||||
|
|
|
@ -847,7 +847,7 @@ OaksLabScript_1d157: ; 1d157 (7:5157)
|
||||||
ld hl, wd730
|
ld hl, wd730
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
ld a, $46
|
ld a, $46
|
||||||
call Predef ; DisplayStarterMonDex
|
call Predef ; StarterDex
|
||||||
ld hl, wd730
|
ld hl, wd730
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ReloadMapData
|
call ReloadMapData
|
||||||
|
@ -921,7 +921,7 @@ asm_1d1e5: ; 1d1e5 (7:51e5)
|
||||||
ld [W_CURENEMYLVL], a
|
ld [W_CURENEMYLVL], a
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
ld [wd11e], a
|
ld [wd11e], a
|
||||||
call AddPokemonToParty
|
call AddPartyMon
|
||||||
ld hl, wd72e
|
ld hl, wd72e
|
||||||
set 3, [hl]
|
set 3, [hl]
|
||||||
ld a, $fc
|
ld a, $fc
|
||||||
|
|
|
@ -176,7 +176,7 @@ SafariZoneEntranceText4: ; 752ca (1d:52ca)
|
||||||
ld hl, wTrainerFacingDirection
|
ld hl, wTrainerFacingDirection
|
||||||
ld de, wPlayerMoney + 2
|
ld de, wPlayerMoney + 2
|
||||||
ld c, $3
|
ld c, $3
|
||||||
ld a, $c ; SubtractBCDPredef
|
ld a, $c ; SubBCDPredef
|
||||||
call Predef
|
call Predef
|
||||||
ld a, $13
|
ld a, $13
|
||||||
ld [wd125], a
|
ld [wd125], a
|
||||||
|
|
Loading…
Reference in a new issue