diff --git a/Makefile.mak b/Makefile.mak index a2b99c09..34e27841 100644 --- a/Makefile.mak +++ b/Makefile.mak @@ -135,7 +135,7 @@ bin\th05\op.exe: bin\th05\op.obj th05\op_01.cpp $** | -bin\th05\main.exe: bin\th05\main.obj th05\main010.cpp th05\p_common.cpp th05\p_reimu.cpp th05\p_marisa.cpp th05\p_mima.cpp th05\p_yuuka.cpp bin\th05\player.obj bin\th05\hud_bar.obj bin\th05\scoreupd.obj th05\main011.cpp th05\main012.cpp bin\th05\bullet.obj th05\main031.cpp th05\main032.cpp th05\main033.cpp th05\main034.cpp +bin\th05\main.exe: bin\th05\main.obj th05\main010.cpp th05\main011.cpp th05\p_common.cpp th05\p_reimu.cpp th05\p_marisa.cpp th05\p_mima.cpp th05\p_yuuka.cpp bin\th05\player.obj bin\th05\hud_bar.obj bin\th05\scoreupd.obj th05\main012.cpp th05\main013.cpp bin\th05\bullet.obj th05\main031.cpp th05\main032.cpp th05\main033.cpp th05\main034.cpp $(CC) $(CFLAGS) -ml -3 -Z -DGAME=5 -DBINARY='M' -nbin\th05\ -eMAIN.EXE @&&| $** | diff --git a/th05/main010.cpp b/th05/main010.cpp index d73f6fed..87554463 100644 --- a/th05/main010.cpp +++ b/th05/main010.cpp @@ -3,8 +3,7 @@ * 1st part of code segment #1 of TH05's MAIN.EXE */ -#pragma codeseg main__TEXT main_01 +#pragma codeseg main_TEXT main_01 extern "C" { -#include "th05/main/boss/render.cpp" } diff --git a/th05/main011.cpp b/th05/main011.cpp index 99eff0bd..d73f6fed 100644 --- a/th05/main011.cpp +++ b/th05/main011.cpp @@ -1,10 +1,10 @@ /* ReC98 * ----- - * 2nd part of code segment #1 of TH05's MAIN.EXE + * 1st part of code segment #1 of TH05's MAIN.EXE */ -#pragma codeseg main_0_TEXT main_01 +#pragma codeseg main__TEXT main_01 extern "C" { -#include "th04/main/hud/popup.cpp" +#include "th05/main/boss/render.cpp" } diff --git a/th05/main012.cpp b/th05/main012.cpp index 1cc8b857..8636bae6 100644 --- a/th05/main012.cpp +++ b/th05/main012.cpp @@ -3,34 +3,8 @@ * 3rd part of code segment #1 of TH05's MAIN.EXE */ -#pragma codeseg main_01_TEXT main_01 +#pragma codeseg main_0_TEXT main_01 extern "C" { -#include "th05/th05.hpp" -#include "th04/main/null.hpp" -#include "th04/main/rank.hpp" -#include "th04/main/item/items.hpp" - -void pascal near playfield_fillm_32_0_320_192(void); -void pascal near playfield_fillm_0_0_384_192__2(void); -void pascal near playfield_fillm_0_205_384_163(void); -void pascal near playfield_fillm_64_56_256_256(void); -void pascal near playfield_fillm_0_0_384_192__1(void); -void pascal near playfield_fillm_0_104_384_192(void); - -#include "th04/main/boss/end.cpp" -#include "th04/main/boss/reset.cpp" -#include "th04/formats/bb_stage.c" -#include "th05/main/stage/setup.cpp" - -// Adds the entire score delta at once to the current score. -void pascal score_delta_commit(void) -{ - while(score_delta > 0) { - score_update_and_render(); - } -} - -static int unused_6CAC[3]; - +#include "th04/main/hud/popup.cpp" } diff --git a/th05/main013.cpp b/th05/main013.cpp new file mode 100644 index 00000000..deabcd48 --- /dev/null +++ b/th05/main013.cpp @@ -0,0 +1,36 @@ +/* ReC98 + * ----- + * 4th part of code segment #1 of TH05's MAIN.EXE + */ + +#pragma codeseg main_01_TEXT main_01 + +extern "C" { +#include "th05/th05.hpp" +#include "th04/main/null.hpp" +#include "th04/main/rank.hpp" +#include "th04/main/item/items.hpp" + +void pascal near playfield_fillm_32_0_320_192(void); +void pascal near playfield_fillm_0_0_384_192__2(void); +void pascal near playfield_fillm_0_205_384_163(void); +void pascal near playfield_fillm_64_56_256_256(void); +void pascal near playfield_fillm_0_0_384_192__1(void); +void pascal near playfield_fillm_0_104_384_192(void); + +#include "th04/main/boss/end.cpp" +#include "th04/main/boss/reset.cpp" +#include "th04/formats/bb_stage.c" +#include "th05/main/stage/setup.cpp" + +// Adds the entire score delta at once to the current score. +void pascal score_delta_commit(void) +{ + while(score_delta > 0) { + score_update_and_render(); + } +} + +static int unused_6CAC[3]; + +} diff --git a/th05_main.asm b/th05_main.asm index edb6f87a..842b9fc0 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__TEXT, main_0_TEXT, main_01_TEXT +main_01 group main_TEXT, main__TEXT, main_0_TEXT, main_01_TEXT main_03 group main_031_TEXT, main_032_TEXT, main_033_TEXT, main_034_TEXT, main_035_TEXT ; =========================================================================== @@ -311,7 +311,7 @@ _TEXT ends ; =========================================================================== ; Segment type: Pure code -main__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 @@ -2120,13 +2120,15 @@ loc_C565: pop bp retn sub_C52D endp +main_TEXT ends +main__TEXT segment byte public 'CODE' use16 ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame -sub_C567 proc near +reimu_stars_update_and_render proc near @@angle = byte ptr -5 var_4 = word ptr -4 @@ -2318,7 +2320,7 @@ loc_C72E: pop si leave retn -sub_C567 endp +reimu_stars_update_and_render endp ; =============== S U B R O U T I N E ======================================= @@ -2332,7 +2334,7 @@ sub_C73A proc near push 0 call cdg_put_noalpha call sub_CEC2 - call sub_C567 + call reimu_stars_update_and_render mov _circles_color, GC_RG cmp _bomb_frame, 64 ja short loc_C777