Functional stub of title menus [Commit 1] (#17)

This commit is contained in:
xCrystal
2023-10-01 00:10:44 +02:00
parent e53ae0eac9
commit a16322350f
24 changed files with 567 additions and 531 deletions

View File

@@ -13,7 +13,9 @@ OverworldLoop::
.done
call DisableOverworldHUD
ld hl, wGameTimerPaused
res GAME_TIMER_PAUSED_F, [hl] ; stop game timer counter
res GAME_TIMER_COUNTING_F, [hl] ; stop game timer counter
ld a, FALSE
ld [wText2bpp], a
ret
.Jumptable:

View File

@@ -2428,14 +2428,14 @@ CheckObjectCoveredByTextbox:
jr c, .object_not_in_textbox
;.object_in_textbox
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
ld a, [wText2bpp]
and a
jr z, .disappear
jr .ok8
.object_not_in_textbox
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
ld a, [wText2bpp]
and a
jr nz, .not_disappear
.ok8
@@ -2453,8 +2453,8 @@ CheckObjectCoveredByTextbox:
; if we managed make it here without returning early, there are only two options:
; - if 1bpp text, the sprite is wholly outside of a textbox
; - if 2bpp text, the sprite is wholly inside a textbox
ld a, [wTextboxFlags]
bit TEXT_2BPP_F, a
ld a, [wText2bpp]
and a
jr z, .not_disappear
.disappear

View File

@@ -2315,10 +2315,10 @@ Script_endall:
Script_halloffame:
ld hl, wGameTimerPaused
res GAME_TIMER_PAUSED_F, [hl]
res GAME_TIMER_COUNTING_F, [hl]
farcall HallOfFame
ld hl, wGameTimerPaused
set GAME_TIMER_PAUSED_F, [hl]
set GAME_TIMER_COUNTING_F, [hl]
jr ReturnFromCredits
Script_credits:

View File

@@ -1,7 +1,3 @@
_InitializeStartDay:
call InitializeStartDay
ret
ClearDailyTimers::
xor a
ld [wLuckyNumberDayTimer], a
@@ -63,7 +59,8 @@ InitOneDayCountdown:
InitNDaysCountdown:
ld [hl], a
inc hl ; wLuckyNumberDayTimer + 1 or wDailyResetTimer + 1 (both are dw)
call CopyDayToHL
ld a, [wCurDay]
ld [hl], a
ret
CheckDayDependentEventHL:
@@ -147,13 +144,8 @@ CheckBugContestTimer::
scf
ret
InitializeStartDay:
ld hl, wTimerEventStartDay
call CopyDayToHL
ret
CheckPokerusTick::
ld hl, wTimerEventStartDay
ld hl, .Day0
call CalcDaysSince
call GetDaysSince
and a
@@ -164,6 +156,9 @@ CheckPokerusTick::
xor a
ret
.Day0:
db 0
RestartLuckyNumberCountdown:
call .GetDaysUntilNextFriday
ld hl, wLuckyNumberDayTimer
@@ -304,11 +299,6 @@ CopyHourMinSecToHL:
ld [hli], a
ret
CopyDayToHL:
ld a, [wCurDay]
ld [hl], a
ret
CopyHourMinToHL:
ld a, [wGameTimeHours + 1]
ld [hli], a