diff options
Diffstat (limited to 'engine/rtc')
-rw-r--r-- | engine/rtc/reset_password.asm | 28 | ||||
-rw-r--r-- | engine/rtc/restart_clock.asm | 28 | ||||
-rw-r--r-- | engine/rtc/timeset.asm | 110 |
3 files changed, 73 insertions, 93 deletions
diff --git a/engine/rtc/reset_password.asm b/engine/rtc/reset_password.asm index 0992f0bca..6fd7b3e15 100644 --- a/engine/rtc/reset_password.asm +++ b/engine/rtc/reset_password.asm @@ -6,7 +6,7 @@ _ResetClock: call LoadFontsExtra ld de, MUSIC_MAIN_MENU call PlayMusic - ld hl, .text_askreset + ld hl, .PasswordAskResetClockText call PrintText ld hl, .NoYes_MenuHeader call CopyMenuHeader @@ -22,28 +22,25 @@ _ResetClock: ld a, $80 ld [sRTCStatusFlags], a call CloseSRAM - ld hl, .text_okay + ld hl, .PasswordAskResetText call PrintText ret .wrongpassword - ld hl, .text_wrong + ld hl, .PasswordWrongText call PrintText ret -.text_okay - ; Password OK. Select CONTINUE & reset settings. - text_far UnknownText_0x1c55db +.PasswordAskResetText: + text_far _PasswordAskResetText text_end -.text_wrong - ; Wrong password! - text_far UnknownText_0x1c560b +.PasswordWrongText: + text_far _PasswordWrongText text_end -.text_askreset - ; Reset the clock? - text_far UnknownText_0x1c561c +.PasswordAskResetClockText: + text_far _PasswordAskResetClockText text_end .NoYes_MenuHeader: @@ -67,7 +64,7 @@ ClockResetPassword: call ByteFill ld a, $4 ld [wStringBuffer2 + 5], a - ld hl, .pleaseenterpasswordtext + ld hl, .PasswordAskEnterText call PrintText .loop call .updateIDdisplay @@ -101,9 +98,8 @@ ClockResetPassword: scf ret -.pleaseenterpasswordtext - ; Please enter the password. - text_far UnknownText_0x1c562e +.PasswordAskEnterText: + text_far _PasswordAskEnterText text_end .updateIDdisplay diff --git a/engine/rtc/restart_clock.asm b/engine/rtc/restart_clock.asm index 16f25cddd..357e69667 100644 --- a/engine/rtc/restart_clock.asm +++ b/engine/rtc/restart_clock.asm @@ -29,7 +29,7 @@ endr RestartClock: ; If we're here, we had an RTC overflow. - ld hl, .Text_ClockTimeMayBeWrong + ld hl, .ClockTimeMayBeWrongText call PrintText ld hl, wOptions ld a, [hl] @@ -37,7 +37,7 @@ RestartClock: set NO_TEXT_SCROLL, [hl] call LoadStandardMenuHeader call ClearTileMap - ld hl, .Text_SetWithControlPad + ld hl, .ClockSetWithControlPadText call PrintText call .SetClock call ExitMenu @@ -47,14 +47,12 @@ RestartClock: ld c, a ret -.Text_ClockTimeMayBeWrong: - ; The clock's time may be wrong. Please reset the time. - text_far UnknownText_0x1c40e6 +.ClockTimeMayBeWrongText: + text_far _ClockTimeMayBeWrongText text_end -.Text_SetWithControlPad: - ; Set with the Control Pad. Confirm: A Button Cancel: B Button - text_far UnknownText_0x1c411c +.ClockSetWithControlPadText: + text_far _ClockSetWithControlPadText text_end .SetClock: @@ -77,7 +75,7 @@ RestartClock: and a ret nz call .PrintTime - ld hl, .Text_IsThisOK + ld hl, .ClockIsThisOKText call PrintText call YesNoBox jr c, .cancel @@ -91,7 +89,7 @@ RestartClock: ld [wStringBuffer2 + 3], a call InitTime call .PrintTime - ld hl, .Text_ClockReset + ld hl, .ClockHasResetText call PrintText call WaitPressAorB_BlinkCursor xor a @@ -101,14 +99,12 @@ RestartClock: ld a, $1 ret -.Text_IsThisOK: - ; Is this OK? - text_far UnknownText_0x1c415b +.ClockIsThisOKText: + text_far _ClockIsThisOKText text_end -.Text_ClockReset: - ; The clock has been reset. - text_far UnknownText_0x1c4168 +.ClockHasResetText: + text_far _ClockHasResetText text_end .joy_loop diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm index 146adc072..da1012ff8 100644 --- a/engine/rtc/timeset.asm +++ b/engine/rtc/timeset.asm @@ -41,7 +41,7 @@ InitClock: call .ClearScreen call WaitBGMap call RotateFourPalettesRight - ld hl, Text_WokeUpOak + ld hl, OakTimeWokeUpText call PrintText ld hl, wTimeSetBuffer ld bc, wTimeSetBufferEnd - wTimeSetBuffer @@ -51,7 +51,7 @@ InitClock: ld [wInitHourBuffer], a .loop - ld hl, Text_WhatTimeIsIt + ld hl, OakTimeWhatTimeIsItText call PrintText hlcoord 3, 7 ld b, 2 @@ -74,7 +74,7 @@ InitClock: ld a, [wInitHourBuffer] ld [wStringBuffer2 + 1], a call .ClearScreen - ld hl, Text_WhatHrs + ld hl, OakTimeWhatHoursText call PrintText call YesNoBox jr nc, .HourIsSet @@ -82,7 +82,7 @@ InitClock: jr .loop .HourIsSet: - ld hl, Text_HowManyMinutes + ld hl, OakTimeHowManyMinutesText call PrintText hlcoord 11, 7 lb bc, 2, 7 @@ -104,7 +104,7 @@ InitClock: ld a, [wInitMinuteBuffer] ld [wStringBuffer2 + 2], a call .ClearScreen - ld hl, Text_WhoaMins + ld hl, OakTimeWhoaMinutesText call PrintText call YesNoBox jr nc, .MinutesAreSet @@ -273,69 +273,64 @@ SetMinutes: DisplayMinutesWithMinString: ld de, wInitMinuteBuffer - call PrintTwoDigitNumberRightAlign + call PrintTwoDigitNumberLeftAlign inc hl ld de, String_min call PlaceString ret -PrintTwoDigitNumberRightAlign: +PrintTwoDigitNumberLeftAlign: push hl ld a, " " ld [hli], a ld [hl], a pop hl - lb bc, PRINTNUM_RIGHTALIGN | 1, 2 + lb bc, PRINTNUM_LEFTALIGN | 1, 2 call PrintNum ret -Text_WokeUpOak: - ; Zzz… Hm? Wha…? You woke me up! Will you check the clock for me? - text_far _OakTimeText1 +OakTimeWokeUpText: + text_far _OakTimeWokeUpText text_end -Text_WhatTimeIsIt: - ; What time is it? - text_far _OakTimeText2 +OakTimeWhatTimeIsItText: + text_far _OakTimeWhatTimeIsItText text_end String_oclock: db "o'clock@" -Text_WhatHrs: +OakTimeWhatHoursText: ; What?@ @ - text_far _OakTimeText3 + text_far _OakTimeWhatHoursText text_asm hlcoord 1, 16 call DisplayHourOClock - ld hl, .QuestionMark + ld hl, .OakTimeHoursQuestionMarkText ret -.QuestionMark: - ; ? - text_far _OakTimeText4 +.OakTimeHoursQuestionMarkText: + text_far _OakTimeHoursQuestionMarkText text_end -Text_HowManyMinutes: - ; How many minutes? - text_far _OakTimeText5 +OakTimeHowManyMinutesText: + text_far _OakTimeHowManyMinutesText text_end String_min: db "min.@" -Text_WhoaMins: +OakTimeWhoaMinutesText: ; Whoa!@ @ - text_far _OakTimeText6 + text_far _OakTimeWhoaMinutesText text_asm hlcoord 7, 14 call DisplayMinutesWithMinString - ld hl, .QuestionMark + ld hl, .OakTimeMinutesQuestionMarkText ret -.QuestionMark: - ; ? - text_far _OakTimeText7 +.OakTimeMinutesQuestionMarkText: + text_far _OakTimeMinutesQuestionMarkText text_end OakText_ResponseToSetTime: @@ -358,29 +353,26 @@ OakText_ResponseToSetTime: jr c, .morn cp NITE_HOUR jr c, .day -.nite: - ld hl, .sodark +.nite + ld hl, .OakTimeSoDarkText ret -.morn: - ld hl, .overslept +.morn + ld hl, .OakTimeOversleptText ret -.day: - ld hl, .yikes +.day + ld hl, .OakTimeYikesText ret -.overslept - ; ! I overslept! - text_far _OakTimeText8 +.OakTimeOversleptText: + text_far _OakTimeOversleptText text_end -.yikes - ; ! Yikes! I over- slept! - text_far _OakTimeText11 +.OakTimeYikesText: + text_far _OakTimeYikesText text_end -.sodark - ; ! No wonder it's so dark! - text_far _OakTimeText12 +.OakTimeSoDarkText: + text_far _OakTimeSoDarkText text_end TimeSetBackgroundGFX: @@ -410,7 +402,7 @@ SetDayOfWeek: lb bc, 4, 18 call Textbox call LoadStandardMenuHeader - ld hl, .WhatDayIsItText + ld hl, .OakTimeWhatDayIsItText call PrintText hlcoord 9, 3 ld b, 2 @@ -532,21 +524,19 @@ SetDayOfWeek: .Friday: db " FRIDAY@" .Saturday: db "SATURDAY@" -.WhatDayIsItText: - ; What day is it? - text_far _OakTimeText13 +.OakTimeWhatDayIsItText: + text_far _OakTimeWhatDayIsItText text_end .ConfirmWeekdayText: text_asm hlcoord 1, 14 call .PlaceWeekdayString - ld hl, .IsIt + ld hl, .OakTimeIsItText ret -.IsIt: - ; , is it? - text_far _OakTimeText14 +.OakTimeIsItText: + text_far _OakTimeIsItText text_end InitialSetDSTFlag: @@ -569,12 +559,11 @@ InitialSetDSTFlag: ld c, a decoord 1, 14 farcall PrintHoursMins - ld hl, .DSTIsThatOK + ld hl, .DSTIsThatOKText ret -.DSTIsThatOK: - ; DST, is that OK? - text_far Text_DSTIsThatOK +.DSTIsThatOKText: + text_far _DSTIsThatOKText text_end InitialClearDSTFlag: @@ -597,12 +586,11 @@ InitialClearDSTFlag: ld c, a decoord 1, 14 farcall PrintHoursMins - ld hl, .IsThatOK + ld hl, .TimeAskOkayText ret -.IsThatOK: - ; , is that OK? - text_far UnknownText_0x1c5ff1 +.TimeAskOkayText: + text_far _TimeAskOkayText text_end DebugDisplayTime: @@ -696,7 +684,7 @@ PrintHour: call AdjustHourForAMorPM ld [wDeciramBuffer], a ld de, wDeciramBuffer - call PrintTwoDigitNumberRightAlign + call PrintTwoDigitNumberLeftAlign ret GetTimeOfDayString: |