[Maintenance] Remove `extern "C"` from `x86real.h` and `decomp.hpp`

One of those per delivery now, eh?

Part of P0189, funded by Arandui and Lmocinemod.
This commit is contained in:
nmlgc 2022-04-02 06:19:18 +02:00
parent 22abdd133b
commit a2358bef47
74 changed files with 117 additions and 122 deletions

View File

@ -1,11 +1,11 @@
#include <stdio.h>
#include <stdlib.h>
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
#include "th01/formats/grz.h"
void grcg_setcolor_rmw(int col)

View File

@ -27,8 +27,6 @@
out dx, ax; \
}
} // extern "C" was a mistake
// Should just be unwrapped wherever it appears. Code that directly uses T
// would be much cleaner.
template <class T> union StupidBytewiseWrapperAround {
@ -139,8 +137,6 @@ inline void poked_eax(Decomp_GS *sgm, Decomp_DI *off, uint8_t op) {
#endif
// ------------------------------------
extern "C" {
// 32-bit ASM instructions not supported by Turbo C++ 4.0J's built-in
// assembler. Makes no sense to compile with `#pragma inline` (and thus,
// require a 16-bit TASM) just for those.

View File

@ -1,5 +1,6 @@
#pragma option -O-
extern "C" {
#include "th01/end/pic.hpp"
void pascal end_pics_load_palette_show(const char *fn)
@ -7,6 +8,7 @@ void pascal end_pics_load_palette_show(const char *fn)
graph_accesspage_func(1);
grp_put_palette_show(fn);
}
}
// Avoid symbol duplication...
#define egc_start_copy egc_start_copy_1
@ -19,6 +21,7 @@ static const screen_y_t PIC_TOP = ((RES_Y / 2) - (PIC_H / 2));
static const pixel_t PIC_VRAM_W = (PIC_W / BYTE_DOTS);
extern "C" {
void end_pic_show(int quarter)
{
egc_start_copy();
@ -45,5 +48,6 @@ void end_pic_show(int quarter)
}
egc_off();
}
}
#pragma option -O.

View File

@ -1,6 +1,5 @@
#pragma option -zCPTN_GRP_GRZ
extern "C" {
#include <mem.h>
#include <stddef.h>
#include "platform.h"
@ -8,6 +7,7 @@ extern "C" {
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/graph.h"
#include "th01/formats/grz.h"

View File

@ -5,7 +5,6 @@
#pragma option -O- -1 -Z-
extern "C" {
#include <io.h>
#include <stdio.h>
#include <string.h>
@ -18,6 +17,7 @@ extern "C" {
#include "twobyte.h"
#include "master.hpp"
#include "th01/rank.h"
extern "C" {
#include "th01/hardware/graph.h"
#include "th01/hardware/input.hpp"
#include "th01/hiscore/scoredat.hpp"

View File

@ -5,16 +5,17 @@
#pragma option -1 -Z-
extern "C" {
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th01/formats/grp.h"
#include "th01/hardware/graph.h"
#include "th01/hardware/palette.h"
#include "th01/hardware/vsync.h"
#include "th01/end/type.h"
}
#define TYPE_DELAY 3
#define TYPE_FX (15 | FX_WEIGHT_NORMAL)
@ -25,6 +26,8 @@ extern "C" {
inline void optimization_barrier() {}
extern "C" {
// Special FUUIN.EXE version of frame_delay() that resets [vsync_frame] first.
void frame_delay(unsigned int frames)
{

View File

@ -5,12 +5,12 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/graph.h"
}
#include "th01/hardware/egcrect.cpp"
}

View File

@ -1,5 +1,6 @@
#include "th01/hardware/egcstart.cpp"
extern "C" {
void egc_copy_rect_1_to_0_16(screen_x_t x, vram_y_t y, pixel_t w, pixel_t h)
{
register screen_x_t x_end = x;
@ -23,3 +24,4 @@ void egc_copy_rect_1_to_0_16(screen_x_t x, vram_y_t y, pixel_t w, pixel_t h)
}
egc_off();
}
}

View File

@ -1,7 +1,9 @@
#include "decomp.hpp"
extern "C" {
#include "th01/hardware/egc.h"
}
void pascal egc_start_copy(void)
void egc_start_copy(void)
{
egc_on();
egc_setup_copy();

View File

@ -1,7 +1,6 @@
/// Makai Stage 20 Boss - Sariel
/// ----------------------------
extern "C" {
#include <stddef.h>
#include <stdlib.h>
#include <dos.h>
@ -17,6 +16,7 @@ extern "C" {
#include "th01/math/overlap.hpp"
#include "th01/math/polar.hpp"
#include "th01/math/subpixel.hpp"
extern "C" {
#include "th01/math/vector.hpp"
#include "th01/hardware/frmdelay.h"
#include "th01/hardware/graph.h"

View File

@ -4,6 +4,7 @@
#include "th01/common.h"
#include "th01/resident.hpp"
#include "th01/v_colors.hpp"
extern "C" {
#include "th01/hardware/graph.h"
#include "th01/main/vars.hpp"
#include "th01/formats/ptn.hpp"
@ -502,5 +503,3 @@ void hud_bg_snap_and_put(void)
hud_score_and_cardcombo_render();
fwnum_force_rerender = false;
}
extern "C" {

View File

@ -1,6 +1,6 @@
extern "C" {
#include "master.hpp"
#include "x86real.h"
extern "C" {
#include "th01/math/overlap.hpp"
#include "th01/hardware/egc.h"
}

View File

@ -1,4 +1,3 @@
extern "C" {
#include <stddef.h>
#include <malloc.h>
#include "platform.h"
@ -7,6 +6,7 @@ extern "C" {
#include "planar.h"
#include "master.hpp"
#include "th01/common.h"
extern "C" {
#include "th01/main/playfld.hpp"
#include "th01/formats/ptn.hpp"
#include "th01/formats/pf.hpp"

View File

@ -1,4 +1,3 @@
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
@ -9,6 +8,7 @@ extern "C" {
#include "th01/common.h"
#include "th01/resident.hpp"
#include "th01/v_colors.hpp"
extern "C" {
#include "th01/hardware/egc.h"
#include "th01/hardware/graph.h"
#include "th01/hardware/frmdelay.h"

View File

@ -3,7 +3,6 @@
* 1st part of code segment #1 of TH01's REIIDEN.EXE
*/
extern "C" {
#include <stddef.h>
#include <stdio.h>
#include <string.h>
@ -15,6 +14,7 @@ extern "C" {
#include "master.hpp"
#include "pc98kbd.h"
#include "twobyte.h"
extern "C" {
#include "th01/hardware/frmdelay.h"
#include "th01/hardware/graph.h"
#include "th01/hardware/input.hpp"

View File

@ -5,13 +5,13 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/graph.h"
}
#include "th01/hardware/egcrect.cpp"
#include "th01/formats/ptn_snap.cpp"
}

View File

@ -5,13 +5,13 @@
#pragma option -2 -Z-
extern "C" {
#include <dos.h>
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "decomp.hpp"
#include "master.hpp"
extern "C" {
#include "th01/hardware/egc.h"
#include "th01/hardware/graph.h"

View File

@ -5,7 +5,6 @@
#pragma option -d
extern "C" {
#include <io.h>
#include <stdio.h>
#include <string.h>
@ -17,6 +16,7 @@ extern "C" {
#include "twobyte.h"
#include "master.hpp"
#include "th01/rank.h"
extern "C" {
#include "th01/formats/grp.h"
#include "th01/hardware/palette.h"
#include "th01/hardware/input.hpp"

View File

@ -3,10 +3,10 @@
* Code segment #23 of TH01's REIIDEN.EXE
*/
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
extern "C" {
#include "th01/formats/grc.cpp"
#include "th01/hardware/grcg8x8m.cpp"
#include "th01/hardware/egc.h"

View File

@ -3,13 +3,12 @@
* Code segment #25 of TH01's REIIDEN.EXE
*/
extern "C" {
#include "platform.h"
#include "pc98.h"
#include "planar.h"
extern "C" {
#include "th01/hardware/grppsafx.h"
#include "th01/hardware/grppfnfx.cpp"
#include "th01/main/hud/hud.cpp"
}
#include "th01/main/hud/hud.cpp"

View File

@ -3,7 +3,6 @@
* Code segment #32 of TH01's REIIDEN.EXE
*/
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
@ -11,6 +10,7 @@ extern "C" {
#include "planar.h"
#include "master.hpp"
#include "th01/v_colors.hpp"
extern "C" {
#include "th01/hardware/palette.h"
#include "th01/hardware/graph.h"
#include "th01/snd/mdrv2.h"
@ -19,8 +19,8 @@ extern "C" {
#include "th01/main/debug.hpp"
#include "th01/main/vars.hpp"
#include "th01/main/player/orb.hpp"
#include "th01/main/player/shot.hpp"
}
#include "th01/main/player/shot.hpp"
#include "th01/main/hud/hud.hpp"
#include "th01/main/boss/palette.hpp"

View File

@ -3,7 +3,6 @@
* Code segment #1 of TH01's OP.EXE
*/
extern "C" {
#include <mem.h>
#include <stdio.h>
#include "platform.h"
@ -13,6 +12,7 @@ extern "C" {
#include "pc98kbd.h"
#include "master.hpp"
#include "th01/rank.h"
extern "C" {
#include "th01/hardware/egc.h"
#include "th01/hardware/frmdelay.h"
#include "th01/hardware/graph.h"

View File

@ -5,13 +5,13 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/graph.h"
}
#include "th01/hardware/egcrect.cpp"
#include "th01/formats/ptn_snap.cpp"
}

View File

@ -3,7 +3,6 @@
* ZUN Soft logo used in TH01, TH02 and TH03
*/
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
@ -11,8 +10,6 @@ extern "C" {
#include "master.hpp"
#include "th01/hardware/egc.h"
#include "th01/math/polar.hpp"
#include "th01/math/vector.hpp"
}
#define CIRCLE_COUNT 4
#define STAR_COUNT 50

View File

@ -1,9 +1,9 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/vplanset.h"
#include "th02/shiftjis/fns.hpp"
#include "th02/mem.h"

View File

@ -1,11 +1,11 @@
#pragma option -zCSHARED -3
extern "C" {
#include <mem.h>
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "master.hpp"
extern "C" {
#include "th02/formats/pi.h"
void DEFCONV pi_palette_apply(int slot)

View File

@ -1,11 +1,11 @@
#pragma option -zCSHARED -3
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th02/hardware/grp_rect.h"
void pascal graph_copy_rect_1_to_0_16(

View File

@ -1,6 +1,5 @@
#pragma option -zCSHARED -3
extern "C" {
#include <mbctype.h>
#include <mbstring.h>
#include "platform.h"
@ -8,6 +7,7 @@ extern "C" {
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/grppsafx.h"
#include "th01/hardware/grppsafx.cpp"

View File

@ -1,9 +1,9 @@
#pragma option -WX -zCSHARED -k-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98kbd.h"
extern "C" {
#include "th02/hardware/input.hpp"
inline uint8_t keygroup_sense(uint8_t group) {

View File

@ -3,7 +3,6 @@
* Code segment #5 of TH02's MAINE.EXE
*/
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
@ -11,7 +10,9 @@ extern "C" {
#include "master.hpp"
#include "th01/math/polar.hpp"
#include "th02/math/vector.hpp"
extern "C" {
#include "th02/hardware/frmdelay.h"
}
void pascal near rotrect_draw(int rad, unsigned char angle)
{
@ -75,5 +76,3 @@ void pascal rotrect_animate(char rot_speed, char start_angle)
grcg_off();
palette_white();
}
}

View File

@ -3,7 +3,6 @@
* Code segment #1 of TH02's OP.EXE
*/
extern "C" {
#include <stddef.h>
#include <process.h>
#include "platform.h"
@ -14,6 +13,7 @@ extern "C" {
#include "libs/kaja/kaja.h"
#include "th01/rank.h"
#include "th01/math/clamp.hpp"
extern "C" {
#include "th01/hardware/grppsafx.h"
#include "th02/common.h"
#include "th02/hardware/frmdelay.h"

View File

@ -5,11 +5,11 @@
#pragma codestring "\x00"
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "master.hpp"
extern "C" {
#include "th02/hardware/frmdelay.h"
#include "th02/formats/pi.h"
#include "th02/snd/snd.h"

View File

@ -3,13 +3,13 @@
* Code segment #5 of TH02's OP.EXE
*/
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
#include "th01/math/clamp.hpp"
extern "C" {
#include "th01/hardware/grppsafx.h"
#include "th02/common.h"
#include "th02/resident.hpp"

View File

@ -3,7 +3,6 @@
* Code segment #6 of TH02's OP.EXE
*/
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
@ -12,6 +11,7 @@ extern "C" {
#include "master.hpp"
#include "libs/kaja/kaja.h"
#include "th01/math/polar.hpp"
extern "C" {
#include "th01/hardware/grppsafx.h"
#include "th02/math/vector.hpp"
#include "th02/hardware/frmdelay.h"

View File

@ -1,9 +1,9 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th02/hardware/frmdelay.h"
#include "th02/snd/snd.h"
#include "th02/snd/measure.hpp"

View File

@ -4,10 +4,10 @@
#pragma option -zCSHARED
#endif
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
extern "C" {
#if (GAME >= 4)
#include "th04/snd/snd.h"
#else

View File

@ -1,9 +1,9 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th02/snd/snd.h"
extern char snd_load_fn[SND_FN_LEN];

View File

@ -1,10 +1,10 @@
#pragma option -k-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
#include "th02/snd/se_impl.hpp"
extern "C" {
#if (GAME >= 4)
#include "master.hpp"
#include "th04/snd/snd.h"

View File

@ -604,7 +604,7 @@ loc_98DB:
loc_98DE:
mov si, ax
mov di, 1F54h
call egc_start_copy
call @egc_start_copy$qv
mov [bp+var_2], 0
jmp short loc_9930
; ---------------------------------------------------------------------------
@ -698,7 +698,7 @@ loc_996B:
shl dx, 4
add ax, dx
mov di, ax
call egc_start_copy
call @egc_start_copy$qv
mov [bp+var_2], 0
jmp short loc_99D2
; ---------------------------------------------------------------------------
@ -787,7 +787,7 @@ loc_9A0D:
mov ax, [bp+arg_2]
imul ax, 50h
add si, ax
call egc_start_copy
call @egc_start_copy$qv
mov ax, [bp+arg_2]
mov [bp+var_2], ax
jmp short loc_9A68
@ -2234,7 +2234,7 @@ arg_4 = word ptr 8
mov bp, sp
push [bp+arg_4]
push [bp+arg_0]
call rotrect_animate
call @rotrect_animate$qcc
push 200064h
push [bp+arg_2]
call sub_9942
@ -2957,8 +2957,8 @@ maine_04_TEXT ends
; ===========================================================================
maine_05_TEXT segment byte public 'CODE' use16
extern EGC_START_COPY:proc
extern ROTRECT_ANIMATE:proc
extern @egc_start_copy$qv:proc
extern @ROTRECT_ANIMATE$QCC:proc
maine_05_TEXT ends
.data

View File

@ -1,10 +1,10 @@
#pragma option -zCSHARED -Z
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
extern "C" {
#include "th03/core/initexit.h"
}

View File

@ -1,10 +1,10 @@
#pragma option -3
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
extern "C" {
#include "th01/hardware/vplanset.h"
#include "th03/core/initexit.h"

View File

@ -1,6 +1,5 @@
#pragma option -zCSHARED -3
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "pc98.h"
@ -8,8 +7,6 @@ extern "C" {
#include "decomp.hpp"
#include "master.hpp"
#include "th03/formats/hfliplut.h"
}
#include "th03/formats/mrs.hpp"
#undef grcg_off

View File

@ -1,11 +1,11 @@
#pragma option -zCSHARED -3 -Z
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th03/formats/pi.hpp"
void pascal pi_put_interlace_8(screen_x_t left, vram_y_t top, int slot)

View File

@ -1,11 +1,11 @@
#pragma option -zCSHARED -3
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th03/formats/pi.hpp"
void pascal pi_put_quarter_8(

View File

@ -1,10 +1,10 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th03/hardware/input.h"
#include "th03/snd/snd.h"
#include "th02/snd/measure.hpp"

View File

@ -1,11 +1,11 @@
#pragma option -WX -zCSHARED -k-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "decomp.hpp"
#include "pc98kbd.h"
#include "master.hpp"
extern "C" {
#include "th03/hardware/input.h"
void input_reset_sense_key_held(void)

View File

@ -1,12 +1,12 @@
#pragma option -zPgroup_01
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
#include "th01/rank.h"
extern "C" {
#include "th01/hardware/grppsafx.h"
#include "th02/hardware/frmdelay.h"
#include "th03/common.h"

View File

@ -1,9 +1,9 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th02/hardware/frmdelay.h"
#if (GAME >= 4)
#include "th04/snd/snd.h"

View File

@ -5,7 +5,6 @@
#pragma option -zCSHARED -k-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
@ -13,6 +12,7 @@ extern "C" {
#include "decomp.hpp"
#include "master.hpp"
#include "libs/sprite16/sprite16.h"
extern "C" {
#include "th03/sprite16.hpp"
void pascal sprite16_sprites_commit(void)

View File

@ -1,14 +1,14 @@
#pragma option -zCSHARED_
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
extern "C" {
#include "th04/formats/cdg.h"
#include "th04/formats/cdg_impl.hpp"
}
#include "th04/formats/cdg_impl.hpp"
void pascal cdg_put_noalpha_8(screen_x_t left, vram_y_t top, int slot)
{

View File

@ -1,6 +1,5 @@
#pragma option -zCSHARED_ -k-
extern "C" {
#include <mem.h>
#include <stddef.h>
#include "platform.h"
@ -8,6 +7,7 @@ extern "C" {
#include "planar.h"
#include "decomp.hpp"
#include "master.hpp"
extern "C" {
#include "th04/hardware/bgimage.hpp"
inline void memcpy_movsd(

View File

@ -1,12 +1,12 @@
#pragma option -zCSHARED_
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "decomp.hpp"
#include "master.hpp"
extern "C" {
#include "th01/hardware/egc.h"
#define graph_accesspage_1() \

View File

@ -5,7 +5,6 @@
#pragma option -zCop_01_TEXT
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
@ -13,6 +12,7 @@ extern "C" {
#include "planar.h"
#include "master.hpp"
#include "th01/rank.h"
extern "C" {
#include "th02/hardware/frmdelay.h"
#include "th03/formats/pi.hpp"
#include "th04/common.h"

View File

@ -1,9 +1,9 @@
extern "C" {
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "th01/math/subpixel.hpp"
#include "th04/math/motion.hpp"
extern "C" {
#include "th04/math/vector.hpp"
#include "th04/hardware/grcg.h"
#include "th04/main/scroll.hpp"

View File

@ -1,10 +1,10 @@
#pragma option -k- -G
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "th01/math/subpixel.hpp"
extern "C" {
#include "th04/main/scroll.hpp"
#define roll(y) \

View File

@ -5,6 +5,4 @@
#pragma option -zCmaine_01_TEXT
extern "C" {
#include "th04/end/box.cpp"
}

View File

@ -1,9 +1,9 @@
#pragma option -zCSHARED
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th04/snd/snd.h"
int pascal snd_determine_modes(int req_bgm_mode, int req_se_mode)

View File

@ -1,10 +1,10 @@
#pragma option -zCSHARED -3 -Z-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th04/snd/snd.h"
extern char snd_load_fn[SND_FN_LEN];

View File

@ -932,7 +932,7 @@ sub_A73B endp
maine_01_TEXT ends
maine_01__TEXT segment byte public 'CODE' use16
BOX_1_TO_0_MASKED procdesc pascal near \
@BOX_1_TO_0_MASKED$Q10BOX_MASK_T procdesc pascal near \
mask:word
; =============== S U B R O U T I N E =======================================
@ -951,7 +951,7 @@ sub_A815 proc near
; ---------------------------------------------------------------------------
loc_A827:
call box_1_to_0_masked pascal, si
call @box_1_to_0_masked$q10box_mask_t pascal, si
push word_124C0
call frame_delay
inc si
@ -961,7 +961,7 @@ loc_A835:
jl short loc_A827
loc_A83A:
call box_1_to_0_masked pascal, 4
call @box_1_to_0_masked$q10box_mask_t pascal, 4
call egc_off
pop si
pop bp

View File

@ -1,14 +1,14 @@
#pragma option -zCSHARED_
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
extern "C" {
#include "th04/formats/cdg.h"
#include "th04/formats/cdg_impl.hpp"
}
#include "th04/formats/cdg_impl.hpp"
void pascal cdg_put_nocolors_8(screen_x_t left, vram_y_t top, int slot)
{

View File

@ -1,12 +1,12 @@
#pragma option -k-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "master.hpp"
#include "th04/common.h"
#include "th04/score.h"
#include "th05/resident.hpp"
extern "C" {
#include "th04/formats/cfg.hpp"
resident_t __seg* near cfg_load_resident_ptr(void)

View File

@ -22,10 +22,10 @@ SHARED ends
SHARED_ segment word public 'CODE' use16
assume cs:g_SHARED
_pi_mask_setup_egc_and_advance procdesc near
@pi_mask_setup_egc_and_advance$qv procdesc near
public PI_PUT_MASKED_8_ROWLOOP
pi_put_masked_8_rowloop proc near
public @PI_PUT_MASKED_8_ROWLOOP$QIIIUI
@pi_put_masked_8_rowloop$qiiiui proc near
; Can't use ARG, because the function doesn't `PUSH BP`!
@@stride_packed = word ptr [bp+2]
@@w = word ptr [bp+4]
@ -65,7 +65,7 @@ TEMP_ROW = RES_Y
sub _pi_put_masked_vram_offset, PLANE_SIZE
@@next_row:
call _pi_mask_setup_egc_and_advance
call @pi_mask_setup_egc_and_advance$qv
mov ax, SEG_PLANE_B
mov es, ax
assume es:nothing
@ -93,7 +93,7 @@ TEMP_ROW = RES_Y
dec @@h
jnz short @@put_row
retn 8
pi_put_masked_8_rowloop endp
@pi_put_masked_8_rowloop$qiiiui endp
SHARED_ ends

View File

@ -16,8 +16,8 @@ include th03/arg_bx.inc
SHARED_ segment word public 'CODE' use16
assume cs:SHARED_
public PI_PUT_8_ROWLOOP
pi_put_8_rowloop proc pascal near
public @PI_PUT_8_ROWLOOP$QIIIUI
@pi_put_8_rowloop$qiiiui proc pascal near
; Can't use ARG, because the function doesn't `PUSH BP`!
@@stride_packed = word ptr [bp+2]
@@w = word ptr [bp+4]
@ -50,7 +50,7 @@ pi_put_8_rowloop proc pascal near
dec @@h
jnz short @@put_row
retn 8
pi_put_8_rowloop endp
@pi_put_8_rowloop$qiiiui endp
public PI_PALETTE_APPLY

View File

@ -2,13 +2,14 @@
#pragma option -zCSHARED_
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th05/formats/pi.hpp"
}
#include "th05/formats/pi_impl.hpp"
// Additionally takes:
@ -56,5 +57,3 @@ void pascal pi_put_quarter_masked_8(
}
#pragma codestring "\x90"
}

View File

@ -2,14 +2,15 @@
#pragma option -zCSHARED_
extern "C" {
#include <stddef.h>
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
extern "C" {
#include "th05/formats/pi.hpp"
}
#include "th05/formats/pi_impl.hpp"
extern dots16_t near *pi_mask_ptr;
@ -107,5 +108,3 @@ void pascal pi_put_quarter_8(
pi_put_quarter_impl(slot, quarter, rowloop_func);
#undef rowloop_func
}
}

View File

@ -1,9 +1,9 @@
#pragma option -zCSHARED_
extern "C" {
#include "platform.h"
#include "decomp.hpp"
#include "master.hpp"
extern "C" {
#include "th05/hardware/input.h"
}

View File

@ -5,13 +5,13 @@
#pragma option -zCop_01_TEXT
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
#include "master.hpp"
#include "th01/rank.h"
extern "C" {
#include "th02/hardware/frmdelay.h"
#include "th04/formats/cdg.h"
#include "th04/hardware/bgimage.hpp"

View File

@ -7,11 +7,11 @@
#include "x86real.h"
#include "pc98.h"
#include "planar.h"
extern "C" {
#include "decomp.hpp"
#include "master.hpp"
#include "th01/math/area.hpp"
#include "th01/math/subpixel.hpp"
extern "C" {
#include "th04/hardware/grcg.h"
#include "th04/math/vector.hpp"
#include "th04/math/motion.hpp"

View File

@ -5,7 +5,6 @@
#pragma option -zCmaine_01_TEXT
extern "C" {
#include "th04/end/box.cpp"
/// String-to-color map
@ -29,4 +28,3 @@ extern unsigned char colmap_count;
/// -------------------
extern unsigned char text_col;
}

View File

@ -1,6 +1,5 @@
#pragma option -zCSHARED_ -k-
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "pc98.h"
@ -8,6 +7,7 @@ extern "C" {
#include "decomp.hpp"
#include "master.hpp"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th05/op/piano.h"
#include "th05/sprites/piano_l.hpp"

View File

@ -1,13 +1,13 @@
#pragma option -zCSHARED_
extern "C" {
#include "platform.h"
#include "x86real.h"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th02/hardware/frmdelay.h"
#include "th05/snd/snd.h"
#include "th02/snd/measure.hpp"
}
#include "th02/snd/measure.hpp"
int snd_bgm_measure(void)
{

View File

@ -1,12 +1,12 @@
#pragma option -zCSHARED_ -3
extern "C" {
#include <errno.h>
#include "platform.h"
#include "x86real.h"
#include "decomp.hpp"
#include "master.hpp"
#include "libs/kaja/kaja.h"
extern "C" {
#include "th05/snd/snd.h"
extern char snd_load_fn[SND_FN_LEN];

View File

@ -524,7 +524,7 @@ sub_A826 endp
maine_01_TEXT ends
maine_01__TEXT segment byte public 'CODE' use16
BOX_1_TO_0_MASKED procdesc pascal near \
@BOX_1_TO_0_MASKED$Q10BOX_MASK_T procdesc pascal near \
mask:word
; =============== S U B R O U T I N E =======================================
@ -544,7 +544,7 @@ sub_A8EC proc near
; ---------------------------------------------------------------------------
loc_A904:
call box_1_to_0_masked pascal, si
call @box_1_to_0_masked$q10box_mask_t pascal, si
push word_15008
call frame_delay
inc si
@ -554,7 +554,7 @@ loc_A912:
jl short loc_A904
loc_A917:
call box_1_to_0_masked pascal, 4
call @box_1_to_0_masked$q10box_mask_t pascal, 4
call egc_off
push 1
call frame_delay

View File

@ -79,14 +79,17 @@ void segread(struct SREGS *__segp);
/// ----------
#ifdef __cplusplus
void interrupt (__far * getvect(int __interruptno))(...);
void setvect(int __interruptno, void interrupt (__far *__isr)(...));
extern "C" {
void interrupt (__far * getvect(int __interruptno))(...);
void setvect(int __interruptno, void interrupt (__far *__isr)(...));
int int86(int __intno, union REGS *__inregs, union REGS *__outregs);
}
#else
void interrupt (__far * getvect(int __interruptno))();
void setvect(int __interruptno, void interrupt(__far *__isr)());
void interrupt (__far * getvect(int __interruptno))();
void setvect(int __interruptno, void interrupt(__far *__isr)());
int int86(int __intno, union REGS *__inregs, union REGS *__outregs);
#endif
int int86(int __intno, union REGS *__inregs, union REGS *__outregs);
/// ----------
/// Segmented memory