summaryrefslogtreecommitdiff
path: root/engine/events
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-01-22 13:57:44 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2018-01-22 13:57:44 -0500
commit125d51b3b2e91230b693406de153e172f752bf41 (patch)
tree5bdf61368cb51635f5f1691b731d4fa6cedea450 /engine/events
parentf75bfbeac3aa826e1f402a649fa1389e889b5af9 (diff)
More engine bit flag constants
Diffstat (limited to 'engine/events')
-rw-r--r--engine/events/mom.asm16
-rwxr-xr-xengine/events/overworld.asm10
2 files changed, 13 insertions, 13 deletions
diff --git a/engine/events/mom.asm b/engine/events/mom.asm
index c7e1cd6e9..31350ed0e 100644
--- a/engine/events/mom.asm
+++ b/engine/events/mom.asm
@@ -46,9 +46,9 @@ Special_BankOfMom: ; 16218
.CheckIfBankInitialized: ; 16254
ld a, [wMomSavingMoney]
- bit 7, a
+ bit MOM_ACTIVE_F, a
jr nz, .savingmoneyalready
- set 7, a
+ set MOM_ACTIVE_F, a
ld [wMomSavingMoney], a
ld a, $1
jr .done_0
@@ -68,11 +68,11 @@ Special_BankOfMom: ; 16218
jr c, .DontSaveMoney
ld hl, UnknownText_0x1664e
call PrintText
- ld a, %10000001
+ ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F)
jr .done_1
.DontSaveMoney:
- ld a, %10000000
+ ld a, 1 << MOM_ACTIVE_F
.done_1
ld [wMomSavingMoney], a
@@ -145,7 +145,7 @@ Special_BankOfMom: ; 16218
ld [hli], a
ld [hli], a
ld [hl], a
- ld a, $5
+ ld a, 5
ld [wMomBankDigitCursorPosition], a
call LoadStandardMenuDataHeader
call Mom_SetUpDepositMenu
@@ -212,7 +212,7 @@ Special_BankOfMom: ; 16218
ld [hli], a
ld [hli], a
ld [hl], a
- ld a, $5
+ ld a, 5
ld [wMomBankDigitCursorPosition], a
call LoadStandardMenuDataHeader
call Mom_SetUpWithdrawMenu
@@ -276,7 +276,7 @@ Special_BankOfMom: ; 16218
call PrintText
call YesNoBox
jr c, .StopSavingMoney
- ld a, $81
+ ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F)
ld [wMomSavingMoney], a
ld hl, UnknownText_0x16685
call PrintText
@@ -285,7 +285,7 @@ Special_BankOfMom: ; 16218
ret
.StopSavingMoney:
- ld a, $80
+ ld a, 1 << MOM_ACTIVE_F
ld [wMomSavingMoney], a
ld a, $7
ld [wJumptableIndex], a
diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm
index c9e0a5fe5..44a50034a 100755
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -358,7 +358,7 @@ SurfFunction: ; c909
call CheckBadge
jr c, .asm_c956
ld hl, wBikeFlags
- bit 1, [hl] ; always on bike
+ bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
jr nz, .cannotsurf
ld a, [PlayerState]
cp PLAYER_SURF
@@ -520,7 +520,7 @@ TrySurfOW:: ; c9e7
jr c, .quit
ld hl, wBikeFlags
- bit 1, [hl] ; always on bike (can't surf)
+ bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
jr nz, .quit
call GetSurfType
@@ -1008,7 +1008,7 @@ StrengthFunction: ; cce5
SetStrengthFlag: ; cd12
ld hl, wBikeFlags
- set 0, [hl]
+ set BIKEFLAGS_STRENGTH_ACTIVE_F, [hl]
ld a, [CurPartyMon]
ld e, a
ld d, 0
@@ -1086,7 +1086,7 @@ TryStrengthOW: ; cd78
jr c, .nope
ld hl, wBikeFlags
- bit 0, [hl]
+ bit BIKEFLAGS_STRENGTH_ACTIVE_F, [hl]
jr z, .already_using
ld a, 2
@@ -1683,7 +1683,7 @@ BikeFunction: ; d0b3
.GetOffBike:
ld hl, wBikeFlags
- bit 1, [hl]
+ bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl]
jr nz, .CantGetOffBike
ld hl, Script_GetOffBike
ld de, Script_GetOffBike_Register