wWeeklyFlags -> wDailyFlags2

These are by far not always checked each week, and as such shouldn't be
called that.
Since they're almost always used through the `bit` instruction, it's
very inconvenient to just make wDailyFlags a `dw` instead.
This commit is contained in:
mid-kid 2018-08-06 19:43:54 +02:00
parent 23cdf06e5e
commit f98a95b8ee
11 changed files with 71 additions and 71 deletions

View File

@ -94,7 +94,7 @@
const ENGINE_LUCKY_NUMBER_SHOW const ENGINE_LUCKY_NUMBER_SHOW
; wStatusFlags2 ; wStatusFlags2
const ENGINE_4F const ENGINE_4F
; wDailyFlags ; wDailyFlags1
const ENGINE_KURT_MAKING_BALLS ; 50 const ENGINE_KURT_MAKING_BALLS ; 50
const ENGINE_DAILY_BUG_CONTEST const ENGINE_DAILY_BUG_CONTEST
const ENGINE_FISH_SWARM const ENGINE_FISH_SWARM
@ -103,7 +103,7 @@
const ENGINE_GOT_SHUCKIE_TODAY const ENGINE_GOT_SHUCKIE_TODAY
const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY
; wWeeklyFlags ; wDailyFlags2
const ENGINE_MT_MOON_SQUARE_CLEFAIRY const ENGINE_MT_MOON_SQUARE_CLEFAIRY
const ENGINE_UNION_CAVE_LAPRAS const ENGINE_UNION_CAVE_LAPRAS
const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT

View File

@ -232,27 +232,27 @@ CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2
const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1 const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1
const BIKEFLAGS_DOWNHILL_F ; 2 const BIKEFLAGS_DOWNHILL_F ; 2
; wDailyFlags:: ; dc1e ; wDailyFlags1:: ; dc1e
const_def const_def
const DAILYFLAGS_KURT_MAKING_BALLS_F ; 0 const DAILYFLAGS1_KURT_MAKING_BALLS_F ; 0
const DAILYFLAGS_BUG_CONTEST_F ; 1 const DAILYFLAGS1_BUG_CONTEST_F ; 1
const DAILYFLAGS_FISH_SWARM_F ; 2 const DAILYFLAGS1_FISH_SWARM_F ; 2
const DAILYFLAGS_TIME_CAPSULE_F ; 3 const DAILYFLAGS1_TIME_CAPSULE_F ; 3
const DAILYFLAGS_ALL_FRUIT_TREES_F ; 4 const DAILYFLAGS1_ALL_FRUIT_TREES_F ; 4
const DAILYFLAGS_GOT_SHUCKIE_TODAY_F ; 5 const DAILYFLAGS1_GOT_SHUCKIE_TODAY_F ; 5
const DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F ; 6 const DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F ; 6
const DAILYFLAGS_TRAINER_HOUSE_F ; 7 const DAILYFLAGS1_TRAINER_HOUSE_F ; 7
; wWeeklyFlags:: ; dc1f ; wDailyFlags2:: ; dc1f
const_def const_def
const WEEKLYFLAGS_MT_MOON_SQUARE_CLEFAIRY_F ; 0 const DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F ; 0
const WEEKLYFLAGS_UNION_CAVE_LAPRAS_F ; 1 const DAILYFLAGS2_UNION_CAVE_LAPRAS_F ; 1
const WEEKLYFLAGS_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F ; 2 const DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F ; 2
const WEEKLYFLAGS_GOLDENROD_DEPT_STORE_TM27_RETURN_F ; 3 const DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F ; 3
const WEEKLYFLAGS_DAISYS_GROOMING_F ; 4 const DAILYFLAGS2_DAISYS_GROOMING_F ; 4
const WEEKLYFLAGS_INDIGO_PLATEAU_RIVAL_FIGHT_F ; 5 const DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F ; 5
const WEEKLYFLAGS_DAILY_MOVE_TUTOR_F ; 6 const DAILYFLAGS2_MOVE_TUTOR_F ; 6
const WEEKLYFLAGS_BUENAS_PASSWORD_F ; 7 const DAILYFLAGS2_BUENAS_PASSWORD_F ; 7
; wSwarmFlags:: ; dc20 ; wSwarmFlags:: ; dc20
const_def const_def

View File

