[Reverse-engineering] [th05] Music Room piano label font

This commit is contained in:
wintiger0222 2019-12-03 18:05:29 +09:00 committed by nmlgc
parent d0c4de0c7f
commit b74b7f9bce
4 changed files with 160 additions and 125 deletions

22
th05/music/piano.h Normal file
View File

@ -0,0 +1,22 @@
// Using the same naming convention as for the gaiji characters...
#pragma option -b-
typedef enum {
pl_F = 0,
pl_M = 1,
pl_1 = 2,
pl_2 = 3,
pl_3 = 4,
pl_4 = 5,
pl_5 = 6,
pl_S = 7,
pl_G = 8,
pl_COUNT,
} piano_label_t;
#pragma option -b
#define PIANO_LABEL_FONT_H 8
extern const unsigned char PIANO_LABEL_FONT[pl_COUNT][PIANO_LABEL_FONT_H];
// Assumes that the GRCG is active.
void pascal piano_label_put_raw();

View File

@ -0,0 +1,14 @@
public PIANO_LABEL_PUT_RAW
piano_label_put_raw proc near
xor ah, ah
shl al, 3
add ax, offset _PIANO_LABEL_FONT
mov si, ax
mov cx, PIANO_LABEL_FONT_H
@@row_loop:
movsb
add di, ROW_SIZE - 1
loop @@row_loop
retn
piano_label_put_raw endp

View File

@ -0,0 +1,86 @@
PIANO_LABEL_FONT_H = 8
public _PIANO_LABEL_FONT
_PIANO_LABEL_FONT label byte
pl_F = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 111111b
db 1100000b
db 11000000b
db 11111110b
db 10000000b
db 10000000b
db 11000000b
db 1000000b
pl_M = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 1100110b
db 10101001b
db 10011001b
db 10000001b
db 10000001b
db 10000001b
db 11000011b
db 1000010b
pl_1 = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 111100b
db 100b
db 100b
db 100b
db 100b
db 100b
db 1100b
db 1000b
pl_2 = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 111100b
db 1000010b
db 10000001b
db 1
db 110b
db 11000b
db 1100001b
db 1111110b
pl_3 = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 111100b
db 1000010b
db 1
db 1110b
db 1
db 11000001b
db 1000010b
db 1111100b
pl_4 = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 1100b
db 10010b
db 100010b
db 1000010b
db 1000010b
db 1111111b
db 10b
db 10b
pl_5 = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 111110b
db 1000000b
db 10000000b
db 10111100b
db 1000010b
db 1
db 10000010b
db 1111100b
pl_S = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 1111110b
db 11000001b
db 10000000b
db 1110000b
db 1110b
db 1
db 10000011b
db 1111110b
pl_G = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H
db 111110b
db 1100011b
db 11000000b
db 10000000b
db 10000110b
db 11000001b
db 1100011b
db 111100b
pl_COUNT = ($ - _PIANO_LABEL_FONT) / PIANO_LABEL_FONT_H

View File

