From 4a7d4db25aeded30384018c800dafe6aa16b6927 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Fri, 5 Apr 2024 23:38:09 +0200 Subject: [PATCH] =?UTF-8?q?[Reverse-engineering]=20[th02]=20Evil=20Eye=20?= =?UTF-8?q?=CE=A3:=20Fight=20duration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of P0279, funded by Yanga and Blue Bolt. --- th02/main/boss/bosses.hpp | 5 +++++ th02_main.asm | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 th02/main/boss/bosses.hpp diff --git a/th02/main/boss/bosses.hpp b/th02/main/boss/bosses.hpp new file mode 100644 index 00000000..71811ec7 --- /dev/null +++ b/th02/main/boss/bosses.hpp @@ -0,0 +1,5 @@ +// TH02-specific boss declarations. + +// Total amount of frames spent in the Evil Eye Σ fight, excluding the defeat +// animation. +extern uint32_t sigma_frames; diff --git a/th02_main.asm b/th02_main.asm index 4f4a80de..444a1e6a 100644 --- a/th02_main.asm +++ b/th02_main.asm @@ -6791,7 +6791,7 @@ loc_FE9B: push si call sub_FC15 mov ax, 4E20h - sub ax, word ptr dword_20682 + sub ax, word ptr _sigma_frames mov si, ax or si, si jge short loc_FEB9 @@ -7149,7 +7149,7 @@ loc_102A9: mov byte_2066A, 0 mov _boss_damage, 0 mov byte_2066B, 0 - mov dword_20682, 0 + mov _sigma_frames, 0 mov word_20686, 0 pop si pop bp @@ -18380,7 +18380,7 @@ loc_16948: mov ax, [bx] mov point_254E6.y, ax call sub_15907 - inc dword_20682 + inc _sigma_frames loc_16962: call sub_1566F @@ -30549,7 +30549,8 @@ word_2066E dw ? word_20670 dw ? byte_20672 db ? db 15 dup(?) -dword_20682 dd ? +public _sigma_frames +_sigma_frames dd ? word_20686 dw ? db 3000 dup(?)