@ -104,23 +104,23 @@ EngineFlags:
engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_3_F engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_3_F
engine_flag wDailyFlags, DAILYFLAGS_KURT_MAKING_BALLS_F ; $50 engine_flag wDailyFlags1, DAILYFLAGS1_KURT_MAKING_BALLS_F ; $50
engine_flag wDailyFlags, DAILYFLAGS_BUG_CONTEST_F engine_flag wDailyFlags1, DAILYFLAGS1_BUG_CONTEST_F
engine_flag wDailyFlags, DAILYFLAGS_FISH_SWARM_F engine_flag wDailyFlags1, DAILYFLAGS1_FISH_SWARM_F
engine_flag wDailyFlags, DAILYFLAGS_TIME_CAPSULE_F engine_flag wDailyFlags1, DAILYFLAGS1_TIME_CAPSULE_F
engine_flag wDailyFlags, DAILYFLAGS_ALL_FRUIT_TREES_F engine_flag wDailyFlags1, DAILYFLAGS1_ALL_FRUIT_TREES_F
engine_flag wDailyFlags, DAILYFLAGS_GOT_SHUCKIE_TODAY_F engine_flag wDailyFlags1, DAILYFLAGS1_GOT_SHUCKIE_TODAY_F
engine_flag wDailyFlags, DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F engine_flag wDailyFlags1, DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F
engine_flag wDailyFlags, DAILYFLAGS_TRAINER_HOUSE_F engine_flag wDailyFlags1, DAILYFLAGS1_TRAINER_HOUSE_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_MT_MOON_SQUARE_CLEFAIRY_F ; $58 engine_flag wDailyFlags2, DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F ; $58
engine_flag wWeeklyFlags, WEEKLYFLAGS_UNION_CAVE_LAPRAS_F engine_flag wDailyFlags2, DAILYFLAGS2_UNION_CAVE_LAPRAS_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_GOLDENROD_DEPT_STORE_TM27_RETURN_F engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_DAISYS_GROOMING_F engine_flag wDailyFlags2, DAILYFLAGS2_DAISYS_GROOMING_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_INDIGO_PLATEAU_RIVAL_FIGHT_F engine_flag wDailyFlags2, DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_DAILY_MOVE_TUTOR_F engine_flag wDailyFlags2, DAILYFLAGS2_MOVE_TUTOR_F
engine_flag wWeeklyFlags, WEEKLYFLAGS_BUENAS_PASSWORD_F engine_flag wDailyFlags2, DAILYFLAGS2_BUENAS_PASSWORD_F
engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F ; $60 engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F ; $60
engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F

View File

@ -93,8 +93,8 @@ GetFishGroupIndex:
; Return the index of fishgroup d in de. ; Return the index of fishgroup d in de.
push hl push hl
ld hl, wDailyFlags ld hl, wDailyFlags1
bit DAILYFLAGS_FISH_SWARM_F, [hl] bit DAILYFLAGS1_FISH_SWARM_F, [hl]
pop hl pop hl
jr z, .done jr z, .done

View File

@ -41,8 +41,8 @@ GetCurTreeFruit:
ret ret
TryResetFruitTrees: TryResetFruitTrees:
ld hl, wDailyFlags ld hl, wDailyFlags1
bit DAILYFLAGS_ALL_FRUIT_TREES_F, [hl] bit DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl]
ret nz ret nz
jp ResetFruitTrees jp ResetFruitTrees
@ -65,8 +65,8 @@ ResetFruitTrees:
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [hl], a ld [hl], a
ld hl, wDailyFlags ld hl, wDailyFlags1
set DAILYFLAGS_ALL_FRUIT_TREES_F, [hl] set DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl]
ret ret
GetFruitTreeFlag: GetFruitTreeFlag:

View File

@ -54,8 +54,8 @@ GiveShuckle:
call CopyName2 call CopyName2
; Engine flag for this event. ; Engine flag for this event.
ld hl, wDailyFlags ld hl, wDailyFlags1
set DAILYFLAGS_GOT_SHUCKIE_TODAY_F, [hl] set DAILYFLAGS1_GOT_SHUCKIE_TODAY_F, [hl]
ld a, 1 ld a, 1
ld [wScriptVar], a ld [wScriptVar], a
ret ret

View File

@ -54,8 +54,8 @@ BargainShop:
ld a, [hli] ld a, [hli]
or [hl] or [hl]
jr z, .skip_set jr z, .skip_set
ld hl, wDailyFlags ld hl, wDailyFlags1
set DAILYFLAGS_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl] set DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl]
.skip_set .skip_set
ld hl, Text_BargainShop_ComeAgain ld hl, Text_BargainShop_ComeAgain

View File

@ -91,9 +91,9 @@ CheckDailyResetTimer::
call CheckDayDependentEventHL call CheckDayDependentEventHL
ret nc ret nc
xor a xor a
ld hl, wDailyFlags ld hl, wDailyFlags1
ld [hli], a ; wDailyFlags ld [hli], a ; wDailyFlags1
ld [hli], a ; wWeeklyFlags ld [hli], a ; wDailyFlags2
ld [hli], a ; wSwarmFlags ld [hli], a ; wSwarmFlags
ld [hl], a ; wSwarmFlags + 1 ld [hl], a ; wSwarmFlags + 1
ld hl, wDailyRematchFlags ld hl, wDailyRematchFlags
@ -207,14 +207,14 @@ CheckUnusedTwoDayTimer:
ret ret
; unused ; unused
ld hl, wDailyFlags ld hl, wDailyFlags1
set DAILYFLAGS_FISH_SWARM_F, [hl] set DAILYFLAGS1_FISH_SWARM_F, [hl]
ret ret
; unused ; unused
and a and a
ld hl, wDailyFlags ld hl, wDailyFlags1
bit DAILYFLAGS_FISH_SWARM_F, [hl] bit DAILYFLAGS1_FISH_SWARM_F, [hl]
ret nz ret nz
scf scf
ret ret

