From db7d941d22d89cf8d6d13cbf768208c5cf2ac2c2 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 19 Jul 2015 20:45:34 -0700 Subject: constants for flag actions --- engine/items/itemfinder.asm | 2 +- engine/items/items.asm | 14 +++++++------- engine/items/tms.asm | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'engine/items') 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 -- cgit v1.2.3