diff options
author | yenatch <yenatch@gmail.com> | 2014-06-16 11:20:01 -0700 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-06-16 11:20:01 -0700 |
commit | 8639fcd29b0e929ec6cc236a209d0e07a495db14 (patch) | |
tree | c5021a1842b931ff41b63a884739342fa31f0a9e /items | |
parent | 0b7dfeb9b208a16682e92de9cf15e19fb8cf8a94 (diff) |
Use a predef macro that takes labels instead of juggling constants.
Besides making predefs convenient, naming a predef no longer requires
adding or renaming a predef constant. This also lets predefs be rearranged at will.
Diffstat (limited to 'items')
-rw-r--r-- | items/item_descriptions.asm | 3 | ||||
-rw-r--r-- | items/item_effects.asm | 39 |
2 files changed, 14 insertions, 28 deletions
diff --git a/items/item_descriptions.asm b/items/item_descriptions.asm index a3c39a1e6..ee54c526d 100644 --- a/items/item_descriptions.asm +++ b/items/item_descriptions.asm @@ -8,8 +8,7 @@ GetItemDescription: ; 0x1c8955 pop hl ld a, [$d265] ld [$cf60], a - ld a, $11 - call Predef + predef PrintMoveDesc ret .nomovedesc diff --git a/items/item_effects.asm b/items/item_effects.asm index 820d18399..d3ab93151 100644 --- a/items/item_effects.asm +++ b/items/item_effects.asm @@ -399,8 +399,7 @@ ParkBall: ; e8a2 ld [hBattleTurn], a ld [Buffer2], a ld [$cfca], a - ld a, $37 - call Predef + predef PlayBattleAnim ld a, [$c64e] and a @@ -525,8 +524,7 @@ ParkBall: ; e8a2 ld a, [EnemyMonSpecies] ld [$d265], a - ld a, $43 - call Predef + predef Functionfb877 .asm_eab7 ld a, [BattleType] @@ -546,8 +544,7 @@ ParkBall: ; e8a2 ld [MonType], a call ClearSprites - ld a, $6 - call Predef + predef Functiond88c callba Function4db49 @@ -604,8 +601,7 @@ ParkBall: ; e8a2 .asm_eb3c call ClearSprites - ld a, $9 - call Predef + predef Functionde6e callba Function4db83 @@ -1265,8 +1261,7 @@ Functionee8c: ; ee8c ld a, PartyMon1HPExp - 1 - PartyMon1 call GetPartyParamLocation ld b, $1 - ld a, $c - jp Predef + predef_jump Functione167 ; ee9f Functionee9f: ; ee9f @@ -1405,8 +1400,7 @@ RareCandy: ; ef14 xor a ld [MonType], a - ld a, $1f - call Predef + predef Function5084a hlcoord 9, 0 ld b, 10 @@ -1415,8 +1409,7 @@ RareCandy: ; ef14 hlcoord 11, 1 ld bc, $0004 - ld a, $28 - call Predef + predef Function50b7b call Functiona80 @@ -1424,8 +1417,7 @@ RareCandy: ; ef14 ld [MonType], a ld a, [CurPartySpecies] ld [$d265], a - ld a, $1a - call Predef + predef LearnLevelMoves xor a ld [$d1e9], a @@ -1654,8 +1646,7 @@ Functionf0d6: ; f0d6 ld d, 0 ld hl, $c6fc ld b, CHECK_FLAG - ld a, PREDEF_FLAG - call Predef + predef FlagPredef ld a, c and a jr z, .asm_f104 @@ -1664,8 +1655,7 @@ Functionf0d6: ; f0d6 ld c, a ld hl, $c664 ld b, SET_FLAG - ld a, PREDEF_FLAG - call Predef + predef FlagPredef .asm_f104 xor a @@ -1834,8 +1824,7 @@ Functionf1db: ; f1db (3:71db) call AddNTimes ld a, $2 ld [$d10a], a - ld a, $b - jp Predef + predef_jump Functionc6e0 ; known jump sources: ee11 (3:6e11), ee3f (3:6e3f), ef16 (3:6f16), efaf (3:6faf), efce (3:6fce), f0ab (3:70ab), f0ca (3:70ca), f12a (3:712a), f1ab (3:71ab), f5c7 (3:75c7) Functionf1f9: ; f1f9 (3:71f9) @@ -2971,8 +2960,7 @@ Functionf7a0: ; f7a0 ld [$c689], a ld [hBattleTurn], a ld [$cfca], a - ld a, $37 - call Predef + predef PlayBattleAnim ld hl, BlockedTheBallText call PrintText ld hl, DontBeAThiefText @@ -3119,8 +3107,7 @@ Functionf84c: ; f84c call GetPartyParamLocation push hl ld de, Buffer1 - ld a, PREDEF_FILLPP - call Predef + predef FillPP pop hl ld bc, PartyMon1PP - PartyMon1Moves add hl, bc |