[Maintenance] [th01] Move data of FUUIN.EXE segments ≥4 to a new assembly unit

Turns out that the "new idea" for handling these data slices won't work
out in reality. At least the amount of necessary manual `extern`
declarations isn't soul-crushingly large, so this way isn't bad either,
after all!

Part of P0197, funded by Yanga and Ember2528.
This commit is contained in:
nmlgc 2022-05-29 22:40:18 +02:00
parent 9cd1b04894
commit 94372d2e27
7 changed files with 74 additions and 28 deletions

View File

@ -53,7 +53,7 @@ bin\th01\reiiden.exe: bin\piloadc.obj bin\th01\reiiden.obj th01\main_010.cpp th0
$**
|
bin\th01\fuuin.exe: bin\piloadc.obj bin\th01\fuuin.obj th01\fuuin_01.cpp th01\fuuin_02.cpp th01\fuuin_04.cpp bin\th01\vsync.obj bin\th01\ztext.obj bin\th01\initexit.obj bin\th01\graph.obj bin\th01\grppffx.obj th01\fuuin_10.cpp bin\th01\vplanset.obj th01\fuuin_11.cpp th01\2x_fuuin.cpp bin\th01\mdrv2.obj
bin\th01\fuuin.exe: bin\piloadc.obj bin\th01\fuuin.obj th01\fuuin_01.cpp th01\fuuin_02.cpp th01\fuuin_04.cpp bin\th01\vsync.obj bin\th01\ztext.obj bin\th01\initexit.obj bin\th01\graph.obj bin\th01\grppffx.obj th01\fuuin_10.cpp bin\th01\vplanset.obj th01\fuuin_11.cpp th01\2x_fuuin.cpp bin\th01\mdrv2.obj bin\th01\fuuin_2.obj
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -3 -Z -DGAME=1 -DBINARY='E' -nbin\th01\ -eFUUIN.EXE @&&|
$**
|

View File

@ -66,6 +66,7 @@ BMP2ARR = bin\\Pipeline\\bmp2arr.exe
th01/sprites/shape8x8.asp \
|> !as |> bin\\th01\\reiiden.obj
: th01_fuuin.asm |> !as |> bin\\th01\\fuuin.obj
: th01_fuuin_data.asm |> !as |> bin\\th01\\fuuin_2.obj
: th02_zuninit.asm |> !as |> bin\\th02\\zuninit.obj
: th02_op.asm |> !as |> bin\\th02\\op.obj

View File

@ -25,6 +25,7 @@ tasm32 /m /mx /kh32768 /t zuncom\cstmstub.asm bin\zuncom\cstmstub.obj
tasm32 /m /mx /kh32768 /t th01_op.asm bin\th01\op.obj
tasm32 /m /mx /kh32768 /t th01_reiiden.asm bin\th01\reiiden.obj
tasm32 /m /mx /kh32768 /t th01_fuuin.asm bin\th01\fuuin.obj
tasm32 /m /mx /kh32768 /t th01_fuuin_data.asm bin\th01\fuuin_2.obj
tasm32 /m /mx /kh32768 /t th02_zuninit.asm bin\th02\zuninit.obj
tasm32 /m /mx /kh32768 /t th02_op.asm bin\th02\op.obj
tasm32 /m /mx /kh32768 /t th02_main.asm bin\th02\main.obj

View File

@ -1,3 +0,0 @@
public _graph_type_ank_fmt, _graph_type_kanji_fmt
_graph_type_ank_fmt db '%c',0
_graph_type_kanji_fmt db '%c%c',0

View File

@ -108,11 +108,9 @@ void pascal graph_type_ank(
screen_x_t left, vram_y_t top, int len, const char *str
)
{
extern const char graph_type_ank_fmt[];
for(int i = 0; i < len; i++) {
graph_printf_fx(
left + (i * GLYPH_HALF_W), top, TYPE_FX,
graph_type_ank_fmt, str[i]
left + (i * GLYPH_HALF_W), top, TYPE_FX, "%c", str[i]
);
frame_delay(TYPE_DELAY);
}
@ -122,11 +120,10 @@ void pascal graph_type_kanji(
screen_x_t left, vram_y_t top, int len, const char *str
)
{
extern const char graph_type_kanji_fmt[];
for(int i = 0; i < len; i++) {
graph_printf_fx(
left + (i * GLYPH_FULL_W), top, TYPE_FX,
graph_type_kanji_fmt, str[(2 * i) + 0], str[(2 * i) + 1]
"%c%c", str[(2 * i) + 0], str[(2 * i) + 1]
);
frame_delay(TYPE_DELAY);
}

View File

@ -1745,25 +1745,45 @@ aThankYouForPla db ' Thank you for Playing !! ',0
aBBBVavVVPNjbBB db '★★★あなたの称号★★★',0
aKo db '完',0
aKo_0 db '完',0
db 0
include th01/end/type[data].asm
include th01/hardware/vsync[data].asm
include th01/hardware/ztext[data].asm
include th01/core/initexit[data].asm
include th01/hardware/palette[data].asm
include th01/hardware/graph_r[data].asm
include th01/hardware/respal[data].asm
include th01/formats/grp_ptn[data].asm
include th01/snd/mdrv2[data].asm
include libs/master.lib/version[data].asm
include libs/master.lib/grp[data].asm
include libs/master.lib/pal[data].asm
include libs/master.lib/respal_exist[data].asm
include libs/master.lib/resdata[data].asm
include libs/master.lib/fil[data].asm
include libs/master.lib/dos_ropen[data].asm
include libs/master.lib/clip[data].asm
include libs/master.lib/rand[data].asm
; th01/hardware/palette[data].asm
extern _z_Palettes:rgb_t:COLOR_COUNT
; libs/master.lib/grp[data].asm
extern graph_VramSeg:word
extern graph_VramWords:word
extern graph_VramLines:word
extern graph_VramZoom:word
; libs/master.lib/pal[data].asm
extern PaletteTone:word
extern PalettesInit:rgb_t:COLOR_COUNT
extern PaletteNote:word
extern ResPalSeg:word
; libs/master.lib/respal_exist[data].asm
IDLEN EQU 10
extern ResPalID:byte:IDLEN
; libs/master.lib/fil[data].asm
extern file_BufferSize:word
extern file_Handle:word
; libs/master.lib/dos_ropen[data].asm
extern file_sharingmode:word
; libs/master.lib/clip[data].asm
extern ClipXL:word
extern ClipXW:word
extern ClipXR:word
extern ClipYT:word
extern ClipYH:word
extern ClipYB:word
extern ClipYT_seg:word
extern ClipYB_adr:word
; libs/master.lib/rand[data].asm
extern random_seed:dword
.data?

30
th01_fuuin_data.asm Normal file
View File

@ -0,0 +1,30 @@
; Additional data after the last translation unit in C land.
.386
.model use16 large
BINARY = 'E'
include pc98.inc
.data
include th01/hardware/vsync[data].asm
include th01/hardware/ztext[data].asm
include th01/core/initexit[data].asm
include th01/hardware/palette[data].asm
include th01/hardware/graph_r[data].asm
include th01/hardware/respal[data].asm
include th01/formats/grp_ptn[data].asm
include th01/snd/mdrv2[data].asm
include libs/master.lib/version[data].asm
include libs/master.lib/grp[data].asm
include libs/master.lib/pal[data].asm
include libs/master.lib/respal_exist[data].asm
include libs/master.lib/resdata[data].asm
include libs/master.lib/fil[data].asm
include libs/master.lib/dos_ropen[data].asm
include libs/master.lib/clip[data].asm
include libs/master.lib/rand[data].asm
end