diff --git a/th05/main/stage/setup.cpp b/th05/main/stage/setup.cpp index bb79a3f8..416ad330 100644 --- a/th05/main/stage/setup.cpp +++ b/th05/main/stage/setup.cpp @@ -144,8 +144,19 @@ void pascal near stage5_setup(void) cdg_load_all_noalpha(16, "st04bk.cdg"); bb_stage_load("st04.bb"); - yumeko_interval_phase4 = select_for_rank(20, 10, 6, 6); - yumeko_interval_phase7 = select_for_rank(48, 32, 24, 24); + /* TODO: Replace with the decompiled calls + * yumeko_interval_phase4 = select_for_rank(20, 10, 6, 6); + * yumeko_interval_phase7 = select_for_rank(48, 32, 24, 24); + * once that function is part of this translation unit */ + #define SELECT_FOR_RANK(easy, normal, hard, lunatic) __asm { \ + db 0x66, 0x68, normal, 0x00, easy, 0x00; \ + db 0x66, 0x68, lunatic, 0x00, hard, 0x00; \ + nop; push cs; call near ptr select_for_rank; \ + } + SELECT_FOR_RANK(20, 10, 6, 6); + yumeko_interval_phase4 = _AL; + SELECT_FOR_RANK(48, 32, 24, 24); + yumeko_interval_phase7 = _AL; stage_render = nullfunc_near; stage_invalidate = nullfunc_near; diff --git a/th05/main012.cpp b/th05/main012.cpp index 1a82b3f6..1cc8b857 100644 --- a/th05/main012.cpp +++ b/th05/main012.cpp @@ -3,7 +3,7 @@ * 3rd part of code segment #1 of TH05's MAIN.EXE */ -#pragma codeseg main_01_TEXT +#pragma codeseg main_01_TEXT main_01 extern "C" { #include "th05/th05.hpp" diff --git a/th05_main.asm b/th05_main.asm index 0d76a762..e1d1ec9a 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -37,7 +37,7 @@ include th05/main/enemy/enemy.inc extern _strlen:proc .seq -main_01 group main_0_TEXT, main_01_TEXT +main_01 group main__TEXT, main_0_TEXT, main_01_TEXT main_03 group main_031_TEXT, main_032_TEXT, main_033_TEXT, main_034_TEXT ; =========================================================================== @@ -311,7 +311,7 @@ _TEXT ends ; =========================================================================== ; Segment type: Pure code -main_0_TEXT segment word public 'CODE' use16 +main__TEXT segment word public 'CODE' use16 assume cs:main_01 ;org 0Dh assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing @@ -4026,7 +4026,9 @@ loc_D4F4: leave retn sub_D3C6 endp +main__TEXT ends +main_0_TEXT segment word public 'CODE' use16 ; =============== S U B R O U T I N E =======================================