From 30968a626cc6c15264a0fd39418def157bf6c064 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Tue, 7 Jan 2020 04:46:58 +0000 Subject: [PATCH] Remove all the C-compatibility stuff --- src/ArmsItem.h | 8 -------- src/Back.h | 8 -------- src/Boss.h | 8 -------- src/Bullet.h | 8 -------- src/Caret.h | 8 -------- src/Dialog.h | 8 -------- src/Draw.h | 8 -------- src/Ending.h | 8 -------- src/Fade.h | 8 -------- src/Flags.h | 8 -------- src/Flash.h | 8 -------- src/Frame.h | 8 -------- src/Game.h | 8 -------- src/Generic.h | 8 -------- src/KeyControl.h | 8 -------- src/Main.h | 8 -------- src/Map.h | 8 -------- src/MapName.h | 8 -------- src/MiniMap.h | 8 -------- src/MyChar.h | 8 -------- src/MycParam.h | 8 -------- src/NpChar.h | 8 -------- src/Organya.h | 8 -------- src/PixTone.h | 8 -------- src/Profile.h | 8 -------- src/SelStage.h | 8 -------- src/Sound.h | 8 -------- src/Stage.h | 8 -------- src/Star.h | 8 -------- src/TextScr.h | 8 -------- 30 files changed, 240 deletions(-) diff --git a/src/ArmsItem.h b/src/ArmsItem.h index 8f777a6a..c98bb2ae 100644 --- a/src/ArmsItem.h +++ b/src/ArmsItem.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - // "Arms" is a synonym of "weapon" here // "Code" means "ID" here // "Num" often means "ammo" here @@ -114,7 +110,3 @@ int RotationArmsRev(void); /// Change the current weapon to be the first one and play the usual rotation animation void ChangeToFirstArms(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Back.h b/src/Back.h index 5c17614f..f10ccb0b 100644 --- a/src/Back.h +++ b/src/Back.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct BACK { BOOL flag; // Basically unused @@ -24,7 +20,3 @@ BOOL InitBack(const char *fName, int type); void ActBack(void); void PutBack(int fx, int fy); void PutFront(int fx, int fy); - -#ifdef __cplusplus -} -#endif diff --git a/src/Boss.h b/src/Boss.h index 8cf99182..ab3e6807 100644 --- a/src/Boss.h +++ b/src/Boss.h @@ -2,10 +2,6 @@ #include "NpChar.h" -#ifdef __cplusplus -extern "C" { -#endif - #define BOSS_MAX 20 extern NPCHAR gBoss[BOSS_MAX]; @@ -18,7 +14,3 @@ void SetBossCharActNo(int a); void HitBossBullet(void); void ActBossChar(void); void HitBossMap(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Bullet.h b/src/Bullet.h index c10e7810..5604d8f3 100644 --- a/src/Bullet.h +++ b/src/Bullet.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct BULLET { int flag; @@ -73,7 +69,3 @@ void PutBullet(int fx, int fy); void SetBullet(int no, int x, int y, int dir); void ActBullet(void); BOOL IsActiveSomeBullet(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Caret.h b/src/Caret.h index c7a33727..ab249e84 100644 --- a/src/Caret.h +++ b/src/Caret.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - struct CARET_TABLE { int view_left; @@ -34,7 +30,3 @@ void InitCaret(void); void ActCaret(void); void PutCaret(int fx, int fy); void SetCaret(int x, int y, int code, int dir); - -#ifdef __cplusplus -} -#endif diff --git a/src/Dialog.h b/src/Dialog.h index 35b1a6ad..6ff69e82 100644 --- a/src/Dialog.h +++ b/src/Dialog.h @@ -2,15 +2,7 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR __stdcall DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR __stdcall DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR __stdcall QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); - -#ifdef __cplusplus -} -#endif diff --git a/src/Draw.h b/src/Draw.h index 04018025..8c4b625d 100644 --- a/src/Draw.h +++ b/src/Draw.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - #ifndef RGB #define RGB(r,g,b) ((r) | ((g) << 8) | ((b) << 16)) #endif @@ -74,7 +70,3 @@ void InitTextObject(const char *font_name); void PutText(int x, int y, const char *text, unsigned long color); void PutText2(int x, int y, const char *text, unsigned long color, SurfaceID surf_no); void EndTextObject(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Ending.h b/src/Ending.h index 9a749e36..54033793 100644 --- a/src/Ending.h +++ b/src/Ending.h @@ -4,10 +4,6 @@ #include "CommonDefines.h" -#ifdef __cplusplus -extern "C" { -#endif - struct CREDIT { long size; @@ -57,7 +53,3 @@ int GetScriptNumber(const char *text); void SetCreditIllust(int a); void CutCreditIllust(void); int Scene_DownIsland(HWND hWnd, int mode); - -#ifdef __cplusplus -} -#endif diff --git a/src/Fade.h b/src/Fade.h index 4613be9d..b1f17366 100644 --- a/src/Fade.h +++ b/src/Fade.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - void InitFade(void); void SetFadeMask(void); void ClearFade(void); @@ -14,7 +10,3 @@ void StartFadeIn(signed char dir); void ProcFade(void); void PutFade(void); BOOL GetFadeActive(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Flags.h b/src/Flags.h index 97aef8a4..15a6ad2f 100644 --- a/src/Flags.h +++ b/src/Flags.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - extern unsigned char gFlagNPC[1000]; extern unsigned char gSkipFlag[8]; @@ -17,7 +13,3 @@ BOOL GetNPCFlag(long a); void SetSkipFlag(long a); void CutSkipFlag(long a); BOOL GetSkipFlag(long a); - -#ifdef __cplusplus -} -#endif diff --git a/src/Flash.h b/src/Flash.h index 9d640a59..bbd99eaf 100644 --- a/src/Flash.h +++ b/src/Flash.h @@ -1,9 +1,5 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - void InitFlash(void); void SetFlash(int x, int y, int mode); void ActFlash_Explosion(int flx, int fly); @@ -11,7 +7,3 @@ void ActFlash_Flash(void); void ActFlash(int flx, int fly); void PutFlash(void); void ResetFlash(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Frame.h b/src/Frame.h index fa599399..95b8e6b5 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -1,9 +1,5 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - typedef struct FRAME { int x; @@ -27,7 +23,3 @@ void SetFrameTargetBoss(int no, int wait); void SetQuake(int time); void SetQuake2(int time); void ResetQuake(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Game.h b/src/Game.h index 86edd98b..224ea03f 100644 --- a/src/Game.h +++ b/src/Game.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - enum GameFlagsValues { // To be continued @@ -37,7 +33,3 @@ int Random(int min, int max); void PutNumber4(int x, int y, int value, BOOL bZero); BOOL Game(HWND hWnd); - -#ifdef __cplusplus -} -#endif diff --git a/src/Generic.h b/src/Generic.h index cb3ec376..9259689e 100644 --- a/src/Generic.h +++ b/src/Generic.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - void GetCompileDate(int *year, int *month, int *day); BOOL GetCompileVersion(int *v1, int *v2, int *v3, int *v4); BOOL OpenVolumeConfiguration(HWND hWnd); @@ -20,7 +16,3 @@ BOOL CenterWindow(HWND hWnd); BOOL LoadWindowRect(HWND hWnd, const char *filename, BOOL unknown); BOOL SaveWindowRect(HWND hWnd, const char *filename); BOOL IsEnableBitmap(const char *path); - -#ifdef __cplusplus -} -#endif diff --git a/src/KeyControl.h b/src/KeyControl.h index 1a6da5c3..9063c82b 100644 --- a/src/KeyControl.h +++ b/src/KeyControl.h @@ -1,9 +1,5 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - enum KeyBind { //The movement keys go in the order of left, right, up and down @@ -57,7 +53,3 @@ extern long gKeyRight; extern long gKeyDown; void GetTrg(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Main.h b/src/Main.h index 5735a749..09808682 100644 --- a/src/Main.h +++ b/src/Main.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - extern char gModulePath[MAX_PATH]; extern char gDataPath[MAX_PATH]; @@ -16,7 +12,3 @@ void PutFramePerSecound(void); unsigned long GetFramePerSecound(void); BOOL SystemTask(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Map.h b/src/Map.h index 44eb9e0b..071999b9 100644 --- a/src/Map.h +++ b/src/Map.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct MAP_DATA { unsigned char *data; @@ -29,7 +25,3 @@ BOOL ChangeMapParts(int x, int y, unsigned char no); void PutStage_Back(int fx, int fy); void PutStage_Front(int fx, int fy); void PutMapDataVector(int fx, int fy); - -#ifdef __cplusplus -} -#endif diff --git a/src/MapName.h b/src/MapName.h index 15c7267a..c48312a8 100644 --- a/src/MapName.h +++ b/src/MapName.h @@ -2,15 +2,7 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - void ReadyMapName(const char *str); void PutMapName(BOOL bMini); void StartMapName(void); void RestoreMapName(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/MiniMap.h b/src/MiniMap.h index a53fa872..add3aee5 100644 --- a/src/MiniMap.h +++ b/src/MiniMap.h @@ -2,17 +2,9 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - extern char gMapping[0x80]; int MiniMapLoop(void); BOOL IsMapping(void); void StartMapping(void); void SetMapping(int a); - -#ifdef __cplusplus -} -#endif diff --git a/src/MyChar.h b/src/MyChar.h index e9e01c8c..07a810eb 100644 --- a/src/MyChar.h +++ b/src/MyChar.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - // TODO - When I add bitmask constants for gMC.flags... // 0x100 is a 'player is underwater' flag @@ -87,7 +83,3 @@ void SetNoise(int no, int freq); void CutNoise(void); void ResetNoise(void); void SleepNoise(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/MycParam.h b/src/MycParam.h index d1256d67..82ab63b2 100644 --- a/src/MycParam.h +++ b/src/MycParam.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct ARMS_LEVEL { int exp[3]; @@ -34,7 +30,3 @@ void PutMyAir(int x, int y); void PutTimeCounter(int x, int y); BOOL SaveTimeCounter(void); int LoadTimeCounter(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/NpChar.h b/src/NpChar.h index 9e03224d..a0781459 100644 --- a/src/NpChar.h +++ b/src/NpChar.h @@ -5,10 +5,6 @@ #include "Draw.h" -#ifdef __cplusplus -extern "C" { -#endif - #define NPC_MAX 0x200 enum NPCCond @@ -144,7 +140,3 @@ void GetNpCharPosition(int *x, int *y, int i); BOOL IsNpCharCode(int code); BOOL GetNpCharAlive(int code_event); int CountAliveNpChar(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Organya.h b/src/Organya.h index d8b820ff..b0e5a792 100644 --- a/src/Organya.h +++ b/src/Organya.h @@ -9,10 +9,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - #define MAXTRACK 16 #define MAXMELODY 8 #define MAXDRAM 8 @@ -31,7 +27,3 @@ void StopOrganyaMusic(void); void SetOrganyaFadeout(void); BOOL StartOrganya(LPDIRECTSOUND lpDS, const char *wave_filename); void EndOrganya(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/PixTone.h b/src/PixTone.h index e8e6c254..45589105 100644 --- a/src/PixTone.h +++ b/src/PixTone.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct PIXTONEPARAMETER2 { int model; @@ -32,7 +28,3 @@ typedef struct PIXTONEPARAMETER void MakeWaveTables(void); BOOL MakePixelWaveData(const PIXTONEPARAMETER *ptp, unsigned char *pData); - -#ifdef __cplusplus -} -#endif diff --git a/src/Profile.h b/src/Profile.h index a2efac5e..1ddab80e 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -6,10 +6,6 @@ #include "SelStage.h" #include "Stage.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct PROFILE { char code[8]; @@ -39,7 +35,3 @@ BOOL IsProfile(void); BOOL SaveProfile(const char *name); BOOL LoadProfile(const char *name); BOOL InitializeGame(HWND hWnd); - -#ifdef __cplusplus -} -#endif diff --git a/src/SelStage.h b/src/SelStage.h index b7c47b53..7f1a49d4 100644 --- a/src/SelStage.h +++ b/src/SelStage.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct PERMIT_STAGE { int index; @@ -20,7 +16,3 @@ BOOL SubPermitStage(int index); void MoveStageSelectCursor(void); void PutStageSelectObject(void); int StageSelectLoop(int *p_event); - -#ifdef __cplusplus -} -#endif diff --git a/src/Sound.h b/src/Sound.h index ef60d65d..46a0e032 100644 --- a/src/Sound.h +++ b/src/Sound.h @@ -11,10 +11,6 @@ #include "PixTone.h" -#ifdef __cplusplus -extern "C" { -#endif - #define SE_MAX 160 // According to the Organya source code release, this is the real name for this constant enum SoundEffectNames @@ -46,7 +42,3 @@ void ChangeSoundFrequency(int no, DWORD rate); void ChangeSoundVolume(int no, long volume); void ChangeSoundPan(int no, long pan); int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no); - -#ifdef __cplusplus -} -#endif diff --git a/src/Stage.h b/src/Stage.h index f5940025..be4f13fd 100644 --- a/src/Stage.h +++ b/src/Stage.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef enum MusicID { MUS_SILENCE = 0x0, @@ -70,7 +66,3 @@ extern MusicID gMusicNo; BOOL TransferStage(int no, int w, int x, int y); void ChangeMusic(MusicID no); void ReCallMusic(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/Star.h b/src/Star.h index 231242eb..672effb0 100644 --- a/src/Star.h +++ b/src/Star.h @@ -1,13 +1,5 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - void InitStar(void); void ActStar(void); void PutStar(int fx, int fy); - -#ifdef __cplusplus -} -#endif diff --git a/src/TextScr.h b/src/TextScr.h index ddfd49ea..9cc49259 100644 --- a/src/TextScr.h +++ b/src/TextScr.h @@ -2,10 +2,6 @@ #include "WindowsWrapper.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct TEXT_SCRIPT { // Path (reload when exit teleporter menu/inventory) @@ -68,7 +64,3 @@ void StopTextScript(void); void PutTextScript(void); int TextScriptProc(void); void RestoreTextScript(void); - -#ifdef __cplusplus -} -#endif