[Maintenance] [th04] Move MIKO.CFG code into the main menu translation unit

Wait, *what*, the alignment issues even stretch up to those functions?
And since TH05's version of the MIKO.CFG code lies much further down,
we now end up with this horrible #include placement asymmetry between
the two games. At least we now don't need a cross-TU workaround for
TH04's "MIKO.CFG" string either.

Part of P0262, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
nmlgc 2023-11-25 16:46:57 +01:00
parent 86f1f44522
commit dfb48561d6
10 changed files with 19 additions and 19 deletions

View File

@ -147,7 +147,7 @@ bin\th04\res_huma.com: th04\res_huma.cpp
$**
| masters.lib
bin\th04\op.exe: th04\cfg.cpp bin\th04\op.obj th04\op_main.cpp th04\m_char.cpp bin\th01\vplanset.obj bin\th02\frmdely1.obj bin\th03\pi_put.obj bin\th03\pi_load.obj bin\th03\hfliplut.obj bin\th04\input_w.obj bin\th04\vector.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_kaja.obj bin\th04\cdg_p_nc.obj bin\th04\snd_mode.obj bin\th04\snd_dlym.obj bin\th02\exit_dos.obj bin\th04\snd_load.obj bin\th04\cdg_put.obj bin\th04\exit.obj bin\th04\initop.obj bin\th04\cdg_p_na.obj bin\th04\input_s.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\egcrect.obj bin\th04\bgimage.obj bin\th04\bgimager.obj bin\th04\cdg_load.obj th04\frmdely2.c
bin\th04\op.exe: th04\op_main.cpp bin\th04\op.obj th04\m_char.cpp bin\th01\vplanset.obj bin\th02\frmdely1.obj bin\th03\pi_put.obj bin\th03\pi_load.obj bin\th03\hfliplut.obj bin\th04\input_w.obj bin\th04\vector.obj bin\th04\snd_pmdr.obj bin\th04\snd_mmdr.obj bin\th04\snd_kaja.obj bin\th04\cdg_p_nc.obj bin\th04\snd_mode.obj bin\th04\snd_dlym.obj bin\th02\exit_dos.obj bin\th04\snd_load.obj bin\th04\cdg_put.obj bin\th04\exit.obj bin\th04\initop.obj bin\th04\cdg_p_na.obj bin\th04\input_s.obj bin\th04\snd_se_r.obj bin\th04\snd_se.obj bin\th04\egcrect.obj bin\th04\bgimage.obj bin\th04\bgimager.obj bin\th04\cdg_load.obj th04\frmdely2.c
$(CC) $(CFLAGS) $(LARGE_LFLAGS) -DGAME=4 -DBINARY='O' -3 -Z -d -nbin\th04\ -eOP.EXE @&&|
$**
|

View File

@ -1 +0,0 @@
#include "th04/formats/cfg.cpp"

View File

@ -1,5 +1,11 @@
#include <stddef.h>
#include "platform.h"
#if (GAME == 4)
// These are needed for the game startup code, which needs to be part of
// the same translation unit in this game...
#include "pc98.h"
#include "libs/kaja/kaja.h"
#endif
#include "master.hpp"
#include "th04/score.h"
#if (GAME == 5)
@ -9,7 +15,9 @@
#include "th04/resident.hpp"
#endif
#include "th04/formats/cfg.hpp"
extern "C" {
#include "th04/snd/snd.h"
}
#undef CFG_FN
extern const char CFG_FN[];

View File

@ -1,4 +1,3 @@
#pragma option -zPop_01
#if (GAME == 5)
#include "th05/op/start.cpp"
#else

View File

@ -1,12 +1,7 @@
#include "platform.h"
#include "pc98.h"
#include "master.hpp"
#include "th01/rank.h"
#include "th02/formats/pi.h"
#include "th04/common.h"
#include "th04/playchar.h"
#include "th04/score.h"
#include "th04/resident.hpp"
extern "C" {
#include "th04/op/op.hpp"
}

View File

@ -1,12 +1,7 @@
// Startup code shared between TH04 and TH05
#include <process.h>
#include "libs/kaja/kaja.h"
#include "th02/core/initexit.h"
#include "th04/formats/cfg.hpp"
extern "C" {
#include "th04/snd/snd.h"
}
extern char aMAIN[];
extern char aDEB[];

View File

@ -1 +1,3 @@
#pragma option -zPop_01
#include "th04/formats/cfg.cpp"
#include "th04/op/m_main.cpp"

View File

@ -27,7 +27,7 @@ include th04/op/music.inc
extern _getch:proc
extern _strlen:proc
op_01 group CFG_TEXT, OP_MAIN_TEXT, OP_01_TEXT
op_01 group OP_MAIN_TEXT, OP_01_TEXT
g_SHARED group SHARED, SHARED_
; ===========================================================================
@ -153,13 +153,10 @@ _TEXT ends
; ===========================================================================
CFG_TEXT segment byte public 'CODE' use16
OP_MAIN_TEXT segment byte public 'CODE' use16
@cfg_load$qv procdesc near
@cfg_save$qv procdesc near
@cfg_save_exit$qv procdesc near
CFG_TEXT ends
OP_MAIN_TEXT segment byte public 'CODE' use16
_start_game procdesc near
_start_extra procdesc near
_start_demo procdesc near

View File

@ -1,15 +1,19 @@
#include "platform.h"
#include "pc98.h"
#include "master.hpp"
#include "libs/kaja/kaja.h"
#include "th01/rank.h"
#include "th02/core/initexit.h"
#include "th04/common.h"
#include "th04/score.h"
#include "th04/end/end.h"
#include "th05/playchar.h"
#include "th05/resident.hpp"
#include "th04/formats/cfg.hpp"
extern "C" {
#include "th04/snd/snd.h"
#include "th05/op/op.hpp"
}
#include "th05/resident.hpp"
#include "th05/hardware/input.h"
#include "th04/op/start.hpp"

View File

@ -1 +1,2 @@
#pragma option -zPop_01
#include "th04/op/m_main.cpp"