[Maintenance] [th02] Get rid of th02.h

… remove the last of the game-specific header files, …

Part of P0186, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
nmlgc 2022-03-12 23:54:37 +01:00
parent f4a73bba3f
commit 7211d4deeb
15 changed files with 36 additions and 37 deletions

6
th02/common.h Normal file
View File

@ -0,0 +1,6 @@
/* ReC98
* -----
* Common, essential macros for TH02. No types here!
*/
#define SHOTTYPE_COUNT 3

View File

@ -5,9 +5,10 @@
extern "C" {
#include <dos.h>
#include "th02/th02.h"
#include "ReC98.h"
#include "master.hpp"
#include "th01/math/clamp.hpp"
#include "th02/common.h"
#include "th02/resident.hpp"
#include "th02/hardware/frmdelay.h"
#include "th02/hardware/input.hpp"

View File

@ -4,7 +4,7 @@
*/
extern "C" {
#include "th02/th02.h"
#include "ReC98.h"
#include "x86real.h"
#include "master.hpp"
#include "th01/math/polar.hpp"

View File

@ -4,7 +4,7 @@ char music_cmt[MUSIC_CMT_LINE_COUNT][MUSIC_CMT_LINE_LEN];
void pascal near music_cmt_load(int track)
{
int i;
file_ropen(MUSIC_CMT_FILE);
file_ropen(MUSIC_CMT_FN);
file_seek(track * MUSIC_CMT_LEN, SEEK_SET);
file_read(music_cmt, MUSIC_CMT_LEN);
file_close();

View File

@ -1,3 +1,2 @@
; Music Room constants.
MUSIC_CMT_LINE_LEN equ 42
MUSIC_CMT_LINE_COUNT equ 20

View File

@ -5,12 +5,15 @@
extern "C" {
#include <process.h>
#include "th02/th02.h"
#include "ReC98.h"
#include "x86real.h"
#include "th02/resident.hpp"
#include "master.hpp"
#include "libs/kaja/kaja.h"
#include "th01/rank.h"
#include "th01/math/clamp.hpp"
#include "th01/hardware/grppsafx.h"
#include "th02/common.h"
#include "th02/hardware/frmdelay.h"
#include "th02/hardware/grp_rect.h"
#include "th02/hardware/input.hpp"
@ -40,10 +43,9 @@ unsigned char demo_num;
resident_t __seg *resident_sgm;
putfunc_t near *putfunc;
// No, we don't want to put these two into th02.h. Apparently, declaring
// variables with extern before definining them for real within the same
// compilation unit causes Turbo C++ to emit *everything* in a different
// order... really, I couldn't make this up.
// Apparently, declaring variables with `extern` before definining them for
// real within the same compilation unit causes Turbo C++ to emit *everything*
// in a different order... really, I couldn't make this up.
extern char extra_unlocked;
extern unsigned int score_duration;

View File

@ -6,7 +6,7 @@
#pragma codestring "\x00"
extern "C" {
#include "th02/th02.h"
#include "ReC98.h"
#include "x86real.h"
#include "master.hpp"
#include "th02/hardware/frmdelay.h"

View File

@ -7,8 +7,10 @@ extern "C" {
#include <dos.h>
#include <mbctype.h>
#include <mbstring.h>
#include "th02/th02.h"
#include "ReC98.h"
#include "master.hpp"
#include "th01/rank.h"
#include "th02/common.h"
#include "th02/hardware/frmdelay.h"
#include "th02/hardware/input.hpp"
#include "th02/core/globals.hpp"

View File

@ -4,10 +4,12 @@
*/
extern "C" {
#include "th02/th02.h"
#include "ReC98.h"
#include "x86real.h"
#include "master.hpp"
#include "th01/math/clamp.hpp"
#include "th01/hardware/grppsafx.h"
#include "th02/common.h"
#include "th02/resident.hpp"
#include "th02/hardware/frmdelay.h"
#include "th02/hardware/grp_rect.h"

View File

@ -4,16 +4,21 @@
*/
extern "C" {
#include "th02/th02.h"
#include "ReC98.h"
#include "x86real.h"
#include "master.hpp"
#include "libs/kaja/kaja.h"
#include "th01/math/polar.hpp"
#include "th01/hardware/grppsafx.h"
#include "th02/math/vector.hpp"
#include "th02/hardware/frmdelay.h"
#include "th02/hardware/input.hpp"
#include "th02/formats/pi.h"
#include "th02/snd/snd.h"
#include "th02/shiftjis/fns.hpp"
static const int MUSIC_CMT_LINE_LEN = 42;
static const int MUSIC_CMT_LINE_COUNT = 20;
#define TRACK_COUNT sizeof(MUSIC_FILES) / sizeof(MUSIC_FILES[0])
#define SEL_QUIT TRACK_COUNT + 1

View File

@ -1 +1,2 @@
#define PF_FN "“Œ•û••–‚.˜^"
#define MUSIC_CMT_FN "MUSIC.TXT"

View File

@ -1,21 +0,0 @@
/* ReC98
* -----
* Include file for TH02
*/
#include "ReC98.h"
#include "th01/rank.h"
#undef grcg_off
// Hardware
// -------
#include "th01/hardware/grppsafx.h"
// -------
// Music Room
#define MUSIC_CMT_FILE "MUSIC.TXT"
#define MUSIC_CMT_LINE_LEN 42
#define MUSIC_CMT_LINE_COUNT 20
#define SHOTTYPE_COUNT 3

View File

@ -6,8 +6,9 @@
#include <dos.h>
#include <stddef.h>
#include "th02/th02.h"
#include "ReC98.h"
#include "master.hpp"
#include "th01/rank.h"
#include "th02/resident.hpp"
#include "th02/snd/snd.h"
#include "th02/formats/cfg.h"

View File

@ -7,8 +7,9 @@
#include <dos.h>
#include <stddef.h>
#include "th02/th02.h"
#include "ReC98.h"
#include "master.hpp"
#include "th01/rank.h"
#include "th02/formats/scoredat.h"
extern char rank;

View File

@ -4,7 +4,7 @@
*/
#include <dos.h>
#include "th02/th02.h"
#include "ReC98.h"
#include "master.hpp"
#include "th02/formats/scoredat.h"
#include "th02/gaiji/gaiji.h"