From a93175828c7a40622a351aea1e448f27d6715bb4 Mon Sep 17 00:00:00 2001 From: wintiger0222 <0xodbs02@naver.com> Date: Sun, 5 Jan 2020 17:55:13 +0900 Subject: [PATCH] [Reverse-engineering] [th03] In-game score font More related to the TH05 Music Room piano label font than to the small popup numbers --Nmlgc --- th03/sprites/score.asm | 95 ++++++++++++++++++++++++++++++++++++++++++ th03/sprites/sprites.h | 4 ++ th03_main.asm | 83 +----------------------------------- 3 files changed, 101 insertions(+), 81 deletions(-) create mode 100644 th03/sprites/score.asm create mode 100644 th03/sprites/sprites.h diff --git a/th03/sprites/score.asm b/th03/sprites/score.asm new file mode 100644 index 00000000..d7e4959f --- /dev/null +++ b/th03/sprites/score.asm @@ -0,0 +1,95 @@ +SCORE_FONT_W = 8 +SCORE_FONT_H = 8 + +public _SCORE_FONT +_SCORE_FONT label byte +; 0 + db 111110b + db 1100001b + db 1010001b + db 1001001b + db 1000101b + db 1000011b + db 111110b + db 0b +; 1 + db 111110b + db 1000b + db 1000b + db 1000b + db 101000b + db 101000b + db 11000b + db 0b +; 2 + db 1111111b + db 1000000b + db 100000b + db 11100b + db 11b + db 1000001b + db 111110b + db 0b +; 3 + db 111110b + db 1000001b + db 01 + db 11110b + db 01 + db 1000001b + db 111110b + db 0b +; 4 + db 10b + db 10b + db 1111111b + db 100010b + db 10010b + db 1010b + db 110b + db 0b +; 5 + db 11110b + db 1100001b + db 01 + db 1100001b + db 1011110b + db 1000000b + db 1111110b + db 0b +; 6 + db 111110b + db 1000001b + db 1000001b + db 1111110b + db 1000000b + db 1000001b + db 111110b + db 0b +; 7 + db 1000b + db 1000b + db 1000b + db 1000b + db 110b + db 1000001b + db 1111111b + db 0b +; 8 + db 111110b + db 1000001b + db 1000001b + db 111110b + db 1000001b + db 1000001b + db 111110b + db 0b +; 9 + db 111110b + db 1000001b + db 01 + db 111111b + db 1000001b + db 1000001b + db 111110b + db 0b diff --git a/th03/sprites/sprites.h b/th03/sprites/sprites.h new file mode 100644 index 00000000..f4428dc3 --- /dev/null +++ b/th03/sprites/sprites.h @@ -0,0 +1,4 @@ +// In-game score font. Stored upside down. +#define SCORE_FONT_W 8 +#define SCORE_FONT_H 8 +extern const planar8_t SCORE_FONT[10][8 / sizeof(planar8_t)]; diff --git a/th03_main.asm b/th03_main.asm index dcb26dc5..b0caa4af 100644 --- a/th03_main.asm +++ b/th03_main.asm @@ -6610,7 +6610,7 @@ sub_D50E proc near push si push di mov ah, 0 - mov si, 858h + mov si, offset _SCORE_FONT shl ax, 3 add si, ax mov ax, cx @@ -35989,86 +35989,7 @@ word_1DDAC dw 2AB6h db 32h ; 2 db 0 db 0 - db 3Eh ; > - db 61h ; a - db 51h ; Q - db 49h ; I - db 45h ; E - db 43h ; C - db 3Eh ; > - db 0 - db 3Eh ; > - db 8 - db 8 - db 8 - db 28h ; ( - db 28h ; ( - db 18h - db 0 - db 7Fh - db 40h - db 20h - db 1Ch - db 3 - db 41h ; A - db 3Eh ; > - db 0 - db 3Eh ; > - db 41h ; A - db 1 - db 1Eh - db 1 - db 41h ; A - db 3Eh ; > - db 0 - db 2 - db 2 - db 7Fh - db 22h ; " - db 12h - db 0Ah - db 6 - db 0 - db 1Eh - db 61h ; a - db 1 - db 61h ; a - db 5Eh ; ^ - db 40h - db 7Eh ; ~ - db 0 - db 3Eh ; > - db 41h ; A - db 41h ; A - db 7Eh ; ~ - db 40h - db 41h ; A - db 3Eh ; > - db 0 - db 8 - db 8 - db 8 - db 8 - db 6 - db 41h ; A - db 7Fh - db 0 - db 3Eh ; > - db 41h ; A - db 41h ; A - db 3Eh ; > - db 41h ; A - db 41h ; A - db 3Eh ; > - db 0 - db 3Eh ; > - db 41h ; A - db 1 - db 3Fh ; ? - db 41h ; A - db 41h ; A - db 3Eh ; > - db 0 +include th03/sprites/score.asm db 10h db 27h ; ' db 0E8h