mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13: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
29 changed files with 81 additions and 103 deletions
|
|
@ -1,4 +1,4 @@
|
|||
HallOfFameComputer: ; 7405c (1d:405c)
|
||||
HallOfFamePC: ; 7405c (1d:405c)
|
||||
callba AnimateHallOfFame
|
||||
call ClearScreen
|
||||
ld c, $64
|
||||
|
|
|
|||
|
|
@ -430,6 +430,7 @@ BattleTransition_OutwardSpiral_: ; 70af9 (1c:4af9)
|
|||
ld [wd09f], a
|
||||
jr .done2_
|
||||
|
||||
FlashScreen:
|
||||
BattleTransition_FlashScreen_: ; 70b5d (1c:4b5d)
|
||||
ld hl, BattleTransition_FlashScreenPalettes
|
||||
.loop
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ Func_3c11e: ; 3c11e (f:411e)
|
|||
call DelayFrames
|
||||
call SaveScreenTilesToBuffer1
|
||||
.asm_3c14f
|
||||
call AnyPlayerPokemonAliveCheck
|
||||
call AnyPartyAlive
|
||||
ld a, d
|
||||
and a
|
||||
jp z, HandlePlayerBlackOut
|
||||
|
|
@ -774,7 +774,7 @@ HandleEnemyMonFainted: ; 3c525 (f:4525)
|
|||
xor a
|
||||
ld [wccf0], a
|
||||
call FaintEnemyPokemon
|
||||
call AnyPlayerPokemonAliveCheck
|
||||
call AnyPartyAlive
|
||||
ld a, d
|
||||
and a
|
||||
jp z, HandlePlayerBlackOut
|
||||
|
|
@ -870,7 +870,7 @@ FaintEnemyPokemon ; 0x3c567
|
|||
jr nz, .playermonnotfaint
|
||||
call Func_3c741
|
||||
.playermonnotfaint
|
||||
call AnyPlayerPokemonAliveCheck
|
||||
call AnyPartyAlive
|
||||
ld a, d
|
||||
and a
|
||||
ret z
|
||||
|
|
@ -1021,7 +1021,7 @@ HandlePlayerMonFainted: ; 3c700 (f:4700)
|
|||
ld a, $1
|
||||
ld [wccf0], a
|
||||
call Func_3c741
|
||||
call AnyPlayerPokemonAliveCheck ; test if any more mons are alive
|
||||
call AnyPartyAlive ; test if any more mons are alive
|
||||
ld a, d
|
||||
and a
|
||||
jp z, HandlePlayerBlackOut
|
||||
|
|
@ -1492,7 +1492,7 @@ TrainerSentOutText: ; 3ca7e (f:4a7e)
|
|||
|
||||
; 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
|
||||
AnyPlayerPokemonAliveCheck: ; 3ca83 (f:4a83)
|
||||
AnyPartyAlive: ; 3ca83 (f:4a83)
|
||||
ld a, [wPartyCount] ; wPartyCount
|
||||
ld e, a
|
||||
xor a
|
||||
|
|
@ -6930,7 +6930,7 @@ asm_3f0d0: ; 3f0d0 (f:70d0)
|
|||
jr nz, .asm_3f0f4
|
||||
ret
|
||||
|
||||
LoadMonBackSprite:
|
||||
LoadMonBackPic:
|
||||
; Assumes the monster's attributes have
|
||||
; been loaded with GetMonHeader.
|
||||
ld a, [wBattleMonSpecies2]
|
||||
|
|
|
|||
|
|
@ -758,7 +758,7 @@ ReadTrainer: ; 39c53 (e:5c53)
|
|||
ld a,1
|
||||
ld [wcc49],a
|
||||
push hl
|
||||
call AddPokemonToParty
|
||||
call AddPartyMon
|
||||
pop hl
|
||||
jr .LoopTrainerData
|
||||
.SpecialTrainer
|
||||
|
|
@ -775,7 +775,7 @@ ReadTrainer: ; 39c53 (e:5c53)
|
|||
ld a,1
|
||||
ld [wcc49],a
|
||||
push hl
|
||||
call AddPokemonToParty
|
||||
call AddPartyMon
|
||||
pop hl
|
||||
jr .SpecialTrainer
|
||||
.AddLoneMove
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ _GivePokemon: ; 4fda5 (13:7da5)
|
|||
ret
|
||||
.asm_4fe01
|
||||
call SetPokedexOwnedFlag
|
||||
call AddPokemonToParty
|
||||
call AddPartyMon
|
||||
ld a, $1
|
||||
ld [wcc3c], a
|
||||
ld [wccd3], a
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
UpdateHPBar_LoadRegisters: ; f9dc (3:79dc)
|
||||
HPBarLength: ; f9dc (3:79dc)
|
||||
call GetPredefRegisters
|
||||
|
||||
; calculates bc * 48 / de, the number of pixels the HP bar has
|
||||
; the result is always at least 1
|
||||
UpdateHPBar_CalcNumberOfHPBarPixels: ; f9df (3:79df)
|
||||
GetHPBarLength: ; f9df (3:79df)
|
||||
push hl
|
||||
xor a
|
||||
ld hl, H_MULTIPLICAND
|
||||
|
|
@ -254,12 +254,12 @@ UpdateHPBar_CalcOldNewHPBarPixels: ; fb30 (3:7b30)
|
|||
ld l, a
|
||||
push hl
|
||||
push de
|
||||
call UpdateHPBar_CalcNumberOfHPBarPixels ; calc num pixels for old HP
|
||||
call GetHPBarLength ; calc num pixels for old HP
|
||||
ld a, e
|
||||
pop de
|
||||
pop bc
|
||||
push af
|
||||
call UpdateHPBar_CalcNumberOfHPBarPixels ; calc num pixels for new HP
|
||||
call GetHPBarLength ; calc num pixels for new HP
|
||||
pop af
|
||||
ld d, e
|
||||
ld e, a
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ Func_71c07: ; 71c07 (1c:5c07)
|
|||
call RemovePokemon
|
||||
ld a,$80
|
||||
ld [wcc49],a
|
||||
call AddPokemonToParty
|
||||
call AddPartyMon
|
||||
call Func_71d19
|
||||
callab EvolveTradeMon
|
||||
call ClearScreen
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ ItemUseBall: ; d687 (3:5687)
|
|||
xor a
|
||||
ld [wcc49],a
|
||||
call ClearSprites
|
||||
call AddPokemonToParty ;add mon to Party
|
||||
call AddPartyMon ;add mon to Party
|
||||
jr .End
|
||||
.sendToBox ;$5907
|
||||
call ClearSprites
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
; tests if mon [wcf91] can learn move [wd0e0]
|
||||
TestMonMoveCompatibility: ; 1373e (4:773e)
|
||||
CanLearnTM: ; 1373e (4:773e)
|
||||
ld a, [wcf91]
|
||||
ld [wd0b5], a
|
||||
call GetMonHeader
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
AskForMonNickname: ; 64eb (1:64eb)
|
||||
AskName: ; 64eb (1:64eb)
|
||||
call SaveScreenTilesToBuffer1
|
||||
call GetPredefRegisters
|
||||
push hl
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
DisplayPokedexMenu_: ; 40000 (10:4000)
|
||||
ShowPokedexMenu: ; 40000 (10:4000)
|
||||
call GBPalWhiteOut
|
||||
call ClearScreen
|
||||
call UpdateSprites ; move sprites
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
|
|||
ld hl, $ffde
|
||||
ld de, wPlayerMoney + 2 ; wd349
|
||||
ld c, $3
|
||||
ld a, $c ; SubtractBCDPredef
|
||||
ld a, $c ; SubBCDPredef
|
||||
call Predef
|
||||
ld a, $13
|
||||
ld [wd125], a
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
PrintEmotionBubble: ; 17c47 (5:7c47)
|
||||
EmotionBubble: ; 17c47 (5:7c47)
|
||||
ld a, [wcd50]
|
||||
ld c, a
|
||||
ld b, $0
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ PickupItem:
|
|||
|
||||
ld a, [$ffdb]
|
||||
ld [wcc4d], a
|
||||
ld a, $11 ; RemoveMissableObject
|
||||
ld a, $11 ; HideObject
|
||||
call Predef
|
||||
ld a, 1
|
||||
ld [wcc3c], a
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ Func_705aa: ; 705aa (1c:45aa)
|
|||
ld [hl], a
|
||||
jp Func_70755
|
||||
|
||||
_DoFlyOrTeleportAwayGraphics: ; 705ba (1c:45ba)
|
||||
_LeaveMapAnim: ; 705ba (1c:45ba)
|
||||
call Func_706ef
|
||||
call Func_70787
|
||||
ld a, b
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ Func_56903: ; 56903 (15:6903)
|
|||
ret
|
||||
|
||||
; 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 de
|
||||
ld a, [wTrainerSpriteOffset] ; wWhichTrade
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ SendSGBPacket: ; 71feb (1c:5feb)
|
|||
; else send 16 more bytes
|
||||
jr .loop2
|
||||
|
||||
LoadSGBBorderAndPalettes: ; 7202b (1c:602b)
|
||||
LoadSGB: ; 7202b (1c:602b)
|
||||
xor a
|
||||
ld [wcf1b], a
|
||||
call Func_7209b
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ PredefPointers: ; 4fe79 (13:7e79)
|
|||
dbw BANK(Func_3f0c6),Func_3f0c6
|
||||
dbw BANK(Func_3f073),Func_3f073
|
||||
dbw BANK(ScaleSpriteByTwo), ScaleSpriteByTwo
|
||||
db BANK(LoadMonBackSprite) ; dbw macro gives an error for some reason
|
||||
dw LoadMonBackSprite
|
||||
dbw BANK(LoadMonBackPic), LoadMonBackPic
|
||||
dbw BANK(Func_79aba),Func_79aba
|
||||
dbw BANK(Func_f132),Func_f132
|
||||
HealPartyPredef: ; 4fe8e (13:7e8e)
|
||||
|
|
@ -66,32 +65,24 @@ MoveAnimationPredef: ; 4fe91 (13:7e91)
|
|||
dbw BANK(MoveAnimation),MoveAnimation; 08 play move animation
|
||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||
dbw BANK(AddBCDPredef),AddBCDPredef
|
||||
db BANK(SubtractBCDPredef)
|
||||
dw SubtractBCDPredef
|
||||
dbw BANK(AddBCDPredef), AddBCDPredef
|
||||
dbw BANK(SubBCDPredef), SubBCDPredef
|
||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||
dbw BANK(DivideBCDPredef),DivideBCDPredef
|
||||
db BANK(InitializePlayerData)
|
||||
dw InitializePlayerData
|
||||
dbw BANK(InitPlayerData), InitPlayerData
|
||||
dbw BANK(FlagActionPredef),FlagActionPredef
|
||||
db BANK(RemoveMissableObject)
|
||||
dw RemoveMissableObject
|
||||
db BANK(IsMissableObjectHidden)
|
||||
dw IsMissableObjectHidden
|
||||
dbw BANK(HideObject), HideObject
|
||||
dbw BANK(IsObjectHidden), IsObjectHidden
|
||||
dbw BANK(Func_c69c),Func_c69c
|
||||
db BANK(AnyPlayerPokemonAliveCheck)
|
||||
dw AnyPlayerPokemonAliveCheck
|
||||
db BANK(AddMissableObject)
|
||||
dw AddMissableObject
|
||||
db BANK(AddMissableObject)
|
||||
dw AddMissableObject
|
||||
dbw BANK(AnyPartyAlive), AnyPartyAlive
|
||||
dbw BANK(ShowObject), ShowObject
|
||||
dbw BANK(ShowObject), ShowObject
|
||||
dbw BANK(Func_ee9e),Func_ee9e
|
||||
db BANK(InitializePlayerData)
|
||||
dw InitializePlayerData
|
||||
dbw BANK(InitPlayerData), InitPlayerData
|
||||
dbw BANK(Func_c754),Func_c754
|
||||
dbw BANK(Func_3af5b),Func_3af5b
|
||||
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,GiveItem
|
||||
dbw BANK(Func_480eb),Func_480eb
|
||||
|
|
@ -101,12 +92,10 @@ MoveAnimationPredef: ; 4fe91 (13:7e91)
|
|||
dbw BANK(Func_f9a0),Func_f9a0
|
||||
dbw BANK(Func_48125),Func_48125
|
||||
dbw BANK(UpdateHPBar),UpdateHPBar
|
||||
db BANK(UpdateHPBar_LoadRegisters)
|
||||
dw UpdateHPBar_LoadRegisters
|
||||
dbw BANK(HPBarLength), HPBarLength
|
||||
dbw BANK(Func_5ab0),Func_5ab0
|
||||
dbw BANK(Func_3ed02),Func_3ed02
|
||||
db BANK(DisplayPokedexMenu_)
|
||||
dw DisplayPokedexMenu_
|
||||
dbw BANK(ShowPokedexMenu), ShowPokedexMenu
|
||||
dbw BANK(Func_3ad1c),Func_3ad1c
|
||||
dbw BANK(SaveSAVtoSRAM0),SaveSAVtoSRAM0
|
||||
dbw BANK(InitOpponent),InitOpponent
|
||||
|
|
@ -117,58 +106,46 @@ MoveAnimationPredef: ; 4fe91 (13:7e91)
|
|||
dbw BANK(Func_79dda),Func_79dda
|
||||
dbw BANK(PlayIntro),PlayIntro
|
||||
dbw BANK(Func_79869),Func_79869
|
||||
db BANK(BattleTransition_FlashScreen_)
|
||||
dw BattleTransition_FlashScreen_
|
||||
dbw BANK(FlashScreen), FlashScreen
|
||||
dbw BANK(Func_c586),Func_c586
|
||||
dbw BANK(StatusScreen),StatusScreen ; 37 0x12953
|
||||
dbw BANK(StatusScreen2),StatusScreen2 ; 38
|
||||
dbw BANK(Func_410e2),Func_410e2
|
||||
db BANK(CheckEngagePlayer)
|
||||
dw CheckEngagePlayer
|
||||
dbw BANK(TrainerEngage), TrainerEngage
|
||||
dbw BANK(IndexToPokedex),IndexToPokedex
|
||||
dbw BANK(Predef3B),Predef3B; 3B display pic?
|
||||
dbw BANK(UsedCut),UsedCut
|
||||
dbw BANK(ShowPokedexData),ShowPokedexData
|
||||
dbw BANK(WriteMonMoves),WriteMonMoves
|
||||
dbw BANK(SaveSAV),SaveSAV
|
||||
db BANK(LoadSGBBorderAndPalettes)
|
||||
dw LoadSGBBorderAndPalettes
|
||||
dbw BANK(LoadSGB), LoadSGB
|
||||
dbw BANK(Func_f113),Func_f113
|
||||
dbw BANK(SetPartyMonTypes),SetPartyMonTypes
|
||||
db BANK(TestMonMoveCompatibility)
|
||||
dw TestMonMoveCompatibility
|
||||
dbw BANK(CanLearnTM), CanLearnTM
|
||||
dbw BANK(TMToMove),TMToMove
|
||||
dbw BANK(Func_71ddf),Func_71ddf
|
||||
db BANK(DisplayStarterMonDex)
|
||||
dw DisplayStarterMonDex; 46 load dex screen
|
||||
db BANK(_AddPokemonToParty)
|
||||
dw _AddPokemonToParty
|
||||
dbw BANK(StarterDex), StarterDex ; 46
|
||||
dbw BANK(_AddPartyMon), _AddPartyMon
|
||||
dbw BANK(UpdateHPBar),UpdateHPBar
|
||||
dbw BANK(Func_3cdec),Func_3cdec
|
||||
dbw BANK(LoadTownMap_Nest),LoadTownMap_Nest
|
||||
dbw BANK(Func_27d6b),Func_27d6b
|
||||
db BANK(PrintEmotionBubble)
|
||||
dw PrintEmotionBubble; 4C player exclamation
|
||||
dbw BANK(EmotionBubble), EmotionBubble; 4C player exclamation
|
||||
dbw BANK(Func_5aaf),Func_5aaf; return immediately
|
||||
db BANK(AskForMonNickname)
|
||||
dw AskForMonNickname
|
||||
dbw BANK(AskName), AskName
|
||||
dbw BANK(PewterGuys),PewterGuys
|
||||
dbw BANK(SaveSAVtoSRAM2),SaveSAVtoSRAM2
|
||||
dbw BANK(LoadSAVCheckSum2),LoadSAVCheckSum2
|
||||
dbw BANK(LoadSAV),LoadSAV
|
||||
dbw BANK(SaveSAVtoSRAM1),SaveSAVtoSRAM1
|
||||
dbw BANK(Predef54),Predef54 ; 54 initiate trade
|
||||
db BANK(HallOfFameComputer)
|
||||
dw HallOfFameComputer
|
||||
dbw BANK(HallOfFamePC), HallOfFamePC
|
||||
dbw BANK(DisplayDexRating),DisplayDexRating
|
||||
db $1E ; uses wrong bank number
|
||||
dw _DoFlyOrTeleportAwayGraphics
|
||||
db $1E ; uses wrong bank number
|
||||
dw Func_70510
|
||||
dbw $1E, _LeaveMapAnim ; wrong bank
|
||||
dbw $1E, Func_70510 ; wrong bank
|
||||
dbw BANK(Func_c5be),Func_c5be
|
||||
dbw BANK(Func_c60b),Func_c60b
|
||||
db BANK(PrintUsedStrengthText)
|
||||
dw PrintUsedStrengthText
|
||||
dbw BANK(PrintStrengthTxt), PrintStrengthTxt
|
||||
dbw BANK(PickupItem),PickupItem
|
||||
dbw BANK(Func_27d98),Func_27d98
|
||||
dbw BANK(LoadMovePPs),LoadMovePPs
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
; this function temporarily makes the starters (and Ivysaur) seen
|
||||
; 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 [wPokedexOwned], a ; wPokedexOwned
|
||||
ld a, $3d
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ SlotMachine_37741: ; 37741 (d:7741)
|
|||
ld [hli], a
|
||||
ld de, wPlayerCoins + 1
|
||||
ld c, $2
|
||||
ld a, $c ; SubtractBCDPredef
|
||||
ld a, $c ; SubBCDPredef
|
||||
call Predef
|
||||
|
||||
SlotMachine_37754: ; 37754 (d:7754)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue