mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th01] Remove `extern "C"` from more areas of code
The .GRC and .GRP functions, to be specific. Part of P0203, funded by [Anonymous] and GhostRiderCog.
This commit is contained in:
parent
901eda4594
commit
001033d15a
|
@ -17,9 +17,9 @@ extern "C" {
|
|||
#include "th01/hardware/grppsafx.h"
|
||||
#include "th01/hardware/palette.h"
|
||||
#include "th01/snd/mdrv2.h"
|
||||
}
|
||||
#include "th01/formats/grp.h"
|
||||
#include "th01/hiscore/scoredat.hpp"
|
||||
}
|
||||
#include "th01/hiscore/regist.hpp"
|
||||
#include "th01/end/end.hpp"
|
||||
#include "th01/end/pic.hpp"
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
#include "platform.h"
|
||||
#include "pc98.h"
|
||||
#include "planar.h"
|
||||
extern "C" {
|
||||
#include "th01/hardware/graph.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
}
|
||||
#include "th01/formats/grc.hpp"
|
||||
|
||||
int grc_load(main_grc_slot_t slot, const char fn[PF_FN_LEN])
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#pragma option -zCPTN_GRP_GRZ
|
||||
|
||||
extern "C" {
|
||||
#include <stdio.h>
|
||||
#include "platform.h"
|
||||
#include "pc98.h"
|
||||
#include "master.hpp"
|
||||
extern "C" {
|
||||
#include "libs/piloadc/piloadc.h"
|
||||
#include "th01/hardware/palette.h"
|
||||
}
|
||||
#include "th01/formats/grp.h"
|
||||
|
||||
// The same size that master.lib uses in graph_pi_load_pack(), with no
|
||||
|
@ -115,5 +116,3 @@ int grp_put_colorkey(const char *fn)
|
|||
flag_grp_colorkey = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#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/formats/grp.h"
|
||||
#include "th01/end/type.hpp"
|
||||
|
||||
#define TYPE_DELAY 3
|
||||
|
@ -26,10 +26,8 @@ static const int TYPE_FX = (COL_TYPE | FX_WEIGHT_NORMAL);
|
|||
|
||||
inline void optimization_barrier() {}
|
||||
|
||||
extern "C" {
|
||||
|
||||
// Special FUUIN.EXE version of frame_delay() that resets [vsync_frame] first.
|
||||
void frame_delay(unsigned int frames)
|
||||
// Special FUUIN.EXE version of frame_delay() that resets [vsync_frame] first.
|
||||
extern "C" void frame_delay(unsigned int frames)
|
||||
{
|
||||
vsync_frame = 0;
|
||||
while(1) {
|
||||
|
@ -102,8 +100,6 @@ void pascal grp_palette_white_in(unsigned int frames)
|
|||
}
|
||||
/// ------------------
|
||||
|
||||
}
|
||||
|
||||
#pragma option -O-
|
||||
|
||||
void pascal graph_type_ank_n(
|
||||
|
|
|
@ -19,8 +19,8 @@ extern "C" {
|
|||
#include "th01/hardware/input.hpp"
|
||||
#include "th01/hardware/palette.h"
|
||||
#include "th01/snd/mdrv2.h"
|
||||
#include "th01/formats/grp.h"
|
||||
}
|
||||
#include "th01/formats/grp.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
#include "th01/main/particle.hpp"
|
||||
#include "th01/main/playfld.hpp"
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
extern "C" {
|
||||
#include "th01/hardware/graph.h"
|
||||
#include "th01/hardware/palette.h"
|
||||
#include "th01/formats/grp.h"
|
||||
}
|
||||
#include "th01/formats/grp.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
#include "th01/formats/ptn.hpp"
|
||||
#include "th01/main/playfld.hpp"
|
||||
|
|
|
@ -14,9 +14,7 @@
|
|||
#define MISSILE_FN boss3_m_ptn
|
||||
extern const char MISSILE_FN[];
|
||||
#include "th01/main/vars.hpp"
|
||||
extern "C" {
|
||||
#include "th01/formats/grp.h"
|
||||
}
|
||||
#include "th01/formats/pf.hpp"
|
||||
#include "th01/formats/ptn.hpp"
|
||||
#include "th01/main/particle.hpp"
|
||||
|
|
|
@ -24,8 +24,8 @@ extern "C" {
|
|||
extern "C" {
|
||||
#include "th01/snd/mdrv2.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
#include "th01/formats/grc.hpp"
|
||||
}
|
||||
#include "th01/formats/grc.hpp"
|
||||
#include "th01/formats/ptn.hpp"
|
||||
#include "th01/main/entity.hpp"
|
||||
#include "th01/main/playfld.hpp"
|
||||
|
|
|
@ -23,7 +23,9 @@ extern "C" {
|
|||
#include "th01/hardware/text.h"
|
||||
extern "C" {
|
||||
#include "th01/snd/mdrv2.h"
|
||||
}
|
||||
#include "th01/formats/grp.h"
|
||||
extern "C" {
|
||||
#include "th01/formats/grz.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
}
|
||||
|
|
|
@ -19,23 +19,23 @@
|
|||
extern "C" {
|
||||
#include "th01/hardware/frmdelay.h"
|
||||
#include "th01/hardware/graph.h"
|
||||
#include "th01/hardware/grcg8x8m.hpp"
|
||||
}
|
||||
#include "th01/hardware/grcg8x8m.hpp"
|
||||
#include "th01/hardware/egc.h"
|
||||
#include "th01/hardware/egcrows.hpp"
|
||||
#include "th01/hardware/grpinv32.hpp"
|
||||
extern "C" {
|
||||
#include "th01/hardware/palette.h"
|
||||
}
|
||||
#include "th01/hardware/egcrows.hpp"
|
||||
#include "th01/hardware/grpinv32.hpp"
|
||||
#include "th01/hardware/pgtrans.hpp"
|
||||
#include "th01/hardware/scrollup.hpp"
|
||||
#include "th01/hardware/input.hpp"
|
||||
extern "C" {
|
||||
#include "th01/snd/mdrv2.h"
|
||||
#include "th01/formats/pf.hpp"
|
||||
}
|
||||
#include "th01/formats/grc.hpp"
|
||||
#include "th01/formats/grp.h"
|
||||
}
|
||||
#include "th01/formats/ptn.hpp"
|
||||
#include "th01/main/playfld.hpp"
|
||||
#include "th01/formats/stagedat.hpp"
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#include "th01/v_colors.hpp"
|
||||
#include "th01/math/polar.hpp"
|
||||
#include "th01/hardware/egc.h"
|
||||
#include "th01/sprites/shape8x8.hpp"
|
||||
#include "th01/main/shape.hpp"
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ extern "C" {
|
|||
#include "th01/hardware/text.h"
|
||||
#include "th01/hardware/tram_x16.hpp"
|
||||
#include "th01/snd/mdrv2.h"
|
||||
}
|
||||
#include "th01/formats/grp.h"
|
||||
extern "C" {
|
||||
#include "th01/formats/pf.hpp"
|
||||
}
|
||||
#include "th01/formats/ptn.hpp"
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
#include "twobyte.h"
|
||||
#include "master.hpp"
|
||||
#include "th01/rank.h"
|
||||
extern "C" {
|
||||
#include "th01/formats/grp.h"
|
||||
extern "C" {
|
||||
#include "th01/hardware/palette.h"
|
||||
#include "th01/hardware/input.hpp"
|
||||
#include "th01/hardware/graph.h"
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
#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"
|
||||
#include "th01/math/polar.hpp"
|
||||
|
||||
#include "th01/main/shape.cpp"
|
||||
|
|
|
@ -166,19 +166,19 @@ sub_B945 proc far
|
|||
call _mdrv2_bgm_load
|
||||
add sp, 4
|
||||
call _mdrv2_bgm_play
|
||||
call grp_palette_settone pascal, 0
|
||||
call @grp_palette_settone$qi pascal, 0
|
||||
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1a_grp ; "ED1A.grp"
|
||||
call @end_pic_show$qi stdcall, 0
|
||||
pop cx
|
||||
call grp_palette_black_in pascal, 6
|
||||
call @grp_palette_black_in$qui pascal, 6
|
||||
call _frame_delay stdcall, 100
|
||||
pop cx
|
||||
call grp_palette_white_out pascal, 5
|
||||
call @grp_palette_white_out$qui pascal, 5
|
||||
call _frame_delay stdcall, 100
|
||||
pop cx
|
||||
call @end_pic_show$qi stdcall, 1
|
||||
pop cx
|
||||
call grp_palette_settone pascal, 100
|
||||
call @grp_palette_settone$qi pascal, 100
|
||||
call _frame_delay stdcall, 13
|
||||
pop cx
|
||||
call @end_pic_show$qi stdcall, 2
|
||||
|
@ -202,12 +202,12 @@ sub_B945 proc far
|
|||
pop cx
|
||||
call _frame_delay stdcall, 100
|
||||
pop cx
|
||||
call grp_palette_black_out pascal, 6
|
||||
call @grp_palette_black_out$qui pascal, 6
|
||||
push 0
|
||||
call _graph_accesspage_func
|
||||
pop cx
|
||||
call _z_graph_clear
|
||||
call grp_palette_settone pascal, 100
|
||||
call @grp_palette_settone$qi pascal, 100
|
||||
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1c_grp ; "ED1C.GRP"
|
||||
xor si, si
|
||||
jmp short loc_BA49
|
||||
|
@ -326,7 +326,7 @@ loc_BB1E:
|
|||
pop cx
|
||||
call @end_pic_show$qi stdcall, 3
|
||||
pop cx
|
||||
call grp_palette_settone pascal, 105
|
||||
call @grp_palette_settone$qi pascal, 105
|
||||
call @end_pics_load_palette_show$qnxc pascal, ds, offset aEd1e_grp ; "ED1E.GRP"
|
||||
call @end_pic_show$qi stdcall, 0
|
||||
pop cx
|
||||
|
@ -338,7 +338,7 @@ loc_BB62:
|
|||
mov ax, si
|
||||
imul ax, 5
|
||||
add ax, 110
|
||||
call grp_palette_settone pascal, ax
|
||||
call @grp_palette_settone$qi pascal, ax
|
||||
call _frame_delay stdcall, 16
|
||||
pop cx
|
||||
inc si
|
||||
|
@ -362,7 +362,7 @@ loc_BB82:
|
|||
mov ax, si
|
||||
imul ax, 5
|
||||
add ax, 130
|
||||
call grp_palette_settone pascal, ax
|
||||
call @grp_palette_settone$qi pascal, ax
|
||||
inc si
|
||||
|
||||
loc_BBB1:
|
||||
|
@ -379,7 +379,7 @@ loc_BBB1:
|
|||
loc_BBC7:
|
||||
call @end_bad$qv
|
||||
call _mdrv2_bgm_fade_out_nonblock
|
||||
call grp_palette_black_out pascal, 10
|
||||
call @grp_palette_black_out$qui pascal, 10
|
||||
call _z_graph_clear
|
||||
call _mdrv2_bgm_stop
|
||||
push ds
|
||||
|
@ -408,11 +408,11 @@ fuuin_04_TEXT segment byte public 'CODE' use16
|
|||
extern @END_PICS_LOAD_PALETTE_SHOW$QNXC:proc
|
||||
extern @end_pic_show$qi:proc
|
||||
extern _frame_delay:proc
|
||||
extern GRP_PALETTE_SETTONE:proc
|
||||
extern GRP_PALETTE_BLACK_OUT:proc
|
||||
extern GRP_PALETTE_BLACK_IN:proc
|
||||
extern GRP_PALETTE_WHITE_OUT:proc
|
||||
extern GRP_PALETTE_WHITE_IN:proc
|
||||
extern @GRP_PALETTE_SETTONE$QI:proc
|
||||
extern @GRP_PALETTE_BLACK_OUT$QUI:proc
|
||||
extern @GRP_PALETTE_BLACK_IN$QUI:proc
|
||||
extern @GRP_PALETTE_WHITE_OUT$QUI:proc
|
||||
extern @GRP_PALETTE_WHITE_IN$QUI:proc
|
||||
fuuin_04_TEXT ends
|
||||
|
||||
; ===========================================================================
|
||||
|
|
12
th01_op.asm
12
th01_op.asm
|
@ -95,10 +95,10 @@ sub_A719 proc far
|
|||
push 1
|
||||
call _graph_accesspage_func
|
||||
pop cx
|
||||
call _grp_put_palette_show c, offset aReiiden2_grp, ds ; "REIIDEN2.grp"
|
||||
call @grp_put_palette_show$qnxc c, offset aReiiden2_grp, ds ; "REIIDEN2.grp"
|
||||
call _z_palette_black
|
||||
call _graph_copy_accessed_page_to_othe
|
||||
call _grp_put c, offset aReiiden3_grp, ds ; "REIIDEN3.grp"
|
||||
call @grp_put$qnxc c, offset aReiiden3_grp, ds ; "REIIDEN3.grp"
|
||||
push 0
|
||||
call _graph_accesspage_func
|
||||
pop cx
|
||||
|
@ -126,7 +126,7 @@ sub_A772 proc far
|
|||
push 0
|
||||
call _graph_accesspage_func
|
||||
pop cx
|
||||
call _grp_put_colorkey c, offset aOp_win_grp, ds ; "op_win.grp"
|
||||
call @grp_put_colorkey$qnxc c, offset aOp_win_grp, ds ; "op_win.grp"
|
||||
call _graph_copy_accessed_page_to_othe
|
||||
pop bp
|
||||
retf
|
||||
|
@ -1394,9 +1394,9 @@ grppffx_TEXT ends
|
|||
|
||||
; Segment type: Pure code
|
||||
PTN_GRP_GRZ segment byte public 'CODE' use16
|
||||
extern _grp_put_palette_show:proc
|
||||
extern _grp_put:proc
|
||||
extern _grp_put_colorkey:proc
|
||||
extern @grp_put_palette_show$qnxc:proc
|
||||
extern @grp_put$qnxc:proc
|
||||
extern @grp_put_colorkey$qnxc:proc
|
||||
PTN_GRP_GRZ ends
|
||||
|
||||
; ===========================================================================
|
||||
|
|
|
@ -129,8 +129,8 @@ public @bomb_kuji_load$qv
|
|||
@bomb_kuji_load$qv proc far
|
||||
push bp
|
||||
mov bp, sp
|
||||
call _grc_load stdcall, GRC_SLOT_BOMB_KUJI_1, offset aKuzi1_grc, ds
|
||||
call _grc_load stdcall, GRC_SLOT_BOMB_KUJI_2, offset aKuzi2_grc, ds
|
||||
call @grc_load$q15main_grc_slot_txnxc stdcall, GRC_SLOT_BOMB_KUJI_1, offset aKuzi1_grc, ds
|
||||
call @grc_load$q15main_grc_slot_txnxc stdcall, GRC_SLOT_BOMB_KUJI_2, offset aKuzi2_grc, ds
|
||||
add sp, 0Ch
|
||||
pop bp
|
||||
retf
|
||||
|
@ -378,7 +378,7 @@ loc_C0D2:
|
|||
mov bx, si
|
||||
add bx, bx
|
||||
push word ptr [bx+3DCDh] ; left
|
||||
call _grc_put_8
|
||||
call @grc_put_8$qii15main_grc_slot_tii
|
||||
add sp, 0Ah
|
||||
inc si
|
||||
mov al, angle_387D9
|
||||
|
@ -3379,9 +3379,7 @@ SHARED ends
|
|||
PTN_GRP_GRZ segment byte public 'CODE' use16
|
||||
extern @ptn_load$q15main_ptn_slot_tnxc:proc
|
||||
extern @ptn_free$q15main_ptn_slot_t:proc
|
||||
extern _grp_palette_load_show_sane:proc
|
||||
extern _grp_palette_load_show:proc
|
||||
extern _grp_put:proc
|
||||
extern @grp_put$qnxc:proc
|
||||
PTN_GRP_GRZ ends
|
||||
|
||||
; ===========================================================================
|
||||
|
@ -4070,7 +4068,7 @@ sub_12F62 proc near
|
|||
mov bp, sp
|
||||
push 1
|
||||
call _graph_accesspage_func
|
||||
call _grp_put stdcall, offset aClear3_grp, ds ; "CLEAR3.grp"
|
||||
call @grp_put$qnxc stdcall, offset aClear3_grp, ds ; "CLEAR3.grp"
|
||||
call @ptn_load$q15main_ptn_slot_tnxc stdcall, PTN_SLOT_NUMB, offset aNumb_ptn, ds ; "numb.ptn"
|
||||
push 0
|
||||
call _graph_accesspage_func
|
||||
|
@ -5146,8 +5144,8 @@ main_22_TEXT ends
|
|||
|
||||
; Segment type: Pure code
|
||||
main_23_TEXT segment byte public 'CODE' use16
|
||||
extern _grc_load:proc
|
||||
extern _grc_put_8:proc
|
||||
extern @grc_load$q15main_grc_slot_txnxc:proc
|
||||
extern @grc_put_8$qii15main_grc_slot_tii:proc
|
||||
extern @shape_ellipse_arc_put$qiiiiiucucuc:proc
|
||||
extern @shape_ellipse_arc_sloppy_unput$qiiiiucucuc:proc
|
||||
extern _graph_r_lineloop_put:proc
|
||||
|
|
Loading…
Reference in New Issue