From cf9f6297fa2e5e96f5819d5a26a7d40d57f9124d Mon Sep 17 00:00:00 2001 From: nmlgc Date: Wed, 26 Dec 2018 17:46:04 +0100 Subject: [PATCH] [Boss Rush] Implement for TH05 Theoretically, the same method should work for TH04 as well, but for some reason, the Stage 3 boss gets stuck on the first phase if we do this? --- th05/formats/std.asm | 7 ++++--- th05_main.asm | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/th05/formats/std.asm b/th05/formats/std.asm index 4cce2006..5f381516 100644 --- a/th05/formats/std.asm +++ b/th05/formats/std.asm @@ -56,14 +56,15 @@ std_load proc near repne scasb lea ax, [di+5] mov _tile_index_ptr, ax - mov _tile_row, 0 + xor al, al + mov _tile_row, al + mov _tile_scrollspeed, al ; 0 immediately triggers the boss battle movzx ax, byte ptr es:[di] inc ax add di, ax lea ax, [di+5] mov _tile_scrollspeed_ptr, ax movzx ax, byte ptr es:[di] - mov _tile_scrollspeed, al inc ax add di, ax mov dl, es:[di] @@ -81,7 +82,7 @@ std_load proc near inc di mov word ptr _std_ip+2, es mov word ptr _std_ip, di - setfarfp _stage_vm, std_run + setfarfp _stage_vm, nullsub_1 pop di pop si retn diff --git a/th05_main.asm b/th05_main.asm index 00c946ab..2cba4d4d 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -583,7 +583,7 @@ loc_B099: loc_B09F: cmp si, 8 jl short loc_B099 - mov power, 1 + mov power, 128 ; Start with full power mov dream, 1 call sub_E528 mov al, playchar @@ -24062,6 +24062,7 @@ sub_172FF endp ; Attributes: bp-based frame sub_17322 proc far + retf ; Disable midbosses push bp mov bp, sp mov ax, frames_until_midboss @@ -24078,7 +24079,6 @@ sub_17322 proc far loc_17352: pop bp - retf sub_17322 endp