Use macros for predef calls/jumps instead of static ids.

This commit is contained in:
yenatch 2014-06-16 13:57:26 -07:00
parent d10108a066
commit b36f793667
122 changed files with 360 additions and 719 deletions

View file

@ -8,8 +8,7 @@ PrintCardKeyText: ; 52673 (14:6673)
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 @@ PrintCardKeyText: ; 52673 (14:6673)
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

View file

@ -6,8 +6,7 @@ HiddenItems: ; 76688 (1d:6688)
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 @@ FoundHiddenItemText: ; 7675b (1d:675b)
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 @@ HiddenItemBagFullText: ; 76794 (1d:6794)
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 @@ HiddenCoins: ; 76799 (1d:6799)
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 @@ HiddenCoins: ; 76799 (1d:6799)
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

View file

@ -32,8 +32,7 @@ PickupItem:
ld a, [$ffdb]
ld [wcc4d], a
ld a, $11 ; HideObject
call Predef
predef HideObject
ld a, 1
ld [wcc3c], a
ld hl, FoundItemText

View file

@ -5,8 +5,7 @@ HandleLedges: ; 1a672 (6:6672)
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

View file

@ -458,8 +458,7 @@ InitializeSpriteScreenPosition: ; 50bd (1:50bd)
; 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

View file

@ -86,8 +86,7 @@ Func_1a485: ; 1a485 (6:6485)
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 @@ Func_1a4f4: ; 1a4f4 (6:64f4)
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 @@ Func_1a514: ; 1a514 (6:6514)
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 @@ Func_1a581: ; 1a581 (6:6581)
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

View file

@ -421,8 +421,7 @@ Func_707b6: ; 707b6 (1c:47b6)
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