Organize the engine/ directory, director's cut

Cleaned up `engine/routines`, in favor of moving files into more
appropriate directories. predef-related routines are now in top-level
`engine`.
`rtc/delete_save_change_clock.asm` has been split into both
`menus/delete_save.asm` and `rtc/reset_password.asm`.

Made a new subdirectory:
* engine/math: Contains all generic math-related routines.
This commit is contained in:
mid-kid
2018-03-25 18:24:14 +02:00
parent 0d9241889f
commit be76ee56a8
13 changed files with 52 additions and 53 deletions

View File

@@ -257,40 +257,3 @@ ClockResetPassword: ; 4d41e
dec c
jr nz, .ComponentFromString
ret
_DeleteSaveData: ; 4d54c
farcall BlankScreen
ld b, SCGB_DIPLOMA
call GetSGBLayout
call LoadStandardFont
call LoadFontsExtra
ld de, MUSIC_MAIN_MENU
call PlayMusic
ld hl, .Text_ClearAllSaveData
call PrintText
ld hl, .NoYesMenuHeader
call CopyMenuHeader
call VerticalMenu
ret c
ld a, [wMenuCursorY]
cp $1
ret z
farcall EmptyAllSRAMBanks
ret
.Text_ClearAllSaveData: ; 0x4d580
; Clear all save data?
text_jump UnknownText_0x1c564a
db "@"
.NoYesMenuHeader: ; 0x4d585
db 0 ; flags
menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1
dw .MenuData
db 1 ; default option
.MenuData: ; 0x4d58d
db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags
db 2 ; items
db "NO@"
db "YES@"

View File

@@ -1,5 +1,4 @@
ResetClock_GetWraparoundTime: ; 20000 (8:4000)
RestartClock_GetWraparoundTime: ; 20000 (8:4000)
push hl
dec a
ld e, a
@@ -152,7 +151,7 @@ RestartClock: ; 20021 (8:4021)
.pressed_up
ld a, [wBuffer1]
call ResetClock_GetWraparoundTime
call RestartClock_GetWraparoundTime
ld a, [de]
inc a
ld [de], a
@@ -164,7 +163,7 @@ RestartClock: ; 20021 (8:4021)
.pressed_down
ld a, [wBuffer1]
call ResetClock_GetWraparoundTime
call RestartClock_GetWraparoundTime
ld a, [de]
dec a
ld [de], a
@@ -230,7 +229,7 @@ RestartClock: ; 20021 (8:4021)
.PlaceChars: ; 20168 (8:4168)
push de
call ResetClock_GetWraparoundTime
call RestartClock_GetWraparoundTime
ld a, [wBuffer3]
dec a
ld b, a