diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-01-22 13:57:44 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-01-22 13:57:44 -0500 |
commit | 125d51b3b2e91230b693406de153e172f752bf41 (patch) | |
tree | 5bdf61368cb51635f5f1691b731d4fa6cedea450 /engine | |
parent | f75bfbeac3aa826e1f402a649fa1389e889b5af9 (diff) |
More engine bit flag constants
Diffstat (limited to 'engine')
-rw-r--r-- | engine/battle/core.asm | 26 | ||||
-rw-r--r-- | engine/events/mom.asm | 16 | ||||
-rwxr-xr-x | engine/events/overworld.asm | 10 | ||||
-rw-r--r-- | engine/map_setup.asm | 2 | ||||
-rw-r--r-- | engine/phone/phone_scripts.asm | 2 | ||||
-rwxr-xr-x | engine/player_movement.asm | 6 |
6 files changed, 31 insertions, 31 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index cc15e0c3a..d62e2014b 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2471,22 +2471,22 @@ WinTrainerBattle: ; 3cfa4 call nz, .DoubleReward call .CheckMaxedOutMomMoney push af - ld a, $0 + ld a, FALSE jr nc, .okay ld a, [wMomSavingMoney] - and $7 - cp $3 + and MOM_SAVING_MONEY_MASK + cp (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F) jr nz, .okay - inc a + inc a ; TRUE .okay ld b, a - ld c, $4 + ld c, 4 .loop ld a, b and a jr z, .loop2 - call .SendMoneyToMom + call .AddMoneyToMom dec c dec b jr .loop @@ -2505,7 +2505,7 @@ WinTrainerBattle: ; 3cfa4 pop af jr nc, .KeepItAll ld a, [wMomSavingMoney] - and $7 + and MOM_SAVING_MONEY_MASK jr z, .KeepItAll ld hl, .SentToMomTexts dec a @@ -2523,7 +2523,7 @@ WinTrainerBattle: ; 3cfa4 jp StdBattleTextBox ; 3d081 -.SendMoneyToMom: ; 3d081 +.AddMoneyToMom: ; 3d081 push bc ld hl, wBattleReward + 2 ld de, wMomsMoney + 2 @@ -2557,9 +2557,9 @@ WinTrainerBattle: ; 3cfa4 ; 3d0ab .SentToMomTexts: ; 3d0ab - dw SentSomeToMomText - dw SentHalfToMomText - dw SentAllToMomText + dw SentSomeToMomText ; MOM_SAVING_SOME_MONEY_F + dw SentHalfToMomText ; MOM_SAVING_HALF_MONEY_F + dw SentAllToMomText ; MOM_SAVING_ALL_MONEY_F ; 3d0b1 .CheckMaxedOutMomMoney: ; 3d0b1 @@ -2574,7 +2574,7 @@ WinTrainerBattle: ; 3cfa4 ; 3d0be AddBattleMoneyToAccount: ; 3d0be - ld c, $3 + ld c, 3 and a push de push hl @@ -2653,7 +2653,7 @@ IsGymLeader: ; 0x3d128 IsGymLeaderCommon: push de ld a, [OtherTrainerClass] - ld de, $1 + ld de, 1 call IsInArray pop de ret 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 diff --git a/engine/map_setup.asm b/engine/map_setup.asm index b3905b71e..5e593e04e 100644 --- a/engine/map_setup.asm +++ b/engine/map_setup.asm @@ -169,7 +169,7 @@ CheckReplaceKrisSprite: ; 154f7 .CheckBiking: ; 1550c (5:550c) and a ld hl, wBikeFlags - bit 1, [hl] + bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] ret z ld a, PLAYER_BIKE ld [PlayerState], a diff --git a/engine/phone/phone_scripts.asm b/engine/phone/phone_scripts.asm index 646040641..501f4b757 100644 --- a/engine/phone/phone_scripts.asm +++ b/engine/phone/phone_scripts.asm @@ -140,7 +140,7 @@ MomPhoneNoGymQuestScript: ; 0xbcfac MomPhoneLectureScript: ; 0xbcfb1 setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST - setflag ENGINE_DST + setflag ENGINE_MOM_ACTIVE specialphonecall SPECIALCALL_NONE farwritetext MomPhoneLectureText yesorno diff --git a/engine/player_movement.asm b/engine/player_movement.asm index d6d10aea1..192860200 100755 --- a/engine/player_movement.asm +++ b/engine/player_movement.asm @@ -19,7 +19,7 @@ DoPlayerMovement:: ; 80000 ; Standing downhill instead moves down. ld hl, wBikeFlags - bit 2, [hl] ; downhill + bit BIKEFLAGS_DOWNHILL_F, [hl] ret z ld c, a @@ -286,7 +286,7 @@ DoPlayerMovement:: ; 80000 jr nz, .walk ld hl, wBikeFlags - bit 2, [hl] ; downhill + bit BIKEFLAGS_DOWNHILL_F, [hl] jr z, .fast ld a, [WalkingDirection] @@ -673,7 +673,7 @@ DoPlayerMovement:: ; 80000 .CheckStrengthBoulder: ; 8036f ld hl, wBikeFlags - bit 0, [hl] ; using strength + bit BIKEFLAGS_STRENGTH_ACTIVE_F, [hl] jr z, .not_boulder ld hl, OBJECT_DIRECTION_WALKING |