[Reverse-engineering] [th04/th05] Boss HP

Funded by -Tom-.
This commit is contained in:
nmlgc 2018-12-07 13:56:01 +01:00
parent b03bc91357
commit 49a67a1a8b
2 changed files with 89 additions and 89 deletions

View File

@ -23004,7 +23004,7 @@ loc_166A0:
mov word_26712, 0
mov byte_2671F, 0
mov byte_2671D, 0
mov word_26716, 2328h
mov _boss_hp, 9000
mov word_26720, 1EDCh
mov word_2671A, 0
sub word ptr dword_2670A+2, 100h
@ -23078,7 +23078,7 @@ loc_1674E:
call sub_15C7C
inc byte_26719
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
sub word_26720, 320h
jmp loc_169B8
; ---------------------------------------------------------------------------
@ -23125,7 +23125,7 @@ loc_167BB:
mov byte_2671F, 0
mov byte_2671D, 0
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
cmp byte_26719, 0Ah
jnb short loc_167EA
sub word_26720, 44Ch
@ -23204,7 +23204,7 @@ loc_16869:
call sub_15C7C
inc byte_26719
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
jmp loc_169B8
; ---------------------------------------------------------------------------
@ -23240,7 +23240,7 @@ loc_168A8:
loc_168C9:
inc byte_26719
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
cmp byte_26719, 11h
jnz short loc_168F6
mov word_26720, 0
@ -23335,8 +23335,8 @@ loc_169B8:
mov ax, word ptr dword_2670A+2
mov word_25984, ax
call sub_15DE8
push word_26716
push 2328h
push _boss_hp
push 9000
call sub_19F16
leave
retf
@ -25249,8 +25249,8 @@ sub_179BC proc near
cwd
pop bx
idiv bx
sub word_26716, ax
mov ax, word_26716
sub _boss_hp, ax
mov ax, _boss_hp
cmp ax, word_26720
jg short loc_179F0
mov al, 1
@ -25292,7 +25292,7 @@ var_2 = word ptr -2
loc_17A1F:
cmp word_2671A, 0
jnz short loc_17A31
mov word_26716, 1770h
mov _boss_hp, 6000
mov byte_25671, 2
loc_17A31:
@ -25487,19 +25487,19 @@ loc_17BEB:
mov byte_266D3, 1
loc_17BF0:
cmp word_26716, 1194h
cmp _boss_hp, 4500
jg short loc_17BFF
cmp byte_25674, 0
jz short loc_17C21
loc_17BFF:
cmp word_26716, 9C4h
cmp _boss_hp, 2500
jg short loc_17C0E
cmp byte_25674, 1
jz short loc_17C21
loc_17C0E:
cmp word_26716, 3E8h
cmp _boss_hp, 1000
jg loc_17CA4
cmp byte_25674, 2
jnz loc_17CA4
@ -25564,8 +25564,8 @@ loc_17CA4:
mov ax, word ptr dword_2670A+2
mov word_25984, ax
call sub_16C6A
push word_26716
push 1770h
push _boss_hp
push 6000
call sub_19F16
leave
retf
@ -26835,7 +26835,7 @@ arg_2 = word ptr 6
mov byte_2671D, 0
mov byte_2671F, 0
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
mov ax, [bp+arg_0]
mov word_26720, ax
mov byte_259EE, 0
@ -26918,7 +26918,7 @@ loc_1872F:
mov frames_until_midboss, 0
mov fp_259E8, offset sub_180BB
mov byte_259EF, 0
mov word_26716, 24B8h
mov _boss_hp, 9400
mov word_26720, 0E74h
mov ax, word ptr dword_2670A
mov word_259EA, ax
@ -27167,8 +27167,8 @@ loc_189A1:
mov word_25982, ax
mov ax, word ptr dword_2670A+2
mov word_25984, ax
push word_26716
push 24B8h
push _boss_hp
push 9400
call sub_19F16
leave
retf
@ -28111,7 +28111,7 @@ var_2 = word ptr -2
loc_19178:
cmp word_2671A, 0
jnz short loc_191DC
mov word_26716, 12C0h
mov _boss_hp, 4800
mov word_26720, 12C0h
mov Palettes, 60h
mov Palettes+1, 0
@ -28557,8 +28557,8 @@ loc_195A9:
mov word_25982, ax
mov ax, word ptr dword_2670A+2
mov word_25984, ax
push word_26716
push 12C0h
push _boss_hp
push 4800
call sub_19F16
loc_195BF:
@ -28952,7 +28952,7 @@ loc_19909:
mov word ptr dword_266E4+2, ax
mov byte_266EC, 1Bh
mov byte_266EF, 1
cmp word_26716, 2BCh
cmp _boss_hp, 700
jg short loc_19942
cmp byte_25688, 3
jnb short loc_1993D
@ -29141,7 +29141,7 @@ sub_19AA3 proc far
loc_19AC8:
cmp word_2671A, 0
jnz short loc_19AEF
mov word_26716, 0BEAh
mov _boss_hp, 3050
mov word_26720, 79Eh
mov Palettes, 0
mov Palettes+1, 0
@ -29514,8 +29514,8 @@ loc_19E8D:
mov word_25982, ax
mov ax, word ptr dword_2670A+2
mov word_25984, ax
push word_26716
push 0BEAh
push _boss_hp
push 3050
call sub_19F16
loc_19EA3:
@ -32301,8 +32301,8 @@ sub_1B3E2 proc near
loc_1B417:
mov al, byte_25A1E
mov ah, 0
sub word_26716, ax
cmp word_26716, 0
sub _boss_hp, ax
cmp _boss_hp, 0
jge short loc_1B42B
mov al, 1
pop bp
@ -32339,7 +32339,7 @@ loc_1B43E:
mov byte_2671F, 0
mov byte_2671D, 0
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
mov ax, [bp+arg_0]
mov word_26720, ax
mov word_25A0A, 0
@ -32399,7 +32399,7 @@ loc_1B4EB:
mov word_26712, 0
mov byte_2671F, 0
mov byte_2671D, 0
mov word_26716, 33F4h
mov _boss_hp, 13300
mov word_26720, 2968h
mov word_2671A, 0
mov word_25A0A, 0
@ -32653,7 +32653,7 @@ loc_1B744:
inc word_2671A
loc_1B748:
mov ax, word_26716
mov ax, _boss_hp
cmp ax, word_26720
jg loc_1B8EA
push 14h
@ -32842,8 +32842,8 @@ loc_1B8EA:
mov word_25984, ax
call sub_15DE8
call sub_1A110
push word_26716
push 33F4h
push _boss_hp
push 13300
call sub_19F16
leave
retf
@ -33947,7 +33947,7 @@ loc_1C26C:
call snd_se_play pascal, 3
loc_1C2AD:
cmp word_26716, 0C8h
cmp _boss_hp, 200
jg short loc_1C2D1
mov byte_266E2, 1
mov byte_266EE, 20h ; ' '
@ -33993,7 +33993,7 @@ loc_1C301:
mov byte_2671D, 0
mov Palettes+2, 80h
mov byte_266D3, 1
mov word_26716, 1770h
mov _boss_hp, 6000
mov word_26720, 1770h
jmp loc_1C67A
; ---------------------------------------------------------------------------
@ -34210,10 +34210,10 @@ loc_1C4EB:
inc byte_25A24
mov al, byte_25A24
mov ah, 0
imul ax, 5DCh
mov dx, 1770h
imul ax, 1500
mov dx, 6000
sub dx, ax
mov word_26716, dx
mov _boss_hp, dx
jmp short loc_1C57F
; ---------------------------------------------------------------------------
@ -34291,25 +34291,25 @@ loc_1C591:
loc_1C5B1:
cmp byte_25A24, 0
jnz short loc_1C5C0
cmp word_26716, 125Ch
cmp _boss_hp, 4700
jle short loc_1C5F1
loc_1C5C0:
cmp byte_25A24, 1
jnz short loc_1C5CF
cmp word_26716, 0CE4h
cmp _boss_hp, 3300
jle short loc_1C5F1
loc_1C5CF:
cmp byte_25A24, 2
jnz short loc_1C5DE
cmp word_26716, 834h
cmp _boss_hp, 2100
jle short loc_1C5F1
loc_1C5DE:
cmp byte_25A24, 3
jnz loc_1C67A
cmp word_26716, 2BCh
cmp _boss_hp, 700
jg loc_1C67A
loc_1C5F1:
@ -34372,8 +34372,8 @@ loc_1C67A:
mov word_25982, ax
mov ax, word ptr dword_2670A+2
mov word_25984, ax
push word_26716
push 1770h
push _boss_hp
push 6000
call sub_19F16
leave
retf
@ -37896,7 +37896,7 @@ sub_1E245 proc far
loc_1E359:
setfarfp farfp_2D018, sub_179F4
mov fp_2D01C, offset sub_ED71
mov word_26716, 1770h
mov _boss_hp, 6000
loc_1E371:
mov byte_26718, 80h
@ -38141,8 +38141,8 @@ sub_1E64E proc near
call sub_1E5D8
mov byte_2671C, al
mov ah, 0
sub word_26716, ax
mov ax, word_26716
sub _boss_hp, ax
mov ax, _boss_hp
cmp ax, word_26720
jg short loc_1E678
mov al, 1
@ -38272,7 +38272,7 @@ loc_1E719:
mov byte_2671D, 0
mov byte_2671F, 0
mov ax, word_26720
mov word_26716, ax
mov _boss_hp, ax
mov ax, [bp+arg_0]
mov word_26720, ax
pop si
@ -40250,8 +40250,8 @@ loc_1F8A5:
mov ax, word ptr dword_2670A+2
mov word_25984, ax
call sub_1EBF3
push word_26716
push 238Ch
push _boss_hp
push 9100
call sub_19F16
leave
retf
@ -41462,7 +41462,7 @@ loc_20284:
loc_202B0:
call sub_20202
mov word_26716, 490Ch
mov _boss_hp, 18700
cmp word_2671A, 80h
jle loc_206B6
mov word_26720, 396Ch
@ -41919,8 +41919,8 @@ loc_206B6:
loc_206C9:
call sub_15DE8
push word_26716
push 490Ch
push _boss_hp
push 18700
call sub_19F16
pop bp
retf
@ -46914,7 +46914,7 @@ dword_2670A dd ?
dword_2670E dd ?
word_26712 dw ?
word_26714 dw ?
word_26716 dw ?
_boss_hp dw ?
byte_26718 db ?
byte_26719 db ?
word_2671A dw ?

