ref: b36f793667924f868282ce979fabab3e95d642a5
parent: d10108a066c102bf2d167ac656d79308e41f304e
author: yenatch <yenatch@gmail.com>
date: Mon Jun 16 09:57:26 EDT 2014
Use macros for predef calls/jumps instead of static ids.
--- a/engine/battle/1.asm
+++ b/engine/battle/1.asm
@@ -76,12 +76,9 @@
xor a
.asm_78aa
ld [wListMenuID], a ; wListMenuID
- ld a, $48
- call Predef
- ld a, $0
- call Predef
- ld a, $49
- call Predef
+ predef UpdateHPBar2
+ predef Func_3cd60
+ predef Func_3cdec
callab ReadPlayerMonCurHPAndStatus
ld hl, SuckedHealthText ; $78dc
ld a, [H_WHOSETURN] ; $fff3
--- a/engine/battle/15.asm
+++ b/engine/battle/15.asm
@@ -17,8 +17,7 @@
ld a, [wWhichPokemon]
ld c, a
ld b, $2
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld a, c
and a
pop hl
@@ -245,14 +244,12 @@
ld [wcc49], a
ld a, [wd0b5]
ld [wd11e], a
- ld a, $1a
- call Predef
+ predef Func_3af5b
ld hl, wccd3
ld a, [wWhichPokemon] ; wWhichPokemon
ld c, a
ld b, $1
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
pop hl
pop af
ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
@@ -277,14 +274,12 @@
ld c, a
ld b, $1
push bc
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld hl, wccf5
xor a
ld [hl], a
pop bc
- ld a, $10 ; FlagActionPredef
- jp Predef
+ predef_jump FlagActionPredef
Func_5546c: ; 5546c (15:546c)
ld a, [wPartyAliveFlags]
--- a/engine/battle/4.asm
+++ b/engine/battle/4.asm
@@ -43,8 +43,7 @@
ld d, a
ld a, [wcfbb]
ld e, a
- ld a, $26
- call Predef
+ predef HPBarLength
ld a, $6
ld d, a
ld c, a
--- a/engine/battle/4_2.asm
+++ b/engine/battle/4_2.asm
@@ -36,15 +36,13 @@
jr z, .asm_1380a
ld de, wPlayerMoney + 2 ; wd349
ld c, $3
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
ld hl, PickUpPayDayMoneyText
call PrintText
.asm_1380a
xor a
ld [wccd4], a
- ld a, $2a
- call Predef
+ predef Func_3ad1c
.asm_13813
xor a
ld [wd083], a
@@ -263,8 +261,7 @@
xor a
.asm_13990
ld [wListMenuID], a ; wListMenuID
- ld a, $48
- call Predef
+ predef UpdateHPBar2
ld hl, HitWithRecoilText ; $799e
jp PrintText
HitWithRecoilText: ; 1399e (4:799e)
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -831,11 +831,9 @@
; if the subaninmation counter is between 8 and 11, shake the screen horizontally and vertically
.shakeScreen
ld b,1
- ld a,$24
- call Predef ; shake horizontally
+ predef Func_48125 ; shake horizontally
ld b,1
- ld a,$21
- jp Predef ; shake vertically
+ predef_jump Func_480ff ; shake vertically
FlashScreenEveryEightFrameBlocks: ; 78ff7 (1e:4ff7)
ld a,[W_SUBANIMCOUNTER]
@@ -1227,8 +1225,7 @@
ld b, $5
Func_79209: ; 79209 (1e:5209)
- ld a, $21
- jp Predef
+ predef_jump Func_480ff
AnimationShakeScreen: ; 7920e (1e:520e)
; Shakes the screen for a while. Used in Earthquake/Fissure/etc. animations.
@@ -1235,8 +1232,7 @@
ld b, $8
Func_79210: ; 79210 (1e:5210)
- ld a, $24
- jp Predef
+ predef_jump Func_48125
AnimationWaterDropletsEverywhere: ; 79215 (1e:5215)
; Draws water droplets all over the screen and makes them
@@ -2143,8 +2139,7 @@
ld [wBattleMonSpecies2], a
ld [wd0b5], a
call GetMonHeader
- ld a, $4
- call Predef
+ predef LoadMonBackPic
xor a
call Func_79842
call Func_79820
--- a/engine/battle/b_2.asm
+++ b/engine/battle/b_2.asm
@@ -120,8 +120,7 @@
ld [hl], a
ld de, wcce7
ld c, $3
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
ld hl, CoinsScatteredText ; $7f04
jp PrintText
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -173,8 +173,7 @@
ld [$ffe1], a
FuncCoord 1, 5
ld hl, Coord
- ld a, $1
- call Predef
+ predef Func_3f0c6
xor a
ld [$ffb0], a
ld [rWY], a ; $ff4a
@@ -320,12 +319,10 @@
ld b, $1
push bc
ld hl, wPartyAliveFlags
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld hl, wccf5
pop bc
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
call Func_3cba6
call LoadScreenTilesFromBuffer1
call Func_3cc91
@@ -751,8 +748,7 @@
.playersTurn
push bc
ld [wListMenuID], a ; wListMenuID
- ld a, $48
- call Predef
+ predef UpdateHPBar2
pop bc
ret
@@ -996,8 +992,7 @@
ld de, wPlayerMoney + 2 ; wd349
ld hl, wd07b
ld c, $3
- ld a, $b ; AddBCDPredef
- jp Predef
+ predef_jump AddBCDPredef
MoneyForWinningText: ; 3c6e4 (f:46e4)
TX_FAR _MoneyForWinningText
@@ -1053,8 +1048,7 @@
ld c, a
ld hl, wPartyAliveFlags ; clear fainted mon's alive flag
ld b, $0
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld hl, W_ENEMYBATTSTATUS1 ; W_ENEMYBATTSTATUS1
res 2, [hl] ; reset "attacking multiple times" flag
ld a, [wd083]
@@ -1153,12 +1147,10 @@
ld hl, wPartyAliveFlags
ld b, $1
push bc
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
pop bc
ld hl, wccf5
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
call Func_3cba6
call GBPalWhiteOut
call Func_3ee5b
@@ -1317,14 +1309,12 @@
ld c,a
ld b,1
push bc
- ld a,$10
- call Predef
+ predef FlagActionPredef
ld hl,wccf5
xor a
ld [hl],a
pop bc
- ld a,$10
- call Predef
+ predef FlagActionPredef
Func_3c92a: ; 3c92a (f:492a)
xor a
ld hl,wd065
@@ -1468,8 +1458,7 @@
ld [$FFE1],a
FuncCoord 15, 6
ld hl,Coord
- ld a,2
- call Predef
+ predef Func_3f073
ld a,[wEnemyMonSpecies2]
call PlayCry
call Func_3cdec
@@ -1759,8 +1748,7 @@
Func_3cca4: ; 3cca4 (f:4ca4)
call Func_3cd60
- ld a, $4
- call Predef
+ predef LoadMonBackPic
xor a
ld [$ffe1], a
ld hl, wcc2d
@@ -1791,8 +1779,7 @@
call PlayMoveAnimation
FuncCoord 4, 11
ld hl, Coord
- ld a, $2
- call Predef
+ predef Func_3f073
ld a, [wcf91]
call PlayCry
call Func_3ee94
@@ -1809,8 +1796,7 @@
xor a
ld [wcd6c], a
ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
- ld a, $5
- call Predef
+ predef Func_79aba
ld c, $4
call DelayFrames
call Func_3cd3a
@@ -1821,8 +1807,7 @@
ld [wcd6c], a
xor a
ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
- ld a, $5
- call Predef
+ predef Func_79aba
call Delay3
call Func_3cd3a
ld a, $4c
@@ -1889,8 +1874,7 @@
ld [wcf91], a
FuncCoord 10, 9
ld hl, Coord
- ld a, $5f
- call Predef
+ predef DrawHP
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
ld hl, wcf1d
@@ -2384,10 +2368,8 @@
ld [wcc49], a
ld hl, wPartyMon1Species ; wPartyMon1Species (aliases: wPartyMon1)
call ClearSprites
- ld a, $36
- call Predef
- ld a, $37
- call Predef
+ predef StatusScreen
+ predef StatusScreen2
ld a, [W_ENEMYBATTSTATUS2] ; W_ENEMYBATTSTATUS2
bit 4, a
ld hl, AnimationSubstitute
@@ -2440,12 +2422,10 @@
ld b, $1
push bc
ld hl, wPartyAliveFlags
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
pop bc
ld hl, wccf5
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
call Func_3cba6
call Func_3cc91
call SaveScreenTilesToBuffer1
@@ -2922,8 +2902,7 @@
call GetCurrentMove
FuncCoord 2, 10
ld hl, Coord
- ld a, $5d
- call Predef
+ predef Func_27d98
.asm_3d54e
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
@@ -3872,8 +3851,7 @@
ld hl, KeptGoingAndCrashedText ; $5c47
call PrintText
ld b, $4
- ld a, $24
- call Predef
+ predef Func_48125
ld a, [H_WHOSETURN] ; $fff3
and a
jr nz, .asm_3dc3f
@@ -4799,8 +4777,7 @@
ld hl,Coord
xor a
ld [wListMenuID],a
- ld a,$48
- call Predef ; animate the HP bar shortening
+ predef UpdateHPBar2 ; animate the HP bar shortening
ApplyAttackToEnemyPokemonDone: ; 3e19d (f:619d)
jp Func_3cd5a ; redraw pokemon names and HP bars
@@ -4919,8 +4896,7 @@
ld hl,Coord
ld a,$01
ld [wListMenuID],a
- ld a,$48
- call Predef ; animate the HP bar shortening
+ predef UpdateHPBar2 ; animate the HP bar shortening
ApplyAttackToPlayerPokemonDone
jp Func_3cd5a ; redraw pokemon names and HP bars
@@ -6147,13 +6123,11 @@
dec de
xor a
ld [wHPBarMaxHP], a
- ld a, $3e
- call Predef
+ predef WriteMonMoves
.asm_3ebca
ld hl, wEnemyMonMoves
ld de, wEnemyMonSpecial + 1
- ld a, $5e
- call Predef
+ predef LoadMovePPs
ld hl, W_MONHBASESTATS
ld de, wd002
ld b, $5
@@ -6178,15 +6152,13 @@
call CopyData
ld a, [wEnemyMonSpecies2]
ld [wd11e], a
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
dec a
ld c, a
ld b, $1
ld hl, wPokedexSeen ; wd30a
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld hl, wEnemyMonLevel ; wEnemyMonLevel
ld de, wcd23
ld bc, $b
@@ -6212,8 +6184,7 @@
call ClearScreen
.asm_3ec4d
call DelayFrame
- ld a, $30
- call Predef
+ predef BattleTransition
callab Func_3ee58
ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ; $ffba
@@ -6255,8 +6226,7 @@
.asm_3ec9e
ld a, BANK(RedPicBack)
call UncompressSpriteFromDE
- ld a, $3
- call Predef
+ predef ScaleSpriteByTwo
ld hl, wOAMBuffer
xor a
ld [H_DOWNARROWBLINKCNT1], a ; $ff8b
@@ -6306,8 +6276,7 @@
ld [$ffe1], a
FuncCoord 1, 5
ld hl, Coord
- ld a, $1
- jp Predef
+ predef_jump Func_3f0c6
Func_3ed02: ; 3ed02 (f:6d02)
callab Func_39680
@@ -6709,8 +6678,7 @@
ld [wAICount], a ; wccdf
FuncCoord 12, 0
ld hl, Coord
- ld a, $1
- call Predef
+ predef Func_3f0c6
ld a, $ff
ld [wEnemyMonPartyPos], a
ld a, $2
@@ -6765,8 +6733,7 @@
ld [$ffe1], a
FuncCoord 12, 0
ld hl, Coord
- ld a, $1
- call Predef
+ predef Func_3f0c6
Func_3efeb: ; 3efeb (f:6feb)
ld b, $0
@@ -6855,8 +6822,7 @@
ld a, $1
ld [wcd6c], a
ld bc, $303
- ld a, $5
- call Predef
+ predef Func_79aba
ld c, $4
call DelayFrames
ld bc, $ffd7
@@ -6864,8 +6830,7 @@
xor a
ld [wcd6c], a
ld bc, $505
- ld a, $5
- call Predef
+ predef Func_79aba
ld c, $5
call DelayFrames
ld bc, $ffd7
@@ -6942,8 +6907,7 @@
call ClearScreenArea
ld hl, W_MONHBACKSPRITE - W_MONHEADER
call UncompressMonSprite
- ld a, $3
- call Predef
+ predef ScaleSpriteByTwo
ld de, vBackPic
call InterlaceMergeSpriteBuffers ; combine the two buffers to a single 2bpp sprite
ld hl, vSprites
@@ -8546,8 +8510,7 @@
push hl
push de
push bc
- ld a, $8
- call Predef
+ predef MoveAnimation
pop bc
pop de
pop hl
--- a/engine/battle/e.asm
+++ b/engine/battle/e.asm
@@ -855,8 +855,7 @@
ld hl,wd047
ld c,2
push bc
- ld a,$B
- call Predef
+ predef AddBCDPredef
pop bc
inc de
inc de
@@ -1178,8 +1177,7 @@
ld hl,Coord
xor a
ld [wListMenuID],a
- ld a,$48
- call Predef
+ predef UpdateHPBar2
jp DecrementAICount
Func_3a72a: ; 3a72a (e:672a)
--- a/engine/battle/e_2.asm
+++ b/engine/battle/e_2.asm
@@ -94,8 +94,7 @@
xor a
.asm_3ba83
ld [wListMenuID], a ; wListMenuID
- ld a, $48
- call Predef
+ predef UpdateHPBar2
ld hl, Func_3cd5a ; $4d5a
call BankswitchEtoF
ld hl, RegainedHealthText ; $7aac
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -273,10 +273,8 @@
call Delay3
ld hl, W_OPTIONS ; W_OPTIONS
res 7, [hl]
- ld a, $2c
- call Predef
- ld a, $7
- call Predef
+ predef InitOpponent
+ predef HealParty
jp Func_577d
.asm_5506
ld c, BANK(Music_GameCorner)
@@ -610,10 +608,8 @@
Func_57d6:
ld a, [wCurrentMenuItem]
ld [wWhichPokemon], a
- ld a, $36
- call Predef
- ld a, $37
- call Predef
+ predef StatusScreen
+ predef StatusScreen2
call GBPalNormal
call LoadTrainerInfoTextBoxTiles
call Func_57f2
@@ -827,12 +823,10 @@
ld a, [$ffaa]
cp $1
jr z, .asm_59d9 ; 0x59d0 $7
- ld a, $38
- call Predef
+ predef Func_410e2
jr .asm_59de ; 0x59d7 $5
.asm_59d9
- ld a, $2f
- call Predef
+ predef Func_410f3
.asm_59de
callab Func_3ad0e
call ClearScreen
@@ -847,8 +841,7 @@
ld hl, wTileMap + $119
ld de, TradeCompleted
call PlaceString
- ld a, $50
- call Predef
+ predef SaveSAVtoSRAM2
ld c, $32
call DelayFrames
xor a
@@ -885,8 +878,7 @@
jr z, .asm_5a75
cp $5
ret nz
- ld a, $4d
- call Predef
+ predef Func_5aaf
jp Init
.asm_5a75
call Func_5317
--- a/engine/evos_moves.asm
+++ b/engine/evos_moves.asm
@@ -152,8 +152,7 @@
push af
ld a, [wd0b5]
ld [wd11e], a
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
dec a
ld hl, BaseStats
@@ -205,13 +204,11 @@
ld [wcc49], a
call Func_3af5b
pop hl
- ld a, $42
- call Predef
+ predef SetPartyMonTypes
ld a, [W_ISINBATTLE] ; W_ISINBATTLE
and a
call z, Func_3af52
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
dec a
ld c, a
@@ -361,8 +358,7 @@
ld [wd11e], a
call GetMoveName
call CopyStringToCF4B
- ld a, $1b
- call Predef
+ predef LearnMove
.asm_3afb1
ld a, [wcf91]
ld [wd11e], a
@@ -489,7 +485,6 @@
ret
Func_3b057: ; 3b057 (e:7057)
- ld a, $10 ; FlagActionPredef
- jp Predef
+ predef_jump FlagActionPredef
INCLUDE "data/evos_moves.asm"
--- a/engine/game_corner_slots2.asm
+++ b/engine/game_corner_slots2.asm
@@ -3,8 +3,7 @@
and $8
jr z, .done ; not able
ld b, COIN_CASE
- ld a, $1c
- call Predef ; IsItemInBag_
+ predef IsItemInBag_ ; IsItemInBag_
ld a, b
and a
ld b, $33 ; GameCornerCoinCaseText
--- a/engine/give_pokemon.asm
+++ b/engine/give_pokemon.asm
@@ -52,15 +52,13 @@
ld a, [wcf91]
push af
ld [wd11e], a
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
dec a
ld c, a
ld hl, wPokedexOwned ; wPokedexOwned
ld b, $1
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
pop af
ld [wd11e], a
call GetMonName
--- a/engine/hall_of_fame.asm
+++ b/engine/hall_of_fame.asm
@@ -117,8 +117,7 @@
ld hl, Coord
call GetMonHeader
call LoadFrontSpriteByMonIndex
- ld a, $4
- call Predef
+ predef LoadMonBackPic
.asm_702ab
ld b, $b
ld c, $0
@@ -179,8 +178,7 @@
ld [wd0b5], a
FuncCoord 3, 9
ld hl, Coord
- ld a, $4b
- call Predef
+ predef Func_27d6b
ld a, [wWhichTrade] ; wWhichTrade
jp PlayCry
@@ -202,8 +200,7 @@
ld de, RedPicBack ; $7e0a
ld a, BANK(RedPicBack)
call UncompressSpriteFromDE
- ld a, $3
- call Predef
+ predef ScaleSpriteByTwo
ld de, vBackPic
call InterlaceMergeSpriteBuffers
ld c, $1
@@ -212,14 +209,12 @@
ld b, $0
FuncCoord 12, 5
ld hl, Coord
- ld a, $31
- jp Predef
+ predef_jump Func_79dda
Func_70377: ; 70377 (1c:4377)
ld hl, wd747
set 3, [hl]
- ld a, $56
- call Predef
+ predef DisplayDexRating
FuncCoord 0, 4
ld hl, Coord
ld b, $6
--- a/engine/hidden_object_functions17.asm
+++ b/engine/hidden_object_functions17.asm
@@ -79,8 +79,7 @@
ld [$ffe1], a
FuncCoord 10, 11
ld hl, Coord
- ld a, $2
- call Predef
+ predef Func_3f073
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
call Delay3
--- a/engine/hidden_object_functions7.asm
+++ b/engine/hidden_object_functions7.asm
@@ -194,8 +194,7 @@
CinnabarGymQuiz_1ea8a: ; 1ea8a (7:6a8a)
ld hl, wd79c
- ld a, $10 ; FlagActionPredef
- jp Predef
+ predef_jump FlagActionPredef
CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
call YesNoChoice
@@ -227,8 +226,7 @@
ld c, a
ld b, $2
ld hl, wd79a
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld a, c
and a
ret nz
@@ -293,8 +291,7 @@
.asm_1eb38
pop bc
ld [wd09f], a
- ld a, $17
- call Predef
+ predef Func_ee9e
ld hl, $ffdb
dec [hl]
jr nz, .asm_1eb0e
--- a/engine/in_game_trades.asm
+++ b/engine/in_game_trades.asm
@@ -39,8 +39,7 @@
ld a,[wWhichTrade]
ld c,a
ld b,$2
- ld a,$10
- call Predef
+ predef FlagActionPredef
ld a,c
and a
ld a,$4
@@ -112,8 +111,7 @@
ld a,[wWhichTrade]
ld c,a
ld b,$1
- ld a,$10
- call Predef
+ predef FlagActionPredef
ld hl, ConnectCableText
call PrintText
ld a,[wWhichPokemon]
@@ -122,8 +120,7 @@
push af
call LoadHpBarAndStatusTilePatterns
call Func_71cc1
- ld a,$38
- call Predef
+ predef Func_410e2
pop af
ld [W_CURENEMYLVL],a
pop af
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -264,12 +264,10 @@
Func_41842: ; 41842 (10:5842)
ld c, $0
- ld a, $31
- jp Predef
+ predef_jump Func_79dda
Func_41849: ; 41849 (10:5849)
- ld a, $33
- call Predef
+ predef Func_79869
ld a, b
jp PlaySound
--- a/engine/items/itemfinder.asm
+++ b/engine/items/itemfinder.asm
@@ -11,8 +11,7 @@
ld hl, wd6f0
ld c, b
ld b, $2
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld a, c
pop hl
pop bc
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -326,8 +326,7 @@
push af
ld a,[wcf91]
push af
- ld a,$08 ;probably animations
- call Predef
+ predef MoveAnimation
pop af
ld [wcf91],a
pop af
@@ -397,15 +396,13 @@
jr z,.printText1
ld hl,ItemUseBallText05
call PrintText
- ld a,$3a ;convert order: Internal->Dex
- call Predef
+ predef IndexToPokedex
ld a,[wd11e]
dec a
ld c,a
ld b,2
ld hl,wPokedexOwned ;Dex_own_flags (pokemon)
- ld a,$10
- call Predef ;check Dex flag (own already or not)
+ predef FlagActionPredef
ld a,c
push af
ld a,[wd11e]
@@ -412,8 +409,7 @@
dec a
ld c,a
ld b,1
- ld a,$10 ;set Dex_own_flag?
- call Predef
+ predef FlagActionPredef
pop af
and a
jr nz,.checkParty
@@ -422,8 +418,7 @@
call ClearSprites
ld a,[wEnemyMonSpecies] ;caught mon_ID
ld [wd11e],a
- ld a,$3d
- call Predef
+ predef ShowPokedexData
.checkParty ;$58f4
ld a,[wPartyCount]
cp a,6 ;is party full?
@@ -627,8 +622,7 @@
db "@"
ItemUsePokedex: ; da56 (3:5a56)
- ld a,$29
- jp Predef
+ predef_jump ShowPokedexMenu
ItemUseEvoStone: ; da5b (3:5a5b)
ld a,[W_ISINBATTLE]
@@ -783,8 +777,7 @@
ld de,wBattleMonMaxHP
ld bc,10
call CopyData ; copy party stats to in-battle stat data
- ld a,$28
- call Predef
+ predef Func_3ed02
jp .doneHealing
.healHP
inc hl ; hl = address of current HP
@@ -814,8 +807,7 @@
ld c,a
ld hl,wccf5
ld b,$02
- ld a,$10
- call Predef
+ predef FlagActionPredef
ld a,c
and a
jr z,.next
@@ -823,8 +815,7 @@
ld c,a
ld hl,wPartyAliveFlags
ld b,$01
- ld a,$10
- call Predef
+ predef FlagActionPredef
.next
pop bc
pop de
@@ -934,8 +925,7 @@
ld [$fff6],a
ld a,$02
ld [wListMenuID],a
- ld a,$48
- call Predef ; animate HP bar decrease of pokemon that used Softboiled
+ predef UpdateHPBar2 ; animate HP bar decrease of pokemon that used Softboiled
ld a,[$fff6]
res 0,a
ld [$fff6],a
@@ -1085,8 +1075,7 @@
ld [$fff6],a
ld a,$02
ld [wListMenuID],a
- ld a,$48
- call Predef ; animate the HP bar lengthening
+ predef UpdateHPBar2 ; animate the HP bar lengthening
ld a,[$fff6]
res 0,a
ld [$fff6],a
@@ -1285,8 +1274,7 @@
call WaitForTextScrollButtonPress ; wait for button press
xor a
ld [wcc49],a
- ld a,$1a
- call Predef ; learn level up move, if any
+ predef Func_3af5b ; learn level up move, if any
xor a
ld [wccd4],a
callab Func_3ad0e ; evolve pokemon, if appropriate
@@ -1356,8 +1344,7 @@
ld a,$ff
.noCarry
ld [hl],a
- ld a,$08
- call Predef ; do animation
+ predef MoveAnimation ; do animation
ld c,70
jp DelayFrames
@@ -2096,8 +2083,7 @@
.skipAdding
inc a
ld [wd11e],a
- ld a,$44
- call Predef ; get move ID from TM/HM ID
+ predef TMToMove ; get move ID from TM/HM ID
ld a,[wd11e]
ld [wd0e0],a
call GetMoveName
@@ -2152,8 +2138,7 @@
call GoPAL_SET_CF1C
jp LoadScreenTilesFromBuffer1 ; restore saved screen
.checkIfAbleToLearnMove
- ld a,$43
- call Predef ; check if the pokemon can learn the move
+ predef CanLearnTM ; check if the pokemon can learn the move
push bc
ld a,[wWhichPokemon]
ld hl,wPartyMonNicks
@@ -2171,8 +2156,7 @@
.checkIfAlreadyLearnedMove
callab CheckIfMoveIsKnown ; check if the pokemon already knows the move
jr c,.chooseMon
- ld a,$1b
- call Predef ; teach move
+ predef LearnMove ; teach move
pop af
ld [wcf91],a
pop af
@@ -2232,8 +2216,7 @@
call Delay3
ld a,TOSS_ANIM
ld [W_ANIMATIONID],a
- ld a,$08
- call Predef ; do animation
+ predef MoveAnimation ; do animation
ld hl,ThrowBallAtTrainerMonText1
call PrintText
ld hl,ThrowBallAtTrainerMonText2
@@ -2321,8 +2304,7 @@
call AddNTimes
push hl
ld de,wcd78 - 1
- ld a,$5e
- call Predef ; loads the normal max PP of each of the pokemon's moves to wcd78
+ predef LoadMovePPs ; loads the normal max PP of each of the pokemon's moves to wcd78
pop hl
ld c,21
ld b,0
@@ -2574,8 +2556,7 @@
ld c,a
ld hl,wHPBarMaxHP
ld b,$02 ; test bit
- ld a,$10
- call Predef ; bitfield operation function
+ predef FlagActionPredef ; bitfield operation function
ld a,c
and a
ret nz
@@ -2674,8 +2655,7 @@
ld hl, wBoxMonNicks
ld a, $2
ld [wd07d], a
- ld a, $4e
- call Predef
+ predef AskName
ld a, [W_NUMINBOX] ; wda80
dec a
jr z, .asm_e867
--- a/engine/items/tms.asm
+++ b/engine/items/tms.asm
@@ -18,8 +18,7 @@
.TMfoundLoop
pop hl
ld b, $2 ; read corresponding bit from TM compatibility array
- ld a, $10 ; FlagActionPredef
- jp Predef
+ predef_jump FlagActionPredef
; converts TM/HM number in wd11e into move number
; HMs start at 51
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -466,10 +466,8 @@
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
--- a/engine/menu/diploma.asm
+++ b/engine/menu/diploma.asm
@@ -14,8 +14,7 @@
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
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -9,8 +9,7 @@
jr nc,.next0
; Predef 52 loads the save from SRAM to RAM
- ld a,$52
- call Predef
+ predef LoadSAV
.next0
ld c,20
--- a/engine/menu/oaks_pc.asm
+++ b/engine/menu/oaks_pc.asm
@@ -8,8 +8,7 @@
ld a, [wCurrentMenuItem] ; wCurrentMenuItem
and a
jr nz, .asm_1e932
- ld a, $56
- call Predef
+ predef DisplayDexRating
.asm_1e932
ld hl, ClosedOaksPCText
call PrintText
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -93,8 +93,7 @@
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 @@
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
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -145,8 +145,7 @@
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 @@
dec a
ld c,a
ld b,2
- ld a,$10
- call Predef
+ predef FlagActionPredef
ld a,c
and a
ret
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -257,8 +257,7 @@
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
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -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 @@
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 @@
.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 @@
.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 @@
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 @@
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 @@
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
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -84,8 +84,7 @@
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 @@
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
--- a/engine/menu/vending_machine.asm
+++ b/engine/menu/vending_machine.asm
@@ -71,8 +71,7 @@
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
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -377,8 +377,7 @@
GetPartyMonSpriteID: ; 718e9 (1c:58e9)
ld [wd11e], a
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
ld c, a
dec a
--- a/engine/oak_speech.asm
+++ b/engine/oak_speech.asm
@@ -41,8 +41,7 @@
call ClearScreen
call LoadTextBoxTilePatterns
call SetDefaultNames
- ld a,$18
- call Predef
+ predef InitPlayerData2
ld hl,wNumBoxItems
ld a,POTION
ld [wcf91],a
@@ -234,5 +233,4 @@
.next
xor a
ld [$FFE1],a
- ld a,1
- jp Predef
+ predef_jump Func_3f0c6
--- a/engine/overworld/card_key.asm
+++ b/engine/overworld/card_key.asm
@@ -8,8 +8,7 @@
ret z
cp b
jr nz, .asm_5267a
- ld a, $35
- call Predef
+ predef Func_c586
ld a, [wcfc6]
cp $18
jr z, .asm_5269c
@@ -49,8 +48,7 @@
ld a, $e
.asm_526ca
ld [wd09f], a
- ld a, $17
- call Predef
+ predef Func_ee9e
ld hl, wd126
set 5, [hl]
ld a, (SFX_1f_57 - SFX_Headers_1f) / 3
--- a/engine/overworld/hidden_items.asm
+++ b/engine/overworld/hidden_items.asm
@@ -6,8 +6,7 @@
ld a, [wTrainerScreenX]
ld c, a
ld b, $2
- ld a, $10
- call Predef
+ predef FlagActionPredef
ld a, c
and a
ret nz
@@ -35,8 +34,7 @@
ld a, [wTrainerScreenX]
ld c, a
ld b, $1
- ld a, $10
- call Predef
+ predef FlagActionPredef
ld a, (SFX_02_3b - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent ; play sound
call WaitForSoundToFinish ; wait for sound to finish playing
@@ -55,8 +53,7 @@
HiddenCoins: ; 76799 (1d:6799)
ld b, COIN_CASE
- ld a, $1c
- call Predef
+ predef IsItemInBag_
ld a, b
and a
ret z
@@ -67,8 +64,7 @@
ld a, [wTrainerScreenX]
ld c, a
ld b, $2
- ld a, $10
- call Predef
+ predef FlagActionPredef
ld a, c
and a
ret nz
@@ -104,14 +100,12 @@
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
ld hl, wd6fe
ld a, [wTrainerScreenX]
ld c, a
ld b, $1
- ld a, $10
- call Predef
+ predef FlagActionPredef
call EnableAutoTextBoxDrawing
ld a, [wPlayerCoins]
cp $99
--- a/engine/overworld/item.asm
+++ b/engine/overworld/item.asm
@@ -32,8 +32,7 @@
ld a, [$ffdb]
ld [wcc4d], a
- ld a, $11 ; HideObject
- call Predef
+ predef HideObject
ld a, 1
ld [wcc3c], a
ld hl, FoundItemText
--- a/engine/overworld/ledges.asm
+++ b/engine/overworld/ledges.asm
@@ -5,8 +5,7 @@
ld a, [W_CURMAPTILESET] ; W_CURMAPTILESET
and a ; OVERWORLD
ret nz
- ld a, $35
- call Predef
+ predef Func_c586
ld a, [wSpriteStateData1 + 9]
ld b, a
FuncCoord 8, 9
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -458,8 +458,7 @@
; tests if sprite is off screen or otherwise unable to do anything
CheckSpriteAvailability: ; 50dc (1:50dc)
- ld a, $12
- call Predef
+ predef IsObjectHidden
ld a, [$ffe5]
and a
jp nz, .spriteInvisible
--- a/engine/overworld/npc_movement.asm
+++ b/engine/overworld/npc_movement.asm
@@ -86,8 +86,7 @@
ld a, [wcca1]
ld [wcd38], a
ld [$ff95], a
- ld a, $23
- call Predef
+ predef Func_f9a0
call Func_3486
ld a, $2
ld [wcf10], a
@@ -145,8 +144,7 @@
ret nz
ld a, $0
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd730
res 7, [hl]
ld hl, wd72e
@@ -175,8 +173,7 @@
ld [wcd38], a
xor a
ld [wd12f], a
- ld a, $4f
- call Predef
+ predef PewterGuys
ld hl, wcc97
ld de, RLEList_PewterMuseumGuy
call DecodeRLEList
@@ -233,8 +230,7 @@
ld [wcd38], a
ld a, $1
ld [wd12f], a
- ld a, $4f
- call Predef
+ predef PewterGuys
ld hl, wcc97
ld de, RLEList_PewterGymGuy
call DecodeRLEList
--- a/engine/overworld/player_animations.asm
+++ b/engine/overworld/player_animations.asm
@@ -421,8 +421,7 @@
xor a
ld [hli], a
ld [hl], a
- ld a, $4c
- call Predef
+ predef EmotionBubble
ld a, [wSpriteStateData1 + 2]
cp $4
jr nz, .asm_70833
--- a/engine/palettes.asm
+++ b/engine/palettes.asm
@@ -268,8 +268,7 @@
and a
jr z, .idZero
push bc
- ld a, $3A
- call Predef ; turn Pokemon ID number into Pokedex number
+ predef IndexToPokedex ; turn Pokemon ID number into Pokedex number
pop bc
ld a, [wd11e]
.idZero
--- a/engine/predefs.asm
+++ b/engine/predefs.asm
@@ -49,7 +49,7 @@
ret
-PredefPointers: ; 4fe79 (13:7e79)
+PredefPointers:: ; 4fe79 (13:7e79)
; these are pointers to ASM routines.
; they appear to be used in overworld map scripts.
add_predef Func_3cd60
--- a/engine/predefs17.asm
+++ b/engine/predefs17.asm
@@ -3,8 +3,7 @@
StarterDex: ; 5c0dc (17:40dc)
ld a, %01001011 ; set starter flags
ld [wPokedexOwned], a ; wPokedexOwned
- ld a, $3d
- call Predef
+ predef ShowPokedexData
xor a ; unset starter flags
ld [wPokedexOwned], a ; wPokedexOwned
ret
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -17,8 +17,7 @@
xor a
ld [hli], a
ld [hl], $2
- ld a, $4c
- call Predef
+ predef EmotionBubble
call GBPalWhiteOutWithDelay3
call LoadSlotMachineTiles
call LoadFontTilePatterns
@@ -618,8 +617,7 @@
ld [hli], a
ld de, wPlayerCoins + 1
ld c, $2
- ld a, $c ; SubBCDPredef
- call Predef
+ predef SubBCDPredef
SlotMachine_37754: ; 37754 (d:7754)
ld hl, wTileMap + $19
@@ -660,8 +658,7 @@
ld hl, wcd47
ld de, wPlayerCoins + 1
ld c, $2
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
call SlotMachine_37754
call SlotMachine_3775f
ld a, (SFX_1f_65 - SFX_Headers_1f) / 3
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -766,5 +766,4 @@
ld [W_ANIMATIONID], a ; W_ANIMATIONID
xor a
ld [wcc5b], a
- ld a, $8
- jp Predef
+ predef_jump MoveAnimation
--- a/engine/trade2.asm
+++ b/engine/trade2.asm
@@ -5,8 +5,7 @@
call PlaceString
ld a,[wWhichTrade]
ld [wd11e],a
- ld a,$3A
- call Predef
+ predef IndexToPokedex
FuncCoord 9, 0
ld hl,Coord
ld de,wd11e
@@ -33,8 +32,7 @@
call PlaceString
ld a,[wTrainerEngageDistance]
ld [wd11e],a
- ld a,$3A
- call Predef
+ predef IndexToPokedex
FuncCoord 9, 10
ld hl,Coord
ld de,wd11e
--- a/home.asm
+++ b/home.asm
@@ -275,8 +275,7 @@
push af
ld a, [wcf91]
ld [wd11e], a
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld hl, wd11e
ld a, [hl]
pop bc
@@ -576,8 +575,7 @@
jr z,.specialID
cp a,MEW
jr z,.mew
- ld a,$3a
- call Predef ; convert pokemon ID in [wd11e] to pokedex number
+ predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number
ld a,[wd11e]
dec a
ld bc,28
@@ -1509,8 +1507,7 @@
Predef5CText:: ; 24f4 (0:24f4)
; XXX better label (what does predef $5C do?)
db $08 ; asm
- ld a, $5c
- call Predef
+ predef PickupItem
jp TextScriptEnd
@@ -1862,8 +1859,7 @@
ld de,wPlayerMoney + 2
ld hl,$ffa1 ; total price of items
ld c,3 ; length of money in bytes
- ld a,$0b
- call Predef ; add total price to money
+ predef AddBCDPredef ; add total price to money
ld a,$13
ld [wd125],a
call DisplayTextBoxID ; redraw money text box
@@ -2182,8 +2178,7 @@
ld de,$ffa1
ld hl,$ff8d
push bc
- ld a,$0b
- call Predef ; add the individual price to the current sum
+ predef AddBCDPredef ; add the individual price to the current sum
pop bc
dec b
jr nz,.addLoop
@@ -2195,8 +2190,7 @@
ld [$ffa3],a
ld a,$02
ld [$ffa4],a
- ld a,$0d
- call Predef ; halves the price
+ predef DivideBCDPredef3 ; halves the price
; store the halved price
ld a,[$ffa2]
ld [$ff9f],a
@@ -2843,8 +2837,7 @@
ret
TrainerFlagAction::
- ld a, $10 ; FlagActionPredef
- jp Predef
+ predef_jump FlagActionPredef
; direct talking to a trainer (rather than getting seen by one)
TalkToTrainer:: ; 31cc (0:31cc)
@@ -2900,8 +2893,7 @@
ld [wcd4f], a
xor a
ld [wcd50], a
- ld a, $4c
- call Predef
+ predef EmotionBubble
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
ld [wJoyIgnore], a
xor a
@@ -2960,8 +2952,7 @@
inc hl
ld a, [hl]
ld [wcc4d], a ; load corresponding missable object index and remove it
- ld a, $11
- call Predef
+ predef HideObject
.skipRemoveSprite
ld hl, wd730
bit 4, [hl]
@@ -3048,8 +3039,7 @@
ld a, [wcf13]
swap a
ld [wTrainerSpriteOffset], a ; wWhichTrade
- ld a, $39
- call Predef
+ predef TrainerEngage
pop de
pop hl
ld a, [wTrainerSpriteOffset] ; wWhichTrade
@@ -3258,8 +3248,7 @@
; set zero flag if item isn't in player's bag
; else reset zero flag
; related to Pokémon Tower and ghosts
- ld a,$1C
- call Predef
+ predef IsItemInBag_
ld a,b
and a
ret
@@ -4011,8 +4000,7 @@
call HandleDownArrowBlinkTiming
pop hl
call JoypadLowSensitivity
- ld a, $2d
- call Predef
+ predef Func_5a5f
ld a, [$ffb5]
and A_BUTTON | B_BUTTON
jr z, .asm_3872
@@ -5079,8 +5067,7 @@
ld a,[wcf1b]
and a
ret z
- ld a,$45
- jp Predef
+ predef_jump Func_71ddf
GetHealthBarColor::
; Return at hl the palette of
--- a/home/overworld.asm
+++ b/home/overworld.asm
@@ -98,8 +98,7 @@
and a
jp z,OverworldLoop
.displayDialogue
- ld a,$35
- call Predef ; check what is in front of the player
+ predef Func_c586 ; check what is in front of the player
call UpdateSprites ; move sprites
ld a,[wFlags_0xcd60]
bit 2,a
@@ -117,8 +116,7 @@
ld a,$00
ld [wcc47],a
jr z,.changeMap
- ld a,$52
- call Predef
+ predef LoadSAV
ld a,[W_CURMAP]
ld [wd71a],a
call Func_62ce
@@ -301,8 +299,7 @@
ld a,[W_ISINBATTLE]
and a
jp nz,CheckWarpsNoCollision
- ld a,$13
- call Predef ; decrement HP of poisoned pokemon
+ predef Func_c69c ; decrement HP of poisoned pokemon
ld a,[wd12d]
and a
jp nz,HandleBlackOut ; if all pokemon fainted
@@ -1070,8 +1067,7 @@
and a
jr z,.extendRangeOverCounter
; if there are signs
- ld a,$35
- call Predef ; get the coordinates in front of the player in de
+ predef Func_c586 ; get the coordinates in front of the player in de
ld hl,wd4b1 ; start of sign coordinates
ld a,[wd4b0] ; number of signs in the map
ld b,a
@@ -1105,8 +1101,7 @@
jr nz,.signLoop
; check if the player is front of a counter in a pokemon center, pokemart, etc. and if so, extend the range at which he can talk to the NPC
.extendRangeOverCounter
- ld a,$35
- call Predef ; get the tile in front of the player in c
+ predef Func_c586 ; get the tile in front of the player in c
ld hl,W_TILESETTALKINGOVERTILES ; list of tiles that extend talking range (counter tiles)
ld b,$03
ld d,$20 ; talking range in pixels (long range)
@@ -1246,8 +1241,7 @@
; function that checks if the tile in front of the player is passable
; clears carry if it is, sets carry if not
CheckTilePassable:: ; 0c10 (0:0c10)
- ld a,$35
- call Predef ; get tile in front of player
+ predef Func_c586 ; get tile in front of player
ld a,[wcfc6] ; tile in front of player
ld c,a
ld hl,W_TILESETCOLLISIONPTR ; pointer to list of passable tiles
@@ -1271,8 +1265,7 @@
; sets carry if there is a collision and unsets carry if not
CheckForJumpingAndTilePairCollisions:: ; 0c2a (0:0c2a)
push hl
- ld a,$35
- call Predef ; get the tile in front of the player
+ predef Func_c586 ; get the tile in front of the player
push de
push bc
callba HandleLedges ; check if the player is trying to jump a ledge
@@ -1920,8 +1913,7 @@
ld hl,TilePairCollisionsWater
call CheckForJumpingAndTilePairCollisions
jr c,.collision
- ld a,$35
- call Predef ; get tile in front of player (puts it in c and [wcfc6])
+ predef Func_c586 ; get tile in front of player (puts it in c and [wcfc6])
ld a,[wcfc6] ; tile in front of player
cp a,$14 ; water tile
jr z,.noCollision ; keep surfing if it's a water tile
@@ -2274,8 +2266,7 @@
dec b
jp nz,.loadSpriteLoop
.finishUp
- ld a,$19
- call Predef ; load tileset data
+ predef Func_c754 ; load tileset data
callab LoadWildData ; load wild pokemon data
pop hl ; restore hl from before going to the warp/sign/sprite data (this value was saved for seemingly no purpose)
ld a,[W_CURMAPHEIGHT] ; map height in 4x4 tile blocks
--- a/main.asm
+++ b/main.asm
@@ -49,8 +49,7 @@
ld [$ffa3], a
ld a, 2
ld [$ffa4], a
- ld a, $d ; DivideBCDPredef
- call Predef
+ predef DivideBCDPredef3
ld a, [$ffa2]
ld [wPlayerMoney], a
ld a, [$ffa2 + 1]
@@ -65,8 +64,7 @@
set 6, [hl]
ld a, %11111111
ld [wJoyIgnore], a
- ld a, $7 ; HealParty
- jp Predef
+ predef_jump HealParty
MewPicFront:: INCBIN "pic/bmon/mew.pic"
@@ -520,8 +518,7 @@
Func_62ce: ; 62ce (1:62ce)
call Func_62ff
- ld a,$19
- call Predef
+ predef Func_c754
ld hl,wd732
bit 2,[hl]
res 2,[hl]
@@ -714,8 +711,7 @@
ld de,wPlayerMoney + 2
ld hl,$ffa1 ; total price of items
ld c,3 ; length of money in bytes
- ld a,$0c
- call Predef ; subtract total price from money
+ predef SubBCDPredef ; subtract total price from money
ld a,$13
ld [wd125],a
call DisplayTextBoxID ; redraw money text box
@@ -1927,22 +1923,19 @@
Func_7c18: ; 7c18 (1:7c18)
ld hl, wd730
set 6, [hl]
- ld a, $3d
- call Predef
+ predef ShowPokedexData
ld hl, wd730
res 6, [hl]
call ReloadMapData
ld c, $a
call DelayFrames
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
dec a
ld c, a
ld b, $1
ld hl, wPokedexSeen
- ld a, $10
- call Predef
+ predef FlagActionPredef
ld a, $1
ld [wcc3c], a
ret
@@ -2531,13 +2524,11 @@
and a
jr z, .asm_c733
ld b, $2
- ld a, $1f
- call Predef
+ predef Func_480eb
ld a, (SFX_02_43 - SFX_Headers_02) / 3
call PlaySound
.asm_c733
- ld a, $14
- call Predef
+ predef AnyPartyAlive
ld a, d
and a
jr nz, .asm_c74f
@@ -3137,8 +3128,7 @@
ld c, a
ld b, $1
ld hl, W_TOWNVISITEDFLAG ; mark town as visited (for flying)
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
.notInTown
ld hl, MapHSPointers
ld a, [W_CURMAP] ; W_CURMAP
@@ -3378,8 +3368,7 @@
ld a, [hJoyHeld]
and $f0
ret z
- ld a, $5a
- call Predef
+ predef Func_c60b
ld a, [wd71c]
and a
jp nz, Func_f2dd
@@ -3499,8 +3488,7 @@
call SkipFixedLengthTextEntries
ld a, $2
ld [wd07d], a
- ld a, $4e
- call Predef
+ predef AskName
.asm_f33f
ld hl, wPartyMons
ld a, [wcc49]
@@ -3532,8 +3520,7 @@
ld a, [wcf91]
ld [wd11e], a
push de
- ld a, $3a
- call Predef
+ predef IndexToPokedex
pop de
ld a, [wd11e]
dec a
@@ -3635,8 +3622,7 @@
dec de
xor a
ld [wHPBarMaxHP], a
- ld a, $3e
- call Predef
+ predef WriteMonMoves
pop de
ld a, [wPlayerID] ; set trainer ID to player ID
inc de
@@ -3770,8 +3756,7 @@
call CopyData ; write new mon's nickname (from an enemy mon)
ld a, [wcf91]
ld [wd11e], a
- ld a, $3a
- call Predef
+ predef IndexToPokedex
ld a, [wd11e]
dec a
ld c, a
--- a/scripts/agatha.asm
+++ b/scripts/agatha.asm
@@ -24,8 +24,7 @@
AgathaScript_76459: ; 76459 (1d:6459)
ld [wd09f], a
ld bc, $2
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
AgathaScript_76464: ; 76464 (1d:6464)
xor a
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -41,8 +41,7 @@
ret nz
ld a, $61
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd7f2
set 6, [hl]
xor a
@@ -70,8 +69,7 @@
call Func_32f9
ld a, $62
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld c, $8
call DelayFrames
ld a, $2
@@ -165,12 +163,10 @@
set 4, [hl]
ld a, $7
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $9
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
.asm_5491f ; 0x1e8a9
ld hl, BillsHouseText_1e8cb
call PrintText
--- a/scripts/blueshouse.asm
+++ b/scripts/blueshouse.asm
@@ -44,8 +44,7 @@
jr nc, .BagFull
ld a,$29
ld [wcc4d],a
- ld a,$11
- call Predef ; hide table map object
+ predef HideObject ; hide table map object
ld hl,GotMapText
call PrintText
ld hl,wd74a
--- a/scripts/bruno.asm
+++ b/scripts/bruno.asm
@@ -24,8 +24,7 @@
BrunoScript_76302: ; 76302 (1d:6302)
ld [wd09f], a
ld bc, $2
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
BrunoScript_7630d: ; 7630d (1d:630d)
xor a
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -34,8 +34,7 @@
ld a, $2a
ld [wd09f], a
ld bc, $0208
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
CeladonGameCornerScript_48c07: ; 48c07 (12:4c07)
xor a
@@ -97,8 +96,7 @@
ld [wJoyIgnore], a
ld a, $46
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd126
set 5, [hl]
set 6, [hl]
@@ -157,8 +155,7 @@
ld hl, $ffa1
ld de, wPlayerMoney + 2
ld c, $3
- ld a, $c ; SubBCDPredef
- call Predef
+ predef SubBCDPredef
xor a
ldh [$9f], a
ldh [$a0], a
@@ -167,8 +164,7 @@
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
call CeladonGameCornerScript_48f1e
ld hl, CeladonGameCornerText_48d27
jr .asm_e2afd ; 0x48d0d
@@ -236,8 +232,7 @@
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
ld hl, wd77e
set 2, [hl]
ld a, $1
@@ -319,8 +314,7 @@
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
ld hl, wd77e
set 4, [hl]
ld hl, Received20CoinsText
@@ -373,8 +367,7 @@
ld de, wPlayerCoins + 1
ld hl, $ffa1
ld c, $2
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
ld hl, wd77e
set 3, [hl]
ld hl, CeladonGameCornerText_48e8d
@@ -456,8 +449,7 @@
ld a, $43
ld [wd09f], a
ld bc, $0208
- ld a, $17
- call Predef
+ predef Func_ee9e
jp TextScriptEnd
CeladonGameCornerText_48f09: ; 48f09 (12:4f09)
--- a/scripts/celadonmansion5.asm
+++ b/scripts/celadonmansion5.asm
@@ -16,7 +16,6 @@
jr nc, .asm_24365 ; 0x1dd4d
ld a, $45
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
.asm_24365 ; 0x1dd59
jp TextScriptEnd
--- a/scripts/celadonmartelevator.asm
+++ b/scripts/celadonmartelevator.asm
@@ -66,6 +66,5 @@
db $08 ; asm
call CeladonMartElevatorScript_48631
ld hl, CeldaonMartElevatorWarpMaps ; $464a
- ld a, $61
- call Predef
+ predef Func_1c9c6
jp TextScriptEnd
--- a/scripts/celadonmartroof.asm
+++ b/scripts/celadonmartroof.asm
@@ -14,8 +14,7 @@
push de
ld [wd11e], a
ld b, a
- ld a, $1c
- call Predef
+ predef IsItemInBag_
pop de
pop hl
ld a, b
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -10,8 +10,7 @@
ld [W_CERULEANCITYCURSCRIPT], a
ld a, $5
ld [wcc4d], a
- ld a, $11
- jp Predef
+ predef_jump HideObject
CeruleanCityScriptPointers: ; 1949d (6:549d)
dw CeruleanCityScript0
@@ -91,8 +90,7 @@
.asm_19535
ld a, $5
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld de, CeruleanCityMovement1
ld a, $1
ld [$ff8c], a
@@ -208,8 +206,7 @@
ret nz
ld a, $5
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
xor a
ld [wJoyIgnore], a
call Func_2307
--- a/scripts/ceruleancity2.asm
+++ b/scripts/ceruleancity2.asm
@@ -5,15 +5,12 @@
call GBFadeIn1
ld a, $07
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $09
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $06
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call GBFadeOut1
ret
--- a/scripts/ceruleanhouse1.asm
+++ b/scripts/ceruleanhouse1.asm
@@ -13,6 +13,5 @@
db $08 ; asm
ld a, $6
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
jp TextScriptEnd
--- a/scripts/ceruleanhousetrashed.asm
+++ b/scripts/ceruleanhousetrashed.asm
@@ -10,8 +10,7 @@
CeruleanHouseTrashedText1: ; 1d68f (7:568f)
db $08 ; asm
ld b, $e4
- ld a, $1c
- call Predef
+ predef IsItemInBag_
and b
jr z, .asm_f8734 ; 0x1d698
ld hl, CeruleanHouseTrashedText_1d6b0
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -87,8 +87,7 @@
jp DisplayTextID
CinnabarGymScript_757f1: ; 757f1 (1d:57f1)
- ld a, $10 ; FlagActionPredef
- jp Predef
+ predef_jump FlagActionPredef
CinnabarGymScript2: ; 757f6 (1d:57f6)
ld a, [W_ISINBATTLE]
--- a/scripts/daycarem.asm
+++ b/scripts/daycarem.asm
@@ -120,8 +120,7 @@
push hl
push de
push bc
- ld a, $b ; AddBCDPredef
- call Predef
+ predef AddBCDPredef
pop bc
pop de
pop hl
@@ -156,8 +155,7 @@
inc hl
ld de, wPlayerMoney + 2
ld c, $3
- ld a, $c ; SubBCDPredef
- call Predef
+ predef SubBCDPredef
ld a, (SFX_02_5a - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent
ld a, $13
@@ -181,8 +179,7 @@
ld e, l
ld a, $1
ld [wHPBarMaxHP], a
- ld a, $3e
- call Predef
+ predef WriteMonMoves
pop bc
pop af
ld hl, wPartyMon1HP
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -281,8 +281,7 @@
; once Poké Ball is taken, hide sprite
ld a, $4a
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd7b1
set 6, [hl]
set 0, [hl]
@@ -323,8 +322,7 @@
; once Poké Ball is taken, hide sprite
ld a, $4b
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
.done
jp TextScriptEnd
--- a/scripts/gary.asm
+++ b/scripts/gary.asm
@@ -122,8 +122,7 @@
call MoveSprite
ld a, $d6
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $5
ld [W_GARYCURSCRIPT], a
ret
@@ -193,8 +192,7 @@
ret nz
ld a, $d6
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $9
ld [W_GARYCURSCRIPT], a
ret
--- a/scripts/halloffameroom.asm
+++ b/scripts/halloffameroom.asm
@@ -25,8 +25,7 @@
push af
xor a
ld [wJoyIgnore], a
- ld a, $55
- call Predef
+ predef HallOfFamePC
pop af
ld [wd358], a
ld hl, W_FLAGS_D733
@@ -101,8 +100,7 @@
ld [wJoyIgnore], a
ld a, $8
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $2
ld [W_HALLOFFAMEROOMCURSCRIPT], a
ret
--- a/scripts/lab2.asm
+++ b/scripts/lab2.asm
@@ -21,6 +21,5 @@
ld a, $8
ld [wWhichTrade], a
asm_78552: ; 75c3d (1d:5c3d)
- ld a, $54
- call Predef
+ predef Predef54
jp TextScriptEnd
--- a/scripts/lab4.asm
+++ b/scripts/lab4.asm
@@ -18,8 +18,7 @@
push de
ld [wd11e], a
ld b, a
- ld a, $1c
- call Predef
+ predef IsItemInBag_
pop de
pop hl
ld a, b
@@ -105,8 +104,7 @@
db $08 ; asm
ld a, $3
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
jp TextScriptEnd
LoadFossilItemAndMonNameBank1D: ; 75de8 (1d:5de8)
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -34,8 +34,7 @@
ld bc, $603
LanceScript_5a2f0: ; 5a2f0 (16:62f0)
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
LanceScript_5a2f5: ; 5a2f5 (16:62f5)
xor a
--- a/scripts/lorelei.asm
+++ b/scripts/lorelei.asm
@@ -25,8 +25,7 @@
.asm_761ab
ld [wd09f], a
ld bc, $2
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
LoreleiScript_761b6: ; 761b6 (1d:61b6)
xor a
--- a/scripts/mansion1.asm
+++ b/scripts/mansion1.asm
@@ -43,8 +43,7 @@
ld a, $e
ld [wd09f], a
asm_44310: ; 44310 (11:4310)
- ld a, $17
- call Predef
+ predef Func_ee9e
ret
Mansion1Script_Switches: ; 44316 (11:4316)
--- a/scripts/mansion2.asm
+++ b/scripts/mansion2.asm
@@ -40,8 +40,7 @@
Mansion2Script_5202f: ; 5202f (14:602f)
ld [wd09f], a
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
Mansion2Script_Switches: ; 52037 (14:6037)
ld a, [wSpriteStateData1 + 9]
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -151,8 +151,7 @@
ld a, $6d
.asm_49e1f
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
xor a
ld [wJoyIgnore], a
ld a, $0
@@ -284,8 +283,7 @@
call MtMoon3Script_49f69
ld a, $6d
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd7f6
set 6, [hl]
ld a, $4
@@ -314,8 +312,7 @@
call MtMoon3Script_49f69
ld a, $6e
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd7f6
set 7, [hl]
ld a, $4
--- a/scripts/mtmoonpokecenter.asm
+++ b/scripts/mtmoonpokecenter.asm
@@ -55,8 +55,7 @@
ld hl, wTrainerFacingDirection
ld de, wPlayerMoney + 2
ld c, $3
- ld a, $c ; SubBCDPredef
- call Predef
+ predef SubBCDPredef
ld a, $13
ld [wd125], a
call DisplayTextBoxID
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -103,8 +103,7 @@
ld hl, wTrainerFacingDirection
ld de, wPlayerMoney + 2
ld c, $3
- ld a, $c ; SubBCDPredef
- call Predef
+ predef SubBCDPredef
ld a, $13
ld [wd125], a
call DisplayTextBoxID
@@ -203,8 +202,7 @@
set 1, [hl]
ld a, $34
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, ReceivedOldAmberText
jr .asm_52e0f ; 0x5c27e
.BagFull
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -40,8 +40,7 @@
ret nz
ld a, $31
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld hl, wd72e
res 4, [hl]
@@ -68,12 +67,10 @@
ret nz
ld a, $31
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $2e
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $3
ld [W_OAKSLABCURSCRIPT], a
@@ -294,8 +291,7 @@
ld a, $2d
.asm_1cd32
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call Delay3
ld a, [wWhichTrade]
ld [W_RIVALSTARTER], a
@@ -341,13 +337,11 @@
ld a, $1
swap a
ld [$ff95], a
- ld a, $22
- call Predef
+ predef Func_f929
ld a, [$ff95]
dec a
ld [$ff95], a
- ld a, $20
- call Predef
+ predef Func_f8ba
ld de, wcc97
ld a, $1
ld [$ff8c], a
@@ -410,8 +404,7 @@
xor a
ld [$ff8d], a
call Func_34a6 ; face object
- ld a, $7
- call Predef
+ predef HealParty
ld hl, wd74b
set 3, [hl]
@@ -454,8 +447,7 @@
jr nz, .asm_1ce8c ; 0x1ce72 $18
ld a, $2a
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
xor a
ld [wJoyIgnore], a
call Func_2307 ; reset to map music
@@ -498,8 +490,7 @@
call OaksLabScript_1d02b
ld a, $2a
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, [wcd37]
ld [wd157], a
ld b, $0
@@ -558,12 +549,10 @@
call Delay3
ld a, $2f
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $30
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call OaksLabScript_1cefd
ld a, $1a
ld [$ff8c], a
@@ -583,12 +572,10 @@
set 0, [hl]
ld a, $1
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $2
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, [wd157]
ld b, $0
ld c, a
@@ -616,8 +603,7 @@
call Func_2307
ld a, $2a
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd7eb
set 0, [hl]
res 1, [hl]
@@ -624,8 +610,7 @@
set 7, [hl]
ld a, $22
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $5
ld [W_PALLETTOWNCURSCRIPT], a
xor a
@@ -846,8 +831,7 @@
ld [hl], $c
ld hl, wd730
set 6, [hl]
- ld a, $46
- call Predef ; StarterDex
+ predef StarterDex ; StarterDex
ld hl, wd730
res 6, [hl]
call ReloadMapData
@@ -907,8 +891,7 @@
ld a, $2d
asm_1d1e5: ; 1d1e5 (7:51e5)
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $1
ld [wcc3c], a
ld hl, OaksLabMonEnergeticText
@@ -974,8 +957,7 @@
call PrintText
ld a, $1
ld [wcc3c], a
- ld a, $56
- call Predef
+ predef DisplayDexRating
jp .asm_0f042
.asm_b28b0 ; 0x1d279
ld b,POKE_BALL
--- a/scripts/pallettown.asm
+++ b/scripts/pallettown.asm
@@ -56,8 +56,7 @@
ld [wJoyIgnore],a
ld a,0
ld [wcc4d],a
- ld a,$15
- call Predef
+ predef ShowObject
; trigger the next script
ld a,2
@@ -78,12 +77,10 @@
ld a,1
swap a
ld [$FF95],a
- ld a,$22
- call Predef
+ predef Func_f929
ld hl,$FF95
dec [hl]
- ld a,$20
- call Predef ; load Oak’s movement into wcc97
+ predef Func_f8ba ; load Oak’s movement into wcc97
ld de,wcc97
ld a,1 ; oak
ld [$FF8C],a
@@ -146,12 +143,10 @@
set 2,[hl]
ld a,$27
ld [wcc4d],a
- ld a,$11
- call Predef
+ predef HideObject
ld a,$28
ld [wcc4d],a
- ld a,$15
- jp Predef
+ predef_jump ShowObject
.next
ld a,[wd74b]
bit 4,a
@@ -193,8 +188,7 @@
xor a
ld [wcd4f],a
ld [wcd50],a
- ld a,$4C
- call Predef ; display ! over head
+ predef EmotionBubble ; display ! over head
ld a,4
ld [wd528],a
jp TextScriptEnd
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -87,8 +87,7 @@
ret nz
ld a, $3
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $3
ld [W_PEWTERCITYCURSCRIPT], a
ret
@@ -99,8 +98,7 @@
call Func_32fe
ld a, $3
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
xor a
ld [wJoyIgnore], a
ld a, $0
@@ -153,8 +151,7 @@
ret nz
ld a, $4
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $6
ld [W_PEWTERCITYCURSCRIPT], a
ret
@@ -165,8 +162,7 @@
call Func_32fe
ld a, $4
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
xor a
ld [wJoyIgnore], a
ld a, $0
--- a/scripts/pewtergym.asm
+++ b/scripts/pewtergym.asm
@@ -69,12 +69,10 @@
ld a, $4
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $22
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld hl, wd7eb
res 0, [hl]
--- a/scripts/pokemontower2.asm
+++ b/scripts/pokemontower2.asm
@@ -101,8 +101,7 @@
ret nz
ld a, $38
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
xor a
ld [wJoyIgnore], a
call Func_2307
--- a/scripts/pokemontower5.asm
+++ b/scripts/pokemontower5.asm
@@ -32,8 +32,7 @@
ld [wJoyIgnore], a
ld hl, wd72e
set 4, [hl]
- ld a, $7
- call Predef
+ predef HealParty
call GBFadeOut2
call Delay3
call Delay3
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -52,8 +52,7 @@
ld a, [hli]
jr nz, .missableObjectsListLoop
ld [wcc4d], a ; remove missable object
- ld a, $11
- call Predef
+ predef HideObject
xor a
ld [wJoyIgnore], a
ld [wcf13], a
@@ -69,8 +68,7 @@
ld [wJoyIgnore], a
ld a, $43
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $4
ld [wSpriteStateData1 + 9], a
ld a, $95
@@ -226,16 +224,13 @@
set 7, [hl]
ld a, $44
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $17
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $18
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $4
ld [W_POKEMONTOWER7CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
--- a/scripts/rockethideout1.asm
+++ b/scripts/rockethideout1.asm
@@ -30,8 +30,7 @@
.asm_44c03
ld [wd09f], a
ld bc, $080c
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
RocketHideout1ScriptPointers: ; 44c0e (11:4c0e)
dw CheckFightingMapTrainers
--- a/scripts/rockethideout4.asm
+++ b/scripts/rockethideout4.asm
@@ -31,8 +31,7 @@
.asm_45498
ld [wd09f], a
ld bc, $050c
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
RocketHideout4Script_454a3: ; 454a3 (11:54a3)
xor a
@@ -62,12 +61,10 @@
call GBFadeIn1
ld a, $83
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $87
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
call UpdateSprites
call GBFadeOut1
xor a
@@ -222,8 +219,7 @@
jr nz, .asm_455e9 ; 0x455dd $a
ld a, $88
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
.asm_455e9
jp TextScriptEnd
--- a/scripts/rockethideoutelevator.asm
+++ b/scripts/rockethideoutelevator.asm
@@ -68,8 +68,7 @@
jr z, .asm_8d8f0 ; 0x45773
call RocketHideoutElevatorScript_45741
ld hl, RocketHideoutElevatorWarpMaps ; $5759
- ld a, $61
- call Predef
+ predef Func_1c9c6
jr .asm_46c43 ; 0x45780
.asm_8d8f0 ; 0x45782
ld hl, RocketHideoutElevatorText_4578b
--- a/scripts/route11gateupstairs.asm
+++ b/scripts/route11gateupstairs.asm
@@ -11,8 +11,7 @@
db $08 ; asm
xor a
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
asm_49469: ; 49469 (12:5469)
jp TextScriptEnd
@@ -32,8 +31,7 @@
ld de, wcc5b
ld bc, $000d
call CopyData
- ld a, $62
- call Predef ; call oak's aide script
+ predef OaksAideScript ; call oak's aide script
ld a, [$ffdb]
dec a
jr nz, .asm_494a1 ; 0x49494 $b
--- a/scripts/route12.asm
+++ b/scripts/route12.asm
@@ -36,8 +36,7 @@
ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
ld a, $1d
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $3
ld [W_ROUTE12CURSCRIPT], a
ld [W_CURMAPSCRIPT], a
--- a/scripts/route15gateupstairs.asm
+++ b/scripts/route15gateupstairs.asm
@@ -20,8 +20,7 @@
ld de, wcc5b
ld bc, $000d
call CopyData
- ld a, $62
- call Predef ; call oak's aide script
+ predef OaksAideScript ; call oak's aide script
ld a, [$ffdb]
cp $1
jr nz, .asm_49689 ; 0x4967c $b
--- a/scripts/route16.asm
+++ b/scripts/route16.asm
@@ -36,8 +36,7 @@
ld [W_CURENEMYLVL], a ; W_CURENEMYLVL
ld a, $21
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call UpdateSprites
ld a, $3
ld [W_ROUTE16CURSCRIPT], a
--- a/scripts/route18gateupstairs.asm
+++ b/scripts/route18gateupstairs.asm
@@ -10,8 +10,7 @@
db $08 ; asm
ld a, $5
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
jp TextScriptEnd
Route18GateUpstairsText2: ; 4998c (12:598c)
--- a/scripts/route20.asm
+++ b/scripts/route20.asm
@@ -50,13 +50,11 @@
Route20Script_50d0c: ; 50d0c (14:4d0c)
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
Route20Script_50d14: ; 50d14 (14:4d14)
ld [wcc4d], a
- ld a, $11
- jp Predef
+ predef_jump HideObject
Route20ScriptPointers: ; 50d1c (14:4d1c)
dw CheckFightingMapTrainers
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -82,8 +82,7 @@
ld [wcd4f], a
xor a
ld [wcd50], a
- ld a, $4c
- call Predef
+ predef EmotionBubble
ld a, [wd700]
and a
jr z, .asm_50f4e ; 0x50f44 $8
@@ -208,8 +207,7 @@
ld [wJoyIgnore], a
ld a, $22
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call Func_2307
ld hl, wd7eb
res 0, [hl]
@@ -223,8 +221,7 @@
ld [wcd4f], a
xor a
ld [wcd50], a
- ld a, $4c
- call Predef
+ predef EmotionBubble
ld a, [wd700]
and a
jr z, .skipYVisibilityTesta
@@ -355,8 +352,7 @@
ld [wJoyIgnore], a
ld a, $23
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call Func_2307
ld hl, wd7eb
res 1, [hl]
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -18,12 +18,10 @@
res 6, [hl]
ld a, $7a
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld a, $60
ld [wcc4d], a
- ld a, $11
- jp Predef
+ predef_jump HideObject
Route23ScriptPointers: ; 51213 (14:5213)
dw Route23Script0
@@ -56,8 +54,7 @@
ld [wWhichTrade], a
ld b, $2
ld hl, wd7ed
- ld a, $10
- call Predef
+ predef FlagActionPredef
ld a, c
and a
ret nz
@@ -198,8 +195,7 @@
ld c, a
ld b, $2
ld hl, W_OBTAINEDBADGES
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld a, c
and a
jr nz, .asm_5136e
@@ -216,8 +212,7 @@
ld c, a
ld b, $1
ld hl, wd7ed
- ld a, $10 ; FlagActionPredef
- call Predef
+ predef FlagActionPredef
ld a, $2
ld [W_ROUTE23CURSCRIPT], a
ret
--- a/scripts/route25.asm
+++ b/scripts/route25.asm
@@ -21,8 +21,7 @@
res 6, [hl]
ld a, $61
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
.asm_515ff
bit 4, [hl]
ret z
@@ -29,16 +28,13 @@
set 7, [hl]
ld a, $24
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $62
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $63
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
Route25ScriptPointers: ; 51622 (14:5622)
dw CheckFightingMapTrainers
--- a/scripts/route2gate.asm
+++ b/scripts/route2gate.asm
@@ -20,8 +20,7 @@
ld de, wcc5b
ld bc, $000d
call CopyData
- ld a, $62
- call Predef ; call oak's aide script
+ predef OaksAideScript ; call oak's aide script
ldh a, [$db]
cp $1
jr nz, .asm_ad646 ; 0x5d606
--- a/scripts/route2house.asm
+++ b/scripts/route2house.asm
@@ -13,6 +13,5 @@
db $08 ; asm
ld a, $1
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
jp TextScriptEnd
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -176,8 +176,7 @@
ld hl, wTrainerFacingDirection
ld de, wPlayerMoney + 2
ld c, $3
- ld a, $c ; SubBCDPredef
- call Predef
+ predef SubBCDPredef
ld a, $13
ld [wd125], a
call DisplayTextBoxID
--- a/scripts/seafoamislands1.asm
+++ b/scripts/seafoamislands1.asm
@@ -28,12 +28,10 @@
.asm_44825
ld a, [wd079]
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, [wd07a]
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
.asm_4483b
ld a, $9f
ld [wd71d], a
--- a/scripts/seafoamislands2.asm
+++ b/scripts/seafoamislands2.asm
@@ -26,12 +26,10 @@
.asm_4634c
ld a, [wd079]
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, [wd07a]
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
.asm_46362
ld a, $a0
ld [wd71d], a
--- a/scripts/seafoamislands3.asm
+++ b/scripts/seafoamislands3.asm
@@ -26,12 +26,10 @@
.asm_46488
ld a, [wd079]
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, [wd07a]
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
.asm_4649e
ld a, $a1
ld [wd71d], a
--- a/scripts/seafoamislands4.asm
+++ b/scripts/seafoamislands4.asm
@@ -26,12 +26,10 @@
.asm_465c4
ld a, [wd079]
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, [wd07a]
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
jr .asm_465ed ; 0x465da $11
.asm_465dc
ld a, $a2
--- a/scripts/silphco1.asm
+++ b/scripts/silphco1.asm
@@ -9,8 +9,7 @@
ret nz
ld a, $4c
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
SilphCo1TextPointers: ; 5d469 (17:5469)
dw SilphCo1Text1
--- a/scripts/silphco10.asm
+++ b/scripts/silphco10.asm
@@ -22,8 +22,7 @@
ld a, $54
ld [wd09f], a
ld bc, $405
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_5a173: ; 5a173 (16:6173)
db $04,$05,$FF
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -22,8 +22,7 @@
ld a, $20
ld [wd09f], a
ld bc, $603
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_62134: ; 62134 (18:6134)
db $06,$03,$FF
@@ -80,8 +79,7 @@
jr z, .asm_62181
push hl
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
pop hl
jr .asm_62170
.asm_62181
@@ -92,8 +90,7 @@
ret z
push hl
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
pop hl
jr .asm_62184
--- a/scripts/silphco2.asm
+++ b/scripts/silphco2.asm
@@ -23,8 +23,7 @@
ld a, $54
ld [wd09f], a
ld bc, $0202
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_59d2e
bit 6, a
@@ -32,8 +31,7 @@
ld a, $54
ld [wd09f], a
ld bc, $0502
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_59d3e: ; 59d3e (16:5d3e)
db $02,$02,$05,$02,$FF
--- a/scripts/silphco3.asm
+++ b/scripts/silphco3.asm
@@ -23,8 +23,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $404
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_59f98
bit 1, a
@@ -32,8 +31,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $408
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_59fa8: ; 59fa8 (16:5fa8)
db $04,$04,$04,$08,$FF
--- a/scripts/silphco4.asm
+++ b/scripts/silphco4.asm
@@ -23,8 +23,7 @@
ld a, $54
ld [wd09f], a
ld bc, $0602
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_19d48
bit 1, a
@@ -32,8 +31,7 @@
ld a, $54
ld [wd09f], a
ld bc, $0406
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
SilphCo4Data19d58: ; 19d58 (6:5d58)
db $06, $02, $04, $06, $ff
--- a/scripts/silphco5.asm
+++ b/scripts/silphco5.asm
@@ -23,8 +23,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $0203
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_19f74
bit 1, a
@@ -33,8 +32,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $0603
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_19f87
bit 2, a
@@ -42,8 +40,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $0507
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
SilphCo5Coords: ; 19f97 (6:5f97) ; coords?
db $02, $03, $06, $03, $05, $07, $ff
--- a/scripts/silphco6.asm
+++ b/scripts/silphco6.asm
@@ -22,8 +22,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $0602
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
SilphCo6Coords1: ; 1a1e3 (6:61e3)
db $06, $02
--- a/scripts/silphco7.asm
+++ b/scripts/silphco7.asm
@@ -23,8 +23,7 @@
ld a, $54
ld [wd09f], a
ld bc, $305
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_51b9e
bit 5, a
@@ -33,8 +32,7 @@
ld a, $54
ld [wd09f], a
ld bc, $20a
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_51bb1
bit 6, a
@@ -42,8 +40,7 @@
ld a, $54
ld [wd09f], a
ld bc, $60a
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_51bc1: ; 51bc1 (14:5bc1)
db $03,$05,$02,$0A,$06,$0A,$FF
@@ -246,8 +243,7 @@
ret nz
ld a, $a7
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call Func_2307
xor a
ld [wJoyIgnore], a
--- a/scripts/silphco8.asm
+++ b/scripts/silphco8.asm
@@ -22,8 +22,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $403
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_5653e: ; 5653e (15:653e)
db $04,$03,$FF
--- a/scripts/silphco9.asm
+++ b/scripts/silphco9.asm
@@ -23,8 +23,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $401
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_5d7f8
bit 1, a
@@ -33,8 +32,7 @@
ld a, $54
ld [wd09f], a
ld bc, $209
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_5d80b
bit 2, a
@@ -43,8 +41,7 @@
ld a, $54
ld [wd09f], a
ld bc, $509
- ld a, $17
- call Predef
+ predef Func_ee9e
pop af
.asm_5d81e
bit 3, a
@@ -52,8 +49,7 @@
ld a, $5f
ld [wd09f], a
ld bc, $605
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
DataTable_5d82e: ; 5d82e (17:582e)
db $04,$01,$02,$09,$05,$09,$06,$05,$FF
@@ -167,8 +163,7 @@
jr nz, .asm_a14c3 ; 0x5d8be
ld hl, SilphCo9Text_5d8e5
call PrintText
- ld a, $7
- call Predef
+ predef HealParty
call GBFadeOut2
call Delay3
call GBFadeIn2
--- a/scripts/silphcoelevator.asm
+++ b/scripts/silphcoelevator.asm
@@ -73,6 +73,5 @@
db $08 ; asm
call SilphCoElevatorScript_457f1
ld hl, SilphCoElevatorWarpMaps ; $5811
- ld a, $61
- call Predef
+ predef Func_1c9c6
jp TextScriptEnd
--- a/scripts/ssanne2.asm
+++ b/scripts/ssanne2.asm
@@ -34,8 +34,7 @@
ld [$ffdb], a
ld a, $71
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
call Delay3
ld a, $2
ld [$ff8c], a
@@ -163,8 +162,7 @@
ld [wJoyIgnore], a
ld a, $71
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call Func_2307
ld a, $4
ld [W_SSANNE2CURSCRIPT], a
--- a/scripts/undergroundpathentranceroute5.asm
+++ b/scripts/undergroundpathentranceroute5.asm
@@ -13,7 +13,6 @@
db $08 ; asm
ld a, $9
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
ld hl, UndergroundPathEntranceRoute5_5d6af
ret
--- a/scripts/vermilioncity.asm
+++ b/scripts/vermilioncity.asm
@@ -55,8 +55,7 @@
bit 2, a
jr nz, .asm_19810 ; 0x19804 $a
ld b, $3f
- ld a, $1c
- call Predef
+ predef IsItemInBag_
ld a, b
and a
ret nz
@@ -176,8 +175,7 @@
ld hl, SSAnneWelcomeText9
call PrintText
ld b, S_S__TICKET
- ld a, $1c
- call Predef
+ predef IsItemInBag_
ld a, b
and a
jr nz, .asm_0419b ; 0x198df
--- a/scripts/vermiliongym.asm
+++ b/scripts/vermiliongym.asm
@@ -40,8 +40,7 @@
.asm_5ca7f
ld [wd09f], a
ld bc, $202
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
VermilionGymScript_5ca8a: ; 5ca8a (17:4a8a)
xor a
--- a/scripts/vermilionhouse3.asm
+++ b/scripts/vermilionhouse3.asm
@@ -8,6 +8,5 @@
db $08 ; asm
ld a, $4
ld [wWhichTrade], a
- ld a, $54
- call Predef
+ predef Predef54
jp TextScriptEnd
--- a/scripts/victoryroad1.asm
+++ b/scripts/victoryroad1.asm
@@ -17,8 +17,7 @@
ld a, $1d
ld [wd09f], a
ld bc, $604
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
VictoryRoad1ScriptPointers: ; 5da3a (17:5a3a)
dw VictoryRoad1Script0
--- a/scripts/victoryroad2.asm
+++ b/scripts/victoryroad2.asm
@@ -36,8 +36,7 @@
VictoryRoad2Script_517e2: ; 517e2 (14:57e2)
ld [wd09f], a
- ld a, $17
- call Predef
+ predef Func_ee9e
ret
VictoryRoad2ScriptPointers: ; 517eb (14:57eb)
--- a/scripts/victoryroad3.asm
+++ b/scripts/victoryroad3.asm
@@ -19,8 +19,7 @@
ld a, $1d
ld [wd09f], a
ld bc, $503
- ld a, $17
- jp Predef
+ predef_jump Func_ee9e
VictoryRoad3ScriptPointers: ; 449b1 (11:49b1)
dw VictoryRoad3Script0
@@ -50,12 +49,10 @@
jr nz, .asm_449fe
ld a, $7a
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
ld a, $60
ld [wcc4d], a
- ld a, $15
- jp Predef
+ predef_jump ShowObject
.coordsData_449f9: ; 449f9 (11:49f9)
db $05,$03
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -177,8 +177,7 @@
ld a, $23
ld [wcc4d], a
- ld a, $15
- call Predef
+ predef ShowObject
ld hl, wd7eb
set 1, [hl]
set 7, [hl]
@@ -293,8 +292,7 @@
call GBFadeIn1
ld a, $32
ld [wcc4d], a
- ld a, $11
- call Predef
+ predef HideObject
call UpdateSprites
call Delay3
call GBFadeOut1