Identify more bit flags (#1153)

This commit is contained in:
Sylvie
2024-11-29 19:29:30 -05:00
committed by GitHub
parent 8894e29da2
commit 644bd42fb0
78 changed files with 539 additions and 472 deletions

View File

@@ -219,7 +219,7 @@ RunBattleTowerTrainer:
ld a, [wInBattleTowerBattle]
push af
or 1
or 1 << IN_BATTLE_TOWER_BATTLE_F
ld [wInBattleTowerBattle], a
xor a

View File

@@ -234,17 +234,21 @@ Cut_SpawnLeaf:
pop de
ret
; cut leaf spawn coords table bits
DEF CUT_LEAF_SPAWN_RIGHT_F EQU 0
DEF CUT_LEAF_SPAWN_BOTTOM_F EQU 1
Cut_GetLeafSpawnCoords:
ld de, 0
ld a, [wPlayerMetatileX]
bit 0, a
bit 0, a ; even or odd?
jr z, .left_side
set 0, e
set CUT_LEAF_SPAWN_RIGHT_F, e
.left_side
ld a, [wPlayerMetatileY]
bit 0, a
bit 0, a ; even or odd?
jr z, .top_side
set 1, e
set CUT_LEAF_SPAWN_BOTTOM_F, e
.top_side
ld a, [wPlayerDirection]
and %00001100

View File

@@ -26,9 +26,9 @@ InitMapNameSign::
ld [wCurLandmark], a
.not_gate
ld hl, wEnteredMapFromContinue
bit 1, [hl]
res 1, [hl]
ld hl, wMapNameSignFlags
bit SHOWN_MAP_NAME_SIGN, [hl]
res SHOWN_MAP_NAME_SIGN, [hl]
jr nz, .dont_do_map_sign
call .CheckMovingWithinLandmark

View File

@@ -284,7 +284,7 @@ BankOfMom:
DSTChecks:
; check the time; avoid changing DST if doing so would change the current day
ld a, [wDST]
bit 7, a
bit DST_F, a
ldh a, [hHours]
jr z, .NotDST
and a ; within one hour of 00:00?
@@ -313,14 +313,14 @@ DSTChecks:
call .ClearBox
bccoord 1, 14
ld a, [wDST]
bit 7, a
bit DST_F, a
jr z, .SetDST
ld hl, .TimesetAskNotDSTText
call PrintTextboxTextAt
call YesNoBox
ret c
ld a, [wDST]
res 7, a
res DST_F, a
ld [wDST], a
call .SetClockBack
call .ClearBox
@@ -335,7 +335,7 @@ DSTChecks:
call YesNoBox
ret c
ld a, [wDST]
set 7, a
set DST_F, a
ld [wDST], a
call .SetClockForward
call .ClearBox