diff options
author | YamaArashi <shadow962@live.com> | 2015-07-19 20:45:34 -0700 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-07-19 20:45:34 -0700 |
commit | db7d941d22d89cf8d6d13cbf768208c5cf2ac2c2 (patch) | |
tree | 4dcd58e0fe7ac33bf38817f423754dc758cb902f /engine/items | |
parent | 1d86932cc9c38815434409f07d14c2bfe4e7a836 (diff) |
constants for flag actions
Diffstat (limited to 'engine/items')
-rwxr-xr-x | engine/items/itemfinder.asm | 2 | ||||
-rwxr-xr-x | engine/items/items.asm | 14 | ||||
-rwxr-xr-x | engine/items/tms.asm | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/engine/items/itemfinder.asm b/engine/items/itemfinder.asm index 51277632..5da72388 100755 --- a/engine/items/itemfinder.asm +++ b/engine/items/itemfinder.asm @@ -10,7 +10,7 @@ HiddenItemNear: ; 7481f (1d:481f) push hl ld hl, wObtainedHiddenItemsFlags ld c, b - ld b, $2 + ld b, FLAG_TEST predef FlagActionPredef ld a, c pop hl diff --git a/engine/items/items.asm b/engine/items/items.asm index 000940d2..f2c41ef6 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -400,15 +400,15 @@ ItemUseBall: ; d687 (3:5687) ld a,[wd11e] dec a ld c,a - ld b,2 - ld hl,wPokedexOwned ;Dex_own_flags (pokemon) + ld b,FLAG_TEST + ld hl,wPokedexOwned predef FlagActionPredef ld a,c push af ld a,[wd11e] dec a ld c,a - ld b,1 + ld b,FLAG_SET predef FlagActionPredef pop af and a @@ -804,7 +804,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[wUsedItemOnWhichPokemon] ld c,a ld hl,wPartyFoughtCurrentEnemyFlags - ld b,$02 + ld b,FLAG_TEST predef FlagActionPredef ld a,c and a @@ -812,7 +812,7 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[wUsedItemOnWhichPokemon] ld c,a ld hl,wPartyGainExpFlags - ld b,$01 + ld b,FLAG_SET predef FlagActionPredef .next pop bc @@ -2550,8 +2550,8 @@ IsKeyItem_: ; e764 (3:6764) dec a ld c,a ld hl,wHPBarMaxHP - ld b,$02 ; test bit - predef FlagActionPredef ; bitfield operation function + ld b,FLAG_TEST + predef FlagActionPredef ld a,c and a ret nz diff --git a/engine/items/tms.asm b/engine/items/tms.asm index 511aab5b..23912b34 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -17,7 +17,7 @@ CanLearnTM: ; 1373e (4:773e) jr .findTMloop .TMfoundLoop pop hl - ld b, $2 ; read corresponding bit from TM compatibility array + ld b, FLAG_TEST predef_jump FlagActionPredef ; converts TM/HM number in wd11e into move number |