diff --git a/th03/cutscene/cutscene.cpp b/th03/cutscene/cutscene.cpp index a18d80a5..e8f63d39 100644 --- a/th03/cutscene/cutscene.cpp +++ b/th03/cutscene/cutscene.cpp @@ -83,3 +83,8 @@ bool16 pascal near cutscene_script_load(const char* fn) #endif } #endif + +// ZUN bloat: Turn into a single global inline function. +#define egc_start_copy near egc_start_copy +#include "th01/hardware/egcstart.cpp" +#undef egc_start_copy diff --git a/th03_mainl.asm b/th03_mainl.asm index 6d695cc8..5c89edbe 100644 --- a/th03_mainl.asm +++ b/th03_mainl.asm @@ -1199,10 +1199,10 @@ sub_9F8D endp @CUTSCENE_SCRIPT_LOAD$QNXC procdesc pascal near \ fn:dword @cutscene_script_free$qv procdesc near + @egc_start_copy$qv procdesc near CUTSCENE_TEXT ends mainl_01_TEXT segment byte public 'CODE' use16 -EGC_START_COPY_DEF 1, near ; =============== S U B R O U T I N E ======================================= @@ -1227,7 +1227,7 @@ arg_2 = word ptr 6 shl dx, 4 add ax, dx mov si, ax - call @egc_start_copy_1$qv + call @egc_start_copy$qv xor di, di jmp short loc_A225 ; --------------------------------------------------------------------------- @@ -1334,7 +1334,7 @@ loc_A26F: loc_A2B4: call graph_pack_put_8_noclip pascal, large 400, [bp+var_8], 320 - call @egc_start_copy_1$qv + call @egc_start_copy$qv egc_selectpat egc_setrop EGC_COMPAREREAD or EGC_WS_PATREG or EGC_RL_MEMREAD outw2 EGC_BITLENGTHREG, 0Fh diff --git a/th04/cutscene/box.cpp b/th04/cutscene/box.cpp index 746f4c1a..a87b46a1 100644 --- a/th04/cutscene/box.cpp +++ b/th04/cutscene/box.cpp @@ -26,7 +26,6 @@ typedef enum { _box_mask_t_FORCE_UINT16 = 0xFFFF } box_mask_t; -#define egc_start_copy egc_start_copy_1 void near egc_start_copy(void); // Copies the text box area from VRAM page 1 to VRAM page 0, applying the diff --git a/th04_maine.asm b/th04_maine.asm index 5a72b023..194f8d79 100644 --- a/th04_maine.asm +++ b/th04_maine.asm @@ -336,10 +336,10 @@ _main endp @CUTSCENE_SCRIPT_LOAD$QNXC procdesc pascal near \ fn:dword @cutscene_script_free$qv procdesc near + @egc_start_copy$qv procdesc near CUTSCENE_TEXT ends maine_01_TEXT segment byte public 'CODE' use16 -EGC_START_COPY_DEF 1, near ; =============== S U B R O U T I N E ======================================= @@ -364,7 +364,7 @@ arg_2 = word ptr 6 shl dx, 4 add ax, dx mov si, ax - call @egc_start_copy_1$qv + call @egc_start_copy$qv xor di, di jmp short loc_A368 ; --------------------------------------------------------------------------- @@ -471,7 +471,7 @@ loc_A3B2: loc_A3F7: call graph_pack_put_8_noclip pascal, large 400, [bp+var_8], 320 - call @egc_start_copy_1$qv + call @egc_start_copy$qv egc_selectpat egc_setrop EGC_COMPAREREAD or EGC_WS_PATREG or EGC_RL_MEMREAD outw2 EGC_BITLENGTHREG, 0Fh diff --git a/th05_maine.asm b/th05_maine.asm index 7f70d772..3a5fb531 100644 --- a/th05_maine.asm +++ b/th05_maine.asm @@ -305,8 +305,7 @@ _main endp fn:dword CUTSCENE_TEXT ends -maine_01_TEXT segment byte public 'CODE' use16 -EGC_START_COPY_DEF 1, near +maine_01_TEXT segment byte public 'CODE' use16 ; =============== S U B R O U T I N E =======================================