mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Use macros for predef calls/jumps instead of static ids.
This commit is contained in:
parent
d10108a066
commit
b36f793667
122 changed files with 360 additions and 719 deletions
|
|
@ -466,10 +466,8 @@ Func_2174b: ; 2174b (8:574b)
|
|||
ld a, $2
|
||||
.asm_217b0
|
||||
ld [wcc49], a
|
||||
ld a, $36
|
||||
call Predef
|
||||
ld a, $37
|
||||
call Predef
|
||||
predef StatusScreen
|
||||
predef StatusScreen2
|
||||
call LoadScreenTilesFromBuffer1
|
||||
call ReloadTilesetTilePatterns
|
||||
call GoPAL_SET_CF1C
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
|
|||
call FarCopyData2
|
||||
ld hl, wTileMap
|
||||
ld bc, $1012
|
||||
ld a, $27
|
||||
call Predef
|
||||
predef Func_5ab0
|
||||
ld hl, DiplomaTextPointersAndCoords ; $6784
|
||||
ld c, $5
|
||||
.asm_56715
|
||||
|
|
|
|||
|
|
@ -9,8 +9,7 @@ MainMenu: ; 5af2 (1:5af2)
|
|||
jr nc,.next0
|
||||
|
||||
; Predef 52 loads the save from SRAM to RAM
|
||||
ld a,$52
|
||||
call Predef
|
||||
predef LoadSAV
|
||||
|
||||
.next0
|
||||
ld c,20
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@ OpenOaksPC: ; 1e915 (7:6915)
|
|||
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
|
||||
and a
|
||||
jr nz, .asm_1e932
|
||||
ld a, $56
|
||||
call Predef
|
||||
predef DisplayDexRating
|
||||
.asm_1e932
|
||||
ld hl, ClosedOaksPCText
|
||||
call PrintText
|
||||
|
|
|
|||
|
|
@ -93,8 +93,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
|
|||
set 0,a
|
||||
ld [$FFF6],a
|
||||
add hl,bc
|
||||
ld a,$60
|
||||
call Predef ; draw HP bar and prints current / max HP
|
||||
predef Func_128f6 ; draw HP bar and prints current / max HP
|
||||
ld a,[$FFF6]
|
||||
res 0,a
|
||||
ld [$FFF6],a
|
||||
|
|
@ -103,8 +102,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
|
|||
jr .printLevel
|
||||
.teachMoveMenu
|
||||
push hl
|
||||
ld a,$43
|
||||
call Predef ; check if the pokemon can learn the move
|
||||
predef CanLearnTM ; check if the pokemon can learn the move
|
||||
pop hl
|
||||
ld de,.ableToLearnMoveText
|
||||
ld a,c
|
||||
|
|
|
|||
|
|
@ -145,8 +145,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
|
|||
call PlaySound ; play sound
|
||||
jr .handleMenuInput
|
||||
.choseArea
|
||||
ld a,$4a
|
||||
call Predef ; display pokemon areas
|
||||
predef LoadTownMap_Nest ; display pokemon areas
|
||||
ld b,0
|
||||
jr .exitSideMenu
|
||||
|
||||
|
|
@ -392,8 +391,7 @@ IsPokemonBitSet: ; 402c2 (10:42c2)
|
|||
dec a
|
||||
ld c,a
|
||||
ld b,2
|
||||
ld a,$10
|
||||
call Predef
|
||||
predef FlagActionPredef
|
||||
ld a,c
|
||||
and a
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -257,8 +257,7 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
|
|||
ld hl,$FFA1
|
||||
ld de,wPlayerCoins + 1
|
||||
ld c,$02 ; how many bytes
|
||||
ld a,$0C
|
||||
call Predef ; subtract coins (BCD daa operations)
|
||||
predef SubBCDPredef ; subtract coins (BCD daa operations)
|
||||
jp PrintPrizePrice
|
||||
.BagFull
|
||||
ld hl,PrizeRoomBagIsFullTextPtr
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
StartMenu_Pokedex: ; 13095 (4:7095)
|
||||
ld a,$29
|
||||
call Predef
|
||||
predef ShowPokedexMenu
|
||||
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
||||
call Delay3
|
||||
call LoadGBPal
|
||||
|
|
@ -98,10 +97,8 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
|||
call ClearSprites
|
||||
xor a
|
||||
ld [wcc49],a
|
||||
ld a,$36
|
||||
call Predef
|
||||
ld a,$37
|
||||
call Predef
|
||||
predef StatusScreen
|
||||
predef StatusScreen2
|
||||
call ReloadMapData
|
||||
jp StartMenu_Pokemon
|
||||
.choseOutOfBattleMove
|
||||
|
|
@ -155,8 +152,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
|||
.cut
|
||||
bit 1,a ; does the player have the Cascade Badge?
|
||||
jp z,.newBadgeRequired
|
||||
ld a,$3c
|
||||
call Predef
|
||||
predef UsedCut
|
||||
ld a,[wcd6a]
|
||||
and a
|
||||
jp z,.loop
|
||||
|
|
@ -181,8 +177,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
|||
.strength
|
||||
bit 3,a ; does the player have the Rainbow Badge?
|
||||
jp z,.newBadgeRequired
|
||||
ld a,$5b
|
||||
call Predef
|
||||
predef PrintStrengthTxt
|
||||
call GBPalWhiteOutWithDelay3
|
||||
jp .goBackToMap
|
||||
.flash
|
||||
|
|
@ -515,8 +510,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
|
|||
xor a
|
||||
ld [$ffd7],a
|
||||
call DrawTrainerInfo
|
||||
ld a,$2e
|
||||
call Predef ; draw badges
|
||||
predef DrawBadges ; draw badges
|
||||
ld b,$0d
|
||||
call GoPAL_SET
|
||||
call GBPalNormal
|
||||
|
|
@ -535,8 +529,7 @@ StartMenu_TrainerInfo: ; 13460 (4:7460)
|
|||
DrawTrainerInfo: ; 1349a (4:749a)
|
||||
ld de,RedPicFront
|
||||
ld bc,(BANK(RedPicFront) << 8) | $01
|
||||
ld a,$3b
|
||||
call Predef
|
||||
predef Predef3B
|
||||
call DisableLCD
|
||||
FuncCoord 0,2
|
||||
ld hl,Coord
|
||||
|
|
@ -711,8 +704,7 @@ StartMenu_SaveReset: ; 135e3 (4:75e3)
|
|||
ld a,[wd72e]
|
||||
bit 6,a ; is the player using the link feature?
|
||||
jp nz,Init
|
||||
ld a,$3f
|
||||
call Predef ; save the game
|
||||
predef SaveSAV ; save the game
|
||||
call LoadScreenTilesFromBuffer2 ; restore saved screen
|
||||
jp HoldTextDisplayOpen
|
||||
|
||||
|
|
|
|||
|
|
@ -84,8 +84,7 @@ StatusScreen: ; 12953 (4:6953)
|
|||
ld a, [W_MONHDEXNUM]
|
||||
ld [wd11e], a
|
||||
ld [wd0b5], a
|
||||
ld a, $3a
|
||||
call Predef
|
||||
predef IndexToPokedex
|
||||
FuncCoord 3,7
|
||||
ld hl, Coord
|
||||
ld de, wd11e
|
||||
|
|
@ -93,8 +92,7 @@ StatusScreen: ; 12953 (4:6953)
|
|||
call PrintNumber ; Pokémon no.
|
||||
FuncCoord 11,10
|
||||
ld hl, Coord
|
||||
ld a, $4b
|
||||
call Predef ; Prints the type (?)
|
||||
predef Func_27d6b ; Prints the type (?)
|
||||
ld hl, NamePointers2 ; $6a9d
|
||||
call .unk_12a7e
|
||||
ld d, h
|
||||
|
|
|
|||
|
|
@ -71,8 +71,7 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0)
|
|||
ld hl, $ffde
|
||||
ld de, wPlayerMoney + 2 ; wd349
|
||||
ld c, $3
|
||||
ld a, $c ; SubBCDPredef
|
||||
call Predef
|
||||
predef SubBCDPredef
|
||||
ld a, $13
|
||||
ld [wd125], a
|
||||
jp DisplayTextBoxID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue