From 5855886a5f12b19b260d1df19c5119faf856c858 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 21 Sep 2019 19:57:41 +0200 Subject: [PATCH] - removed extern "C" from rr and blood folders. --- source/blood/src/_functio.h | 6 ------ source/blood/src/fire.cpp | 2 +- source/blood/src/function.h | 6 ------ source/blood/src/gamedefs.h | 6 ------ source/blood/src/osdcmds.h | 14 -------------- source/rr/src/_functio.h | 6 ------ source/rr/src/actors.h | 8 -------- source/rr/src/common_game.h | 8 -------- source/rr/src/function.h | 6 ------ source/rr/src/game.h | 7 ------- source/rr/src/gamedef.h | 7 ------- source/rr/src/gamedefs.h | 6 ------ source/rr/src/gameexec.cpp | 3 --- source/rr/src/gameexec.h | 8 -------- source/rr/src/global.cpp | 8 -------- source/rr/src/global.h | 8 -------- source/rr/src/grpscan.h | 8 -------- source/rr/src/menus.h | 20 -------------------- source/rr/src/osdcmds.h | 8 -------- source/rr/src/player.h | 12 ------------ source/rr/src/premap.h | 8 -------- source/rr/src/savegame.h | 7 ------- source/rr/src/screentext.h | 7 ------- source/rr/src/sector.h | 8 -------- source/rr/src/sounds.h | 8 -------- 25 files changed, 1 insertion(+), 194 deletions(-) diff --git a/source/blood/src/_functio.h b/source/blood/src/_functio.h index 1bc7d564f..f04ffb143 100644 --- a/source/blood/src/_functio.h +++ b/source/blood/src/_functio.h @@ -33,9 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef function_private_h_ #define function_private_h_ -#ifdef __cplusplus -extern "C" { -#endif // KEEPINSYNC lunatic/con_lang.lua char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = { @@ -369,8 +366,5 @@ static const char * joystickdigitaldefaults[MAXJOYDIGITAL] = }; #endif -#endif -#ifdef __cplusplus -} #endif #endif diff --git a/source/blood/src/fire.cpp b/source/blood/src/fire.cpp index e8782b895..3e07f1b8e 100644 --- a/source/blood/src/fire.cpp +++ b/source/blood/src/fire.cpp @@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. int fireSize = 128; int gDamping = 6; -/*extern "C" */char CoolTable[1024]; +char CoolTable[1024]; void CellularFrame(char *pFrame, int sizeX, int sizeY); diff --git a/source/blood/src/function.h b/source/blood/src/function.h index 37a10d47b..848ca83c8 100644 --- a/source/blood/src/function.h +++ b/source/blood/src/function.h @@ -31,9 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef function_public_h_ #define function_public_h_ -#ifdef __cplusplus -extern "C" { -#endif #define NUMGAMEFUNCTIONS 55 #define MAXGAMEFUNCLEN 32 @@ -100,7 +97,4 @@ enum GameFunction_t gamefunc_RemoteBombs, gamefunc_Show_Console, }; -#ifdef __cplusplus -} -#endif #endif diff --git a/source/blood/src/gamedefs.h b/source/blood/src/gamedefs.h index 440531f17..a2b488eab 100644 --- a/source/blood/src/gamedefs.h +++ b/source/blood/src/gamedefs.h @@ -31,9 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef gamedefs_public_h_ #define gamedefs_public_h_ -#ifdef __cplusplus -extern "C" { -#endif // config file name #define SETUPFILENAME APPBASENAME ".cfg" @@ -65,8 +62,5 @@ extern "C" { #define DEFAULTJOYSTICKANALOGUESATURATE 9500 #endif -#ifdef __cplusplus -} -#endif #endif diff --git a/source/blood/src/osdcmds.h b/source/blood/src/osdcmds.h index 14fe89edf..57dacb846 100644 --- a/source/blood/src/osdcmds.h +++ b/source/blood/src/osdcmds.h @@ -22,16 +22,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //------------------------------------------------------------------------- #pragma once -#ifdef __cplusplus -extern "C" { -#endif - -//struct osdcmd_cheatsinfo { -// int32_t cheatnum; // -1 = none, else = see DoCheats() -// int32_t volume,level; -//}; -// -//extern struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat; int32_t registerosdcommands(void); void onvideomodechange(int32_t newmode); @@ -44,7 +34,3 @@ extern const char *const ConsoleButtons[]; extern uint32_t cl_cheatmask; -#ifdef __cplusplus -} -#endif - diff --git a/source/rr/src/_functio.h b/source/rr/src/_functio.h index 76327c449..4bd0b3abf 100644 --- a/source/rr/src/_functio.h +++ b/source/rr/src/_functio.h @@ -32,9 +32,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef function_private_h_ #define function_private_h_ -#ifdef __cplusplus -extern "C" { -#endif // KEEPINSYNC lunatic/con_lang.lua char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = { @@ -389,8 +386,5 @@ static const char * joystickdigitaldefaults[MAXJOYDIGITAL] = }; #endif -#endif -#ifdef __cplusplus -} #endif #endif diff --git a/source/rr/src/actors.h b/source/rr/src/actors.h index 597fc4d72..4bc0be60e 100644 --- a/source/rr/src/actors.h +++ b/source/rr/src/actors.h @@ -25,10 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "player.h" -#ifdef __cplusplus -extern "C" { -#endif - #define MAXSLEEPDIST 16384 #define SLEEPTIME 1536 #define ZOFFSET (1<<8) @@ -302,10 +298,6 @@ EXTERN_INLINE_HEADER int G_CheckForSpaceFloor(int sectnum); EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s); -#ifdef __cplusplus -} -#endif - #if defined actors_c_ || !defined DISABLE_INLINING # if !KRANDDEBUG || (KRANDDEBUG && defined actors_c_) diff --git a/source/rr/src/common_game.h b/source/rr/src/common_game.h index 66d9e26f4..37d166f10 100644 --- a/source/rr/src/common_game.h +++ b/source/rr/src/common_game.h @@ -10,10 +10,6 @@ #include "collections.h" #include "grpscan.h" -#ifdef __cplusplus -extern "C" { -#endif - extern int g_useCwd; #ifndef APPNAME @@ -163,8 +159,4 @@ extern int32_t S_OpenAudio(const char *fn, char searchfirst, uint8_t ismusic); # define S_OpenAudio(fn, searchfirst, ismusic) kopen4loadfrommod(fn, searchfirst) #endif -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/rr/src/function.h b/source/rr/src/function.h index a59fb8298..23c5df991 100644 --- a/source/rr/src/function.h +++ b/source/rr/src/function.h @@ -30,9 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef function_public_h_ #define function_public_h_ -#ifdef __cplusplus -extern "C" { -#endif #define NUMGAMEFUNCTIONS 62 #define MAXGAMEFUNCLEN 32 @@ -106,7 +103,4 @@ enum GameFunction_t gamefunc_Third_Person_View, gamefunc_Toggle_Crouch, // TODO: Implement properly for mp }; -#ifdef __cplusplus -} -#endif #endif diff --git a/source/rr/src/game.h b/source/rr/src/game.h index 109cade56..f014b6e87 100644 --- a/source/rr/src/game.h +++ b/source/rr/src/game.h @@ -35,10 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "net.h" #include "mmulti.h" -#ifdef __cplusplus -extern "C" { -#endif - #ifndef ONLY_USERDEFS // Compile game-side legacy Room over Room code? @@ -575,9 +571,6 @@ EXTERN_INLINE_HEADER void SetIfGreater(int32_t *variable, int32_t potentialValue #endif -#ifdef __cplusplus -} -#endif #ifndef ONLY_USERDEFS diff --git a/source/rr/src/gamedef.h b/source/rr/src/gamedef.h index 8e1b9ab51..618235357 100644 --- a/source/rr/src/gamedef.h +++ b/source/rr/src/gamedef.h @@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "common.h" // tokenlist #include "player.h" // projectile_t -#ifdef __cplusplus -extern "C" { -#endif - enum { LABEL_ANY = -1, @@ -314,8 +310,5 @@ enum ScriptKeywords_t }; // KEEPINSYNC with the keyword list in lunatic/con_lang.lua -#ifdef __cplusplus -} -#endif #endif // gamedef_h_ diff --git a/source/rr/src/gamedefs.h b/source/rr/src/gamedefs.h index 2912c5a67..b36420a20 100644 --- a/source/rr/src/gamedefs.h +++ b/source/rr/src/gamedefs.h @@ -30,9 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef gamedefs_public_h_ #define gamedefs_public_h_ -#ifdef __cplusplus -extern "C" { -#endif // config file name #define SETUPFILENAME APPBASENAME ".cfg" @@ -64,8 +61,5 @@ extern "C" { #define DEFAULTJOYSTICKANALOGUESATURATE 9500 #endif -#ifdef __cplusplus -} -#endif #endif diff --git a/source/rr/src/gameexec.cpp b/source/rr/src/gameexec.cpp index 7fd1a7f39..e78645cd1 100644 --- a/source/rr/src/gameexec.cpp +++ b/source/rr/src/gameexec.cpp @@ -173,9 +173,6 @@ GAMEEXEC_STATIC GAMEEXEC_INLINE void P_ForceAngle(DukePlayer_t *pPlayer) } // wow, this function sucks -#ifdef __cplusplus -extern "C" -#endif int32_t A_Dodge(spritetype * const); int32_t A_Dodge(spritetype * const pSprite) { diff --git a/source/rr/src/gameexec.h b/source/rr/src/gameexec.h index 7efa35290..a906a6183 100644 --- a/source/rr/src/gameexec.h +++ b/source/rr/src/gameexec.h @@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "events_defs.h" -#ifdef __cplusplus -extern "C" { -#endif - extern int32_t ticrandomseed; extern vmstate_t vm; @@ -65,8 +61,4 @@ void G_GetTimeDate(int32_t * pValues); int G_StartTrack(int levelNum); void VM_UpdateAnim(int spriteNum, int32_t *pData); -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/rr/src/global.cpp b/source/rr/src/global.cpp index 7db30c69d..a3eb3b12f 100644 --- a/source/rr/src/global.cpp +++ b/source/rr/src/global.cpp @@ -28,10 +28,6 @@ user_defs ud; const char *s_buildDate = "20120522"; -#ifdef __cplusplus -extern "C" { -#endif - char g_volumeNames[MAXVOLUMES][33] = { "L.A. Meltdown", "Lunar Apocalypse", "Shrapnel City" }; char g_skillNames[MAXSKILLS][33] = { "Piece Of Cake", "Let's Rock", "Come Get Some", "Damn I'm Good" }; char g_gametypeNames[MAXGAMETYPES][33] @@ -127,7 +123,3 @@ char CheatKeys[2] = { sc_D, sc_N }; char g_setupFileName[BMAX_PATH] = SETUPFILENAME; -#ifdef __cplusplus -} -#endif - diff --git a/source/rr/src/global.h b/source/rr/src/global.h index 667a332d6..4f306cd49 100644 --- a/source/rr/src/global.h +++ b/source/rr/src/global.h @@ -57,10 +57,6 @@ G_EXTERN int32_t *curipos[MAXINTERPOLATIONS]; G_EXTERN int32_t bakipos[MAXINTERPOLATIONS]; -#ifdef __cplusplus -extern "C" { -#endif - G_EXTERN int32_t duke3d_globalflags; // KEEPINSYNC astub.c (used values only) @@ -304,10 +300,6 @@ enum EXTERN_INLINE_HEADER void G_UpdateInterpolations(void); EXTERN_INLINE_HEADER void G_RestoreInterpolations(void); -#ifdef __cplusplus -} -#endif - #if defined global_c_ || !defined DISABLE_INLINING EXTERN_INLINE void G_UpdateInterpolations(void) //Stick at beginning of G_DoMoveThings diff --git a/source/rr/src/grpscan.h b/source/rr/src/grpscan.h index 6f1a188b9..3dbaed1cb 100644 --- a/source/rr/src/grpscan.h +++ b/source/rr/src/grpscan.h @@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef grpscan_h_ #define grpscan_h_ -#ifdef __cplusplus -extern "C" { -#endif - #define MAXLISTNAMELEN 32 // List of internally-known GRP files @@ -103,8 +99,4 @@ extern grpfile_t * FindGroup(int32_t crcval); int32_t ScanGroups(void); void FreeGroups(void); -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/rr/src/menus.h b/source/rr/src/menus.h index 22a98c00b..60d56a9da 100644 --- a/source/rr/src/menus.h +++ b/source/rr/src/menus.h @@ -25,16 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "compat.h" -#ifdef __cplusplus -extern "C" { -#endif - -#if defined EDUKE32_TOUCH_DEVICES -# define EDUKE32_SIMPLE_MENU -# define EDUKE32_ANDROID_MENU -#endif - -// #define EDUKE32_SIMPLE_MENU enum MenuIndex_t { MENU_NULL = INT32_MIN, // sentinel for "do nothing" @@ -503,12 +493,6 @@ extern MenuFont_t MF_Redfont, MF_Bluefont, MF_Minifont; #define M_MOUSETIMEOUT 210 extern int32_t m_mouselastactivity; -#if defined EDUKE32_TOUCH_DEVICES -# define MOUSEALPHA 0 -# define CURSORALPHA (255/3) -# define MOUSEACTIVECONDITIONAL(condition) (condition) -# define MOUSEWATCHPOINTCONDITIONAL(condition) (condition) -#else extern int32_t m_mousewake_watchpoint, m_menuchange_watchpoint; // alpha increments of 3 --> 255 / 3 = 85 --> round up to power of 2 --> 128 --> divide by 2 --> 64 alphatabs required // use 16 anyway :P @@ -519,10 +503,6 @@ extern int32_t m_mousewake_watchpoint, m_menuchange_watchpoint; # define MOUSEACTIVECONDITIONAL(condition) (MOUSEACTIVECONDITION && (condition)) # define MOUSEINACTIVECONDITIONAL(condition) (!MOUSEACTIVECONDITION && (condition)) # define MOUSEWATCHPOINTCONDITIONAL(condition) ((condition) || m_mousewake_watchpoint || m_menuchange_watchpoint == 3) -#endif -#ifdef __cplusplus -} -#endif #endif diff --git a/source/rr/src/osdcmds.h b/source/rr/src/osdcmds.h index 70d3bd9c8..95a40c737 100644 --- a/source/rr/src/osdcmds.h +++ b/source/rr/src/osdcmds.h @@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef osdcmds_h_ #define osdcmds_h_ -#ifdef __cplusplus -extern "C" { -#endif - struct osdcmd_cheatsinfo { int32_t cheatnum; // -1 = none, else = see DoCheats() int32_t volume,level; @@ -49,9 +45,5 @@ extern const char *const ConsoleButtons[]; extern uint32_t cl_cheatmask; -#ifdef __cplusplus -} -#endif - #endif // osdcmds_h_ diff --git a/source/rr/src/player.h b/source/rr/src/player.h index d53111446..5e7053eb0 100644 --- a/source/rr/src/player.h +++ b/source/rr/src/player.h @@ -28,10 +28,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "fix16.h" #include "net.h" -#ifdef __cplusplus -extern "C" { -#endif - extern int32_t g_mostConcurrentPlayers; #define MOVEFIFOSIZ 256 @@ -282,11 +278,7 @@ void P_EndLevel(void); void P_CheckWeaponI(int playerNum); int P_GetHudPal(const DukePlayer_t *pPlayer); int P_GetKneePal(const DukePlayer_t *pPlayer); -#ifdef __cplusplus -} int P_GetKneePal(const DukePlayer_t *pPlayer, int hudPal); -extern "C" { -#endif int P_GetOverheadPal(const DukePlayer_t *pPlayer); void P_MadeNoise(int playerNum); int P_HasKey(int sectNum, int playerNum); @@ -316,8 +308,4 @@ static inline int P_GetP(const void *pSprite) // Get the player index given an APLAYER sprite index. static inline int P_Get(int32_t spriteNum) { return P_GetP((const uspritetype *)&sprite[spriteNum]); } -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/rr/src/premap.h b/source/rr/src/premap.h index 5051bf99e..dd4b2761d 100644 --- a/source/rr/src/premap.h +++ b/source/rr/src/premap.h @@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef premap_h_ #define premap_h_ -#ifdef __cplusplus -extern "C" { -#endif - extern int16_t g_ambientLotag[64]; extern int16_t g_ambientHitag[64]; extern int32_t g_levelTextTime; @@ -53,8 +49,4 @@ extern int32_t fragbarheight(void); void G_SetFog(int fogtype); void G_InitRRRASkies(void); -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/rr/src/savegame.h b/source/rr/src/savegame.h index e0ec42d7d..07b17f4db 100644 --- a/source/rr/src/savegame.h +++ b/source/rr/src/savegame.h @@ -25,9 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "game.h" -#ifdef __cplusplus -extern "C" { -#endif # define SV_MAJOR_VER 1 #define SV_MINOR_VER 7 @@ -151,8 +148,4 @@ enum void G_Util_PtrToIdx(void *ptr, int32_t count, const void *base, int32_t mode); void G_Util_PtrToIdx2(void *ptr, int32_t count, size_t stride, const void *base, int32_t const mode); -#ifdef __cplusplus -} -#endif - #endif diff --git a/source/rr/src/screentext.h b/source/rr/src/screentext.h index bb12bcf61..8023c60f3 100644 --- a/source/rr/src/screentext.h +++ b/source/rr/src/screentext.h @@ -24,10 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "menus.h" -#ifdef __cplusplus -extern "C" { -#endif - #define MAXUSERQUOTES 6 extern int32_t user_quote_time[MAXUSERQUOTES]; @@ -98,6 +94,3 @@ extern void G_AddCoordsFromRotation(vec2_t *coords, const vec2_t *unitDirection, extern vec2_t G_ScreenText(int32_t font, int32_t x, int32_t y, int32_t z, int32_t blockangle, int32_t charangle, const char *str, int32_t shade, int32_t pal, int32_t o, int32_t alpha, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2); extern vec2_t G_ScreenTextShadow(int32_t sx, int32_t sy, int32_t font, int32_t x, int32_t y, int32_t z, int32_t blockangle, int32_t charangle, const char *str, int32_t shade, int32_t pal, int32_t o, int32_t alpha, int32_t xspace, int32_t yline, int32_t xbetween, int32_t ybetween, int32_t f, int32_t x1, int32_t y1, int32_t x2, int32_t y2); -#ifdef __cplusplus -} -#endif diff --git a/source/rr/src/sector.h b/source/rr/src/sector.h index 2de44ee1a..0520f5dfb 100644 --- a/source/rr/src/sector.h +++ b/source/rr/src/sector.h @@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "namesdyn.h" // for G_GetForcefieldPicnum() #include "player.h" // playerspawn_t -#ifdef __cplusplus -extern "C" { -#endif - #define MAXCYCLERS 1024 #define MAXANIMATES 1024 #define MAXANIMWALLS 512 @@ -169,10 +165,6 @@ static inline vec3_t G_GetCameraPosition(int32_t i, int32_t smoothratio) EXTERN_INLINE_HEADER int32_t G_CheckPlayerInSector(int32_t sect); -#ifdef __cplusplus -} -#endif - #if defined sector_c_ || !defined DISABLE_INLINING EXTERN_INLINE int32_t G_CheckPlayerInSector(int32_t sect) diff --git a/source/rr/src/sounds.h b/source/rr/src/sounds.h index 451e80e2e..12b041af5 100644 --- a/source/rr/src/sounds.h +++ b/source/rr/src/sounds.h @@ -31,10 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "sounds_common.h" -#ifdef __cplusplus -extern "C" { -#endif - // KEEPINSYNC lunatic/con_lang.lua #define MAXSOUNDS 4096 #define MAXSOUNDINSTANCES 8 @@ -102,8 +98,4 @@ static inline bool S_IsAmbientSFX(int spriteNum) return (sprite[spriteNum].picnum == MUSICANDSFX && sprite[spriteNum].lotag < 999); } -#ifdef __cplusplus -} -#endif - #endif