From d3cc861d334c8b773c1b6c662ed9924c43cef009 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Wed, 4 Apr 2018 22:26:07 +0200 Subject: Fix snake_case filenames Renamed a bunch of files, most of them one-off functions, to better fit the general snake_case naming scheme. Also renamed some awfully long filenames. --- engine/rtc/print_hours_mins.asm | 63 +++++++++++++++++++++++++++++++++++++++++ engine/rtc/printhoursmins.asm | 63 ----------------------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 engine/rtc/print_hours_mins.asm delete mode 100644 engine/rtc/printhoursmins.asm (limited to 'engine/rtc') diff --git a/engine/rtc/print_hours_mins.asm b/engine/rtc/print_hours_mins.asm new file mode 100644 index 000000000..eb7dc1619 --- /dev/null +++ b/engine/rtc/print_hours_mins.asm @@ -0,0 +1,63 @@ +Unreferenced_Function1dd6a9: ; 1dd6a9 + ld a, b + ld b, c + ld c, a + push bc + push de + ld hl, sp+$2 + ld d, h + ld e, l + pop hl + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + pop bc + ret + +PrintHoursMins: ; 1dd6bb (77:56bb) +; Hours in b, minutes in c + ld a, b + cp 12 + push af + jr c, .AM + jr z, .PM + sub 12 + jr .PM +.AM: + or a + jr nz, .PM + ld a, 12 +.PM: + ld b, a +; Crazy stuff happening with the stack + push bc + ld hl, sp+$1 + push de + push hl + pop de + pop hl + ld [hl], " " + lb bc, 1, 2 + call PrintNum + ld [hl], ":" + inc hl + ld d, h + ld e, l + ld hl, sp+$0 + push de + push hl + pop de + pop hl + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + pop bc + ld de, String_AM + pop af + jr c, .place_am_pm + ld de, String_PM +.place_am_pm + inc hl + call PlaceString + ret + +String_AM: db "AM@" ; 1dd6fc +String_PM: db "PM@" ; 1dd6ff diff --git a/engine/rtc/printhoursmins.asm b/engine/rtc/printhoursmins.asm deleted file mode 100644 index eb7dc1619..000000000 --- a/engine/rtc/printhoursmins.asm +++ /dev/null @@ -1,63 +0,0 @@ -Unreferenced_Function1dd6a9: ; 1dd6a9 - ld a, b - ld b, c - ld c, a - push bc - push de - ld hl, sp+$2 - ld d, h - ld e, l - pop hl - lb bc, PRINTNUM_LEADINGZEROS | 2, 5 - call PrintNum - pop bc - ret - -PrintHoursMins: ; 1dd6bb (77:56bb) -; Hours in b, minutes in c - ld a, b - cp 12 - push af - jr c, .AM - jr z, .PM - sub 12 - jr .PM -.AM: - or a - jr nz, .PM - ld a, 12 -.PM: - ld b, a -; Crazy stuff happening with the stack - push bc - ld hl, sp+$1 - push de - push hl - pop de - pop hl - ld [hl], " " - lb bc, 1, 2 - call PrintNum - ld [hl], ":" - inc hl - ld d, h - ld e, l - ld hl, sp+$0 - push de - push hl - pop de - pop hl - lb bc, PRINTNUM_LEADINGZEROS | 1, 2 - call PrintNum - pop bc - ld de, String_AM - pop af - jr c, .place_am_pm - ld de, String_PM -.place_am_pm - inc hl - call PlaceString - ret - -String_AM: db "AM@" ; 1dd6fc -String_PM: db "PM@" ; 1dd6ff -- cgit v1.2.3