[Reverse-engineering] [th03] Character IDs

Part of P0061, funded by Touhou Patch Center.
This commit is contained in:
nmlgc 2019-12-01 16:32:22 +01:00
parent 96684f45dc
commit 04d24ccf1c
4 changed files with 24 additions and 1 deletions

12
th03/chars/chars.h Normal file
View File

@ -0,0 +1,12 @@
typedef enum {
PLAYCHAR_REIMU = 0
PLAYCHAR_MIMA = 1
PLAYCHAR_MARISA = 2
PLAYCHAR_ELLEN = 3
PLAYCHAR_KOTOHIME = 4
PLAYCHAR_KANA = 5
PLAYCHAR_RIKAKO = 6
PLAYCHAR_CHIYURI = 7
PLAYCHAR_YUMEMI = 8
PLAYCHAR_COUNT = 9
} playchars_t;

10
th03/chars/chars.inc Normal file
View File

@ -0,0 +1,10 @@
PLAYCHAR_REIMU = 0
PLAYCHAR_MIMA = 1
PLAYCHAR_MARISA = 2
PLAYCHAR_ELLEN = 3
PLAYCHAR_KOTOHIME = 4
PLAYCHAR_KANA = 5
PLAYCHAR_RIKAKO = 6
PLAYCHAR_CHIYURI = 7
PLAYCHAR_YUMEMI = 8
PLAYCHAR_COUNT = 9

View File

@ -3,3 +3,4 @@ include th03/defconv.inc
include th03/mem.inc
include th03/math/randring.inc
include th03/hardware/input.inc
include th03/chars/chars.inc

View File

@ -875,7 +875,7 @@ loc_9D85:
mov al, [bx]
mov [di+17h], al
mov bx, [bp+var_2]
cmp bx, 8
cmp bx, PLAYCHAR_COUNT - 1
ja short loc_9E23
add bx, bx
jmp cs:off_9E99[bx]