View File

@ -27405,7 +27405,7 @@ sub_186B6 proc far
loc_186EF:
cmp boss_phase_frame, 1
jnz short loc_18702
mov word_26342, 122Ah
mov _boss_hp, 4650
mov word_2634C, 9F6h
loc_18702:
@ -27611,7 +27611,7 @@ loc_188E9:
call boss_death_sequence_function
loc_188EE:
push word_26342
push _boss_hp
push 122Ah
call sub_17354
pop bp
@ -28499,7 +28499,7 @@ sub_1903A proc far
loc_19073:
cmp boss_phase_frame, 1
jnz short loc_19097
mov word_26342, 1130h
mov _boss_hp, 4400
mov word_2634C, 0BB8h
mov word_2A72A, 400h
mov byte_2A72F, 2
@ -28706,7 +28706,7 @@ loc_1925E:
call boss_death_sequence_function
loc_19263:
push word_26342
push _boss_hp
push 1130h
call sub_17354
pop bp
@ -29421,7 +29421,7 @@ loc_19897:
mov fp_2CE2C, offset sub_19AE3
loc_1989D:
sub word_26342, 12Ch
sub _boss_hp, 300
loc_198A3:
inc byte ptr [si]
@ -30334,7 +30334,7 @@ sub_1A044 proc far
loc_1A089:
cmp boss_phase_frame, 1
jnz short loc_1A0AD
mov word_26342, 2580h
mov _boss_hp, 9600
mov word_2634C, 1CE8h
mov word_2A72A, 400h
mov byte_2A72F, 2
@ -30463,7 +30463,7 @@ loc_1A208:
mov byte ptr word_2634A+1, 0
mov byte_26349, 0
mov ax, word_2634C
mov word_26342, ax
mov _boss_hp, ax
cmp boss_phase, 0Ch
jnb short loc_1A236
sub word_2634C, 898h
@ -30586,7 +30586,7 @@ loc_1A3AD:
call boss_death_sequence_function
loc_1A3B2:
push word_26342
push _boss_hp
push 2580h
call sub_17354
cmp boss_phase, 3
@ -31689,7 +31689,7 @@ loc_1AC18:
loc_1AC1C:
cmp boss_phase_frame, 1 ; jumptable 0001AC18 case 0
jnz short loc_1AC5E
mov word_26342, 1194h
mov _boss_hp, 4500
mov word_2634C, 0
mov word_2635A, 1194h
mov word_26364, 0
@ -31854,7 +31854,7 @@ loc_1ADC9:
call sub_1A5B3
loc_1ADCF:
mov ax, word_26342
mov ax, _boss_hp
add ax, word_2635A
cmp ax, 157Ch
jge short loc_1ADF4
@ -31867,7 +31867,7 @@ loc_1ADCF:
; ---------------------------------------------------------------------------
loc_1ADF4:
mov ax, word_26342
mov ax, _boss_hp
add ax, word_2635A
cmp ax, 8CAh
jge short loc_1AE17
@ -32026,11 +32026,11 @@ loc_1AF85:
mov boss_phase, 0
mov boss_phase_frame, 0
mov fp_2D06A, offset sub_10F12
mov word_26342, 1EDCh
mov _boss_hp, 7900
loc_1AFA7:
call sub_17726 ; default
mov ax, word_26342
mov ax, _boss_hp
add ax, word_2635A
push ax
push 2328h
@ -33264,7 +33264,7 @@ sub_1B9F2 proc far
loc_1BA22:
cmp boss_phase_frame, 1
jnz short loc_1BA63
mov word_26342, 1EDCh
mov _boss_hp, 7900
mov word_2634C, 11F8h
mov word_2A72A, 400h
mov byte_2A72F, 2
@ -33541,7 +33541,7 @@ loc_1BD02:
loc_1BD09:
call sub_1B446
push word_26342
push _boss_hp
push 1EDCh
call sub_17354
pop bp
@ -34477,7 +34477,7 @@ sub_1C518 proc far
loc_1C54D:
cmp boss_phase_frame, 1
jnz short loc_1C58E
mov word_26342, 1E78h
mov _boss_hp, 7800
mov word_2634C, 16A8h
mov word_2A72A, 400h
mov byte_2A72F, 2
@ -34756,7 +34756,7 @@ loc_1C7FE:
loc_1C805:
call sub_1B446
push word_26342
push _boss_hp
push 1E78h
call sub_17354
@ -35281,7 +35281,7 @@ loc_1CC3E:
call sub_1C82A
loc_1CC7F:
mov ax, word_26342
mov ax, _boss_hp
sub ax, word_2634C
cmp ax, 258h
jge short loc_1CCD0
@ -35624,7 +35624,7 @@ loc_1D02B:
jl short loc_1CFFA
loc_1D030:
mov ax, word_26342
mov ax, _boss_hp
sub ax, word_2634C
cmp ax, 1F4h
jge short loc_1D081
@ -35860,7 +35860,7 @@ sub_1D26B proc far
loc_1D29C:
cmp boss_phase_frame, 1
jnz short loc_1D2EF
mov word_26342, 206Ch
mov _boss_hp, 8300
mov word_2634C, 1D4Ch
mov word_2A72A, 400h
mov byte_2A72F, 2
@ -36100,7 +36100,7 @@ loc_1D50C:
loc_1D513:
call sub_1C8A3
push word_26342
push _boss_hp
push 206Ch
call sub_17354
@ -37028,7 +37028,7 @@ var_2 = word ptr -2
mov ax, boss_phase_frame
add ax, 0FF40h
mov [bp+var_2], ax
cmp word_26342, 15E0h
cmp _boss_hp, 5600
jle short loc_1DD27
cmp boss_phase_frame, 708h
jl short loc_1DD72
@ -37276,7 +37276,7 @@ loc_1DFD8:
dec byte_2D07D
loc_1DFEB:
cmp word_26342, 0ED8h
cmp _boss_hp, 3800
jle short loc_1DFFB
cmp boss_phase_frame, 9C4h
jl short locret_1E020
@ -37480,7 +37480,7 @@ sub_1E197 proc far
loc_1E1CD:
cmp boss_phase_frame, 1
jnz short loc_1E220
mov word_26342, 5910h
mov _boss_hp, 22800
mov word_2634C, 5078h
mov word_2A72A, 400h
mov byte_2A72F, 2
@ -37715,7 +37715,7 @@ loc_1E431:
mov al, byte_26348
mov ah, 0
dec ax
add word_26342, ax
add _boss_hp, ax
xor di, di
loc_1E45A:
@ -37806,7 +37806,7 @@ loc_1E522:
loc_1E527:
call sub_1D58B
call sub_17726
push word_26342
push _boss_hp
push 5910h
call sub_17354
pop di
@ -39304,7 +39304,7 @@ loc_1F182:
or dx, dx
jnz short loc_1F1D4
mov ax, 0D48h
sub ax, word_26342
sub ax, _boss_hp
cwde
shl eax, 6
mov ebx, 0D48h
@ -39336,7 +39336,7 @@ loc_1F1D4:
add al, 2
mov byte_2D085, al
mov ax, 0D48h
sub ax, word_26342
sub ax, _boss_hp
cwde
shl eax, 6
shl eax, 4
@ -39408,7 +39408,7 @@ loc_1F25F:
mov byte_26349, 0
mov byte ptr word_2634A+1, 0
mov ax, word_2634C
mov word_26342, ax
mov _boss_hp, ax
mov ax, [bp+arg_0]
mov word_2634C, ax
pop si
@ -39448,7 +39448,7 @@ loc_1F298:
loc_1F2C9:
cmp boss_phase_frame, 1
jnz short loc_1F333
mov word_26342, 6784h
mov _boss_hp, 26500
mov word_2634C, 5CF8h
mov word_2A72A, 800h
mov byte_2A72F, 2
@ -39800,7 +39800,7 @@ loc_1F660:
loc_1F666:
call sub_17726
call sub_1E8B0
push word_26342
push _boss_hp
push 6784h
call sub_17354
pop si
@ -40412,8 +40412,8 @@ sub_1FADD proc near
call sub_1FA5E
mov byte_26348, al
mov ah, 0
sub word_26342, ax
mov ax, word_26342
sub _boss_hp, ax
mov ax, _boss_hp
cmp ax, word_2634C
jg short loc_1FB03
mov al, 1
@ -40535,7 +40535,7 @@ loc_1FB94:
mov byte_26349, 0
mov byte ptr word_2634A+1, 0
mov ax, word_2634C
mov word_26342, ax
mov _boss_hp, ax
mov ax, [bp+arg_0]
mov word_2634C, ax
pop si
@ -46177,7 +46177,7 @@ word_2633A dw ?
word_2633C dw ?
word_2633E dw ?
word_26340 dw ?
word_26342 dw ?
_boss_hp dw ?
boss_image db ?
boss_phase db ?
boss_phase_frame dw ?