[Reverse-engineering] [th02/th04/th05] Player option sprite number

Part of P0034, funded by zorg.
This commit is contained in:
nmlgc 2019-09-22 23:50:13 +02:00
parent 0b542125a5
commit b7d204aeec
5 changed files with 20 additions and 14 deletions

View File

@ -3587,7 +3587,7 @@ loc_C5C2:
mov byte_205E0, 0
mov _player_is_hit, 0
mov byte_1E517, 0
mov byte_1E51B, 48h ; 'H'
mov _player_option_patnum, 72
mov word_205D8, 0FFFFh
mov word_205DC, 0FFFFh
mov word_205DA, 0FFFFh
@ -3625,7 +3625,7 @@ loc_C655:
mov _playchar_speed_diagonal_y, 3
mov byte_2060E, 34h ; '4'
mov byte_2060F, 37h ; '7'
inc byte_1E51B
inc _player_option_patnum
pop bp
retn
; ---------------------------------------------------------------------------
@ -3639,9 +3639,9 @@ loc_C67F:
mov byte_1E518, 3
mov byte_2060E, 7Dh ; '}'
mov byte_2060F, 3Bh ; ';'
mov al, byte_1E51B
mov al, _player_option_patnum
add al, 2
mov byte_1E51B, al
mov _player_option_patnum, al
pop bp
retn
sub_C5B0 endp
@ -8907,7 +8907,7 @@ loc_EFC7:
mov bx, word_205F2
push word ptr [bx]
push si
mov al, byte_1E51B
mov al, _player_option_patnum
mov ah, 0
push ax
call super_roll_put_tiny
@ -8916,7 +8916,7 @@ loc_EFC7:
add ax, 30h ; '0'
push ax
push si
mov al, byte_1E51B
mov al, _player_option_patnum
mov ah, 0
push ax
call super_roll_put_tiny
@ -34411,7 +34411,8 @@ byte_1E517 db 0
byte_1E518 db 4
byte_1E519 db 40h
byte_1E51A db 4Ch
byte_1E51B db 48h
public _PLAYER_OPTION_PATNUM
_player_option_patnum db 72
power_overflow_level dw 0
word_1E51E dw 0
db 0

View File

@ -0,0 +1,3 @@
if GAME eq 4
_player_option_patnum dw ?
endif

View File

@ -525,7 +525,7 @@ loc_AD3B:
call main_01:bb_txt_load
cmp playchar, 0
jnz short loc_AD90
mov word_259B4, 26h ; '&'
mov _player_option_patnum, 38
les bx, _humaconfig
cmp byte ptr es:[bx+19h], 0
jnz short loc_AD7C
@ -543,7 +543,7 @@ loc_AD82:
; ---------------------------------------------------------------------------
loc_AD90:
mov word_259B4, 27h ; '''
mov _player_option_patnum, 39
les bx, _humaconfig
cmp byte ptr es:[bx+19h], 0
jnz short loc_ADA9
@ -11484,11 +11484,11 @@ loc_10C6F:
mov [bp+var_2], ax
mov ax, di
mov dx, [bp+var_2]
push word_259B4
push _player_option_patnum
call main_01:z_super_roll_put_tiny
lea ax, [di+30h]
mov dx, [bp+var_2]
push word_259B4
push _player_option_patnum
call main_01:z_super_roll_put_tiny
GRCG_OFF_CLOBBERING dx
jmp loc_10D47
@ -41439,7 +41439,7 @@ byte_259AA db ?
byte_259AB db ?
dword_259AC dd ?
dword_259B0 dd ?
word_259B4 dw ?
include th04/player/option[bss].asm
dream_items_collected db ?
db ? ;
db ? ;

View File

@ -2,3 +2,5 @@ GAME = 5
include th04/shared.inc
include th05/shot_types.inc
_player_option_patnum = 26

View File

@ -13137,11 +13137,11 @@ loc_122D5:
mov [bp+var_2], ax
mov ax, di
mov dx, [bp+var_2]
push 1Ah
push _player_option_patnum
call z_super_roll_put_tiny
lea ax, [di+30h]
mov dx, [bp+var_2]
push 1Ah
push _player_option_patnum
call z_super_roll_put_tiny
GRCG_OFF_CLOBBERING dx
jmp loc_123A9