@ -5147,60 +5147,60 @@ sub_D894 proc far
call sub_DA30 call sub_DA30
mov ah, GC_RI mov ah, GC_RI
call grcg_setcolor_direct_noint_1 call grcg_setcolor_direct_noint_1
mov al, 0 mov al, pl_F
mov di, 156Ch mov di, 156Ch
call sub_DB0D call piano_label_put_raw
mov al, 1 mov al, pl_M
mov di, 156Dh mov di, 156Dh
call sub_DB0D call piano_label_put_raw
mov al, 2 mov al, pl_1
mov di, 156Eh mov di, 156Eh
call sub_DB0D call piano_label_put_raw
mov al, 0 mov al, pl_F
mov di, 1B0Ch mov di, 1B0Ch
call sub_DB0D call piano_label_put_raw
mov al, 1 mov al, pl_M
mov di, 1B0Dh mov di, 1B0Dh
call sub_DB0D call piano_label_put_raw
mov al, 3 mov al, pl_2
mov di, 1B0Eh mov di, 1B0Eh
call sub_DB0D call piano_label_put_raw
mov al, 0 mov al, pl_F
mov di, 20ACh mov di, 20ACh
call sub_DB0D call piano_label_put_raw
mov al, 1 mov al, pl_M
mov di, 20ADh mov di, 20ADh
call sub_DB0D call piano_label_put_raw
mov al, 4 mov al, pl_3
mov di, 20AEh mov di, 20AEh
call sub_DB0D call piano_label_put_raw
mov al, 0 mov al, pl_F
mov di, 264Ch mov di, 264Ch
call sub_DB0D call piano_label_put_raw
mov al, 1 mov al, pl_M
mov di, 264Dh mov di, 264Dh
call sub_DB0D call piano_label_put_raw
mov al, 5 mov al, pl_4
mov di, 264Eh mov di, 264Eh
call sub_DB0D call piano_label_put_raw
mov al, 0 mov al, pl_F
mov di, 2BECh mov di, 2BECh
call sub_DB0D call piano_label_put_raw
mov al, 1 mov al, pl_M
mov di, 2BEDh mov di, 2BEDh
call sub_DB0D call piano_label_put_raw
mov al, 6 mov al, pl_5
mov di, 2BEEh mov di, 2BEEh
call sub_DB0D call piano_label_put_raw
mov al, 7 mov al, pl_S
mov di, 318Ch mov di, 318Ch
call sub_DB0D call piano_label_put_raw
mov al, 7 mov al, pl_S
mov di, 318Dh mov di, 318Dh
call sub_DB0D call piano_label_put_raw
mov al, 8 mov al, pl_G
mov di, 318Eh mov di, 318Eh
call sub_DB0D call piano_label_put_raw
GRCG_OFF_VIA_XOR al GRCG_OFF_VIA_XOR al
push ds push ds
mov ah, PMD_GET_WORKAREA_ADDRESS mov ah, PMD_GET_WORKAREA_ADDRESS
@ -5459,23 +5459,7 @@ off_DAD1 dw offset loc_DA9D
dw 40C0h dw 40C0h
dw 60C0h dw 60C0h
; =============== S U B R O U T I N E ======================================= include th05/music/piano_label.asm
sub_DB0D proc near
xor ah, ah
shl al, 3
add ax, 0A0Ah
mov si, ax
mov cx, 8
loc_DB1A:
movsb
add di, 4Fh ; 'O'
loop loc_DB1A
retn
sub_DB0D endp
GRCG_SETCOLOR_DIRECT_NOINT_DEF 1 GRCG_SETCOLOR_DIRECT_NOINT_DEF 1
db 0 db 0
@ -5985,78 +5969,7 @@ include th05/mem[data].asm
db 0B8h ; ¸ db 0B8h ; ¸
db 3Bh ; ; db 3Bh ; ;
db 0B8h ; ¸ db 0B8h ; ¸
db 3Fh ; ? include th05/music/piano_label[data].asm
db 60h
db 0C0h ; À
db 0FEh
db 80h
db 80h
unk_F9F0 db 0C0h ; À
db 40h
db 66h
db 0A9h
db 99h
db 81h
db 81h
db 81h
db 0C3h
db 42h
db 3Ch
db 4
db 4
db 4
db 4
db 4
db 0Ch
db 8
db 3Ch ; <
db 42h ; B
db 81h
db 1
db 6
db 18h
db 61h ; a
db 7Eh ; ~
db 3Ch ; <
db 42h ; B
db 1
db 0Eh
db 1
db 0C1h
db 42h ; B
db 7Ch ; |
db 0Ch
db 12h
db 22h ; "
db 42h ; B
db 42h ; B
db 7Fh
db 2
db 2
db 3Eh ; >
db 40h
db 80h
db 0BCh ; ¼
db 42h ; B
db 1
db 82h
db 7Ch ; |
db 7Eh ; ~
db 0C1h
db 80h
db 70h ; p
db 0Eh
db 1
db 83h
db 7Eh ; ~
db 3Eh ; >
db 63h ; c
db 0C0h ; À
db 80h
db 86h
db 0C1h
db 63h ; c
db 3Ch ; <
include th05/snd/load[data].asm include th05/snd/load[data].asm
include th04/snd/snd[data].asm include th04/snd/snd[data].asm
db 0 db 0