View File

@ -1558,8 +1558,8 @@ BuenasPassword4:
jp c, BuenasPassword8 jp c, BuenasPassword8
ld a, [wBuenasPassword] ld a, [wBuenasPassword]
; If we already generated the password today, we don't need to generate a new one. ; If we already generated the password today, we don't need to generate a new one.
ld hl, wWeeklyFlags ld hl, wDailyFlags2
bit WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl] bit DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
jr nz, .AlreadyGotIt jr nz, .AlreadyGotIt
; There are only 11 groups to choose from. ; There are only 11 groups to choose from.
.greater_than_11 .greater_than_11
@ -1580,8 +1580,8 @@ BuenasPassword4:
add e add e
ld [wBuenasPassword], a ld [wBuenasPassword], a
; Set the flag so that we don't generate a new password this week. ; Set the flag so that we don't generate a new password this week.
ld hl, wWeeklyFlags ld hl, wDailyFlags2
set WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl] set DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
.AlreadyGotIt: .AlreadyGotIt:
ld c, a ld c, a
call GetBuenasPassword call GetBuenasPassword
@ -1701,15 +1701,15 @@ BuenasPassword7:
BuenasPasswordAfterMidnight: BuenasPasswordAfterMidnight:
push hl push hl
ld hl, wWeeklyFlags ld hl, wDailyFlags2
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl] res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
pop hl pop hl
ld a, BUENAS_PASSWORD_8 ld a, BUENAS_PASSWORD_8
jp NextRadioLine jp NextRadioLine
BuenasPassword8: BuenasPassword8:
ld hl, wWeeklyFlags ld hl, wDailyFlags2
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl] res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
ld hl, BuenaRadioMidnightText10 ld hl, BuenaRadioMidnightText10
ld a, BUENAS_PASSWORD_9 ld a, BUENAS_PASSWORD_9
jp NextRadioLine jp NextRadioLine
@ -1776,8 +1776,8 @@ BuenasPassword20:
farcall NoRadioName farcall NoRadioName
pop af pop af
ld [hBGMapMode], a ld [hBGMapMode], a
ld hl, wWeeklyFlags ld hl, wDailyFlags2
res WEEKLYFLAGS_BUENAS_PASSWORD_F, [hl] res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl]
ld a, BUENAS_PASSWORD ld a, BUENAS_PASSWORD
ld [wCurrentRadioLine], a ld [wCurrentRadioLine], a
xor a xor a

View File

@ -4265,7 +4265,7 @@ Function1158c2:
ld l, c ld l, c
ld h, b ld h, b
xor a xor a
ld [wWeeklyFlags], a ld [wDailyFlags2], a
.asm_1158e5 .asm_1158e5
ld b, $3 ld b, $3
@ -4290,7 +4290,7 @@ Function1158c2:
push hl push hl
dec hl dec hl
ld a, c ld a, c
ld [wWeeklyFlags], a ld [wDailyFlags2], a
.asm_115908 .asm_115908
xor a xor a
ld [hld], a ld [hld], a
@ -4430,7 +4430,7 @@ endr
jp nz, .asm_1158e5 jp nz, .asm_1158e5
.asm_1159c4 .asm_1159c4
ld a, [wWeeklyFlags] ld a, [wDailyFlags2]
cp $0 cp $0
jr z, .asm_1159d8 jr z, .asm_1159d8
push hl push hl
@ -4890,7 +4890,7 @@ Function115bc8:
Function115c49: Function115c49:
ld a, e ld a, e
ld [wWeeklyFlags], a ld [wDailyFlags2], a
ld a, d ld a, d
ld [wSwarmFlags], a ld [wSwarmFlags], a
xor a xor a
@ -4960,7 +4960,7 @@ endr
ld [$dc1a], a ld [$dc1a], a
push de push de
push hl push hl
ld hl, wWeeklyFlags ld hl, wDailyFlags2
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -5070,7 +5070,7 @@ Function115cfd:
.asm_115d38 .asm_115d38
push de push de
push hl push hl
ld a, [wWeeklyFlags] ld a, [wDailyFlags2]
ld l, a ld l, a
ld a, [wSwarmFlags] ld a, [wSwarmFlags]
ld h, a ld h, a

View File

@ -2714,8 +2714,8 @@ wWhichMomItemSet:: db ; dc18
wMomItemTriggerBalance:: ds 3 ; dc19 wMomItemTriggerBalance:: ds 3 ; dc19
wDailyResetTimer:: dw ; dc1c wDailyResetTimer:: dw ; dc1c
wDailyFlags:: db wDailyFlags1:: db
wWeeklyFlags:: db wDailyFlags2:: db
wSwarmFlags:: db wSwarmFlags:: db
ds 2 ds 2
wTimerEventStartDay:: db wTimerEventStartDay:: db