[Maintenance] [th05] Split segment #1 before the line set render function

Why does this suddenly break select_for_rank() in C land?!

Part of P0110, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
nmlgc 2020-08-17 23:40:32 +02:00
parent 808a5b94d3
commit 8cf1e74565
3 changed files with 18 additions and 5 deletions

View File

@ -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;

View File

@ -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"

View File

@ -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 =======================================