- removed all extern "C" from EDuke32 folder, plus some other dead code I noticed.

This commit is contained in:
Christoph Oelckers 2019-09-21 19:38:38 +02:00
parent 71b332459b
commit 15f5a35fd8
20 changed files with 1 additions and 224 deletions

View file

@ -32,9 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef function_private_h_ #ifndef function_private_h_
#define function_private_h_ #define function_private_h_
#ifdef __cplusplus
extern "C" {
#endif
// KEEPINSYNC lunatic/con_lang.lua // KEEPINSYNC lunatic/con_lang.lua
char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] = char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] =
{ {
@ -282,65 +280,6 @@ static const char * mousedigitaldefaults[MAXMOUSEDIGITAL] =
{ {
}; };
#if defined GEKKO
static const char * joystickdefaults[MAXJOYBUTTONSANDHATS] =
{
"Open", // A
"Fire", // B
"Run", // 1
"Map", // 2
"Previous_Weapon", // -
"Next_Weapon", // +
"", // Home
"Jump", // Z
"Crouch", // C
"Map", // X
"Run", // Y
"Jump", // L
"Quick_Kick", // R
"Crouch", // ZL
"Fire", // ZR
"Quick_Kick", // D-Pad Up
"Inventory_Right", // D-Pad Right
"Inventory", // D-Pad Down
"Inventory_Left", // D-Pad Left
};
static const char * joystickclickeddefaults[MAXJOYBUTTONSANDHATS] =
{
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"Inventory",
};
static const char * joystickanalogdefaults[MAXJOYAXES] =
{
"analog_strafing",
"analog_moving",
"analog_turning",
"analog_lookingupanddown",
};
static const char * joystickdigitaldefaults[MAXJOYDIGITAL] =
{
};
#endif
#endif
#ifdef __cplusplus
}
#endif #endif
#endif #endif

View file

@ -25,10 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "player.h" #include "player.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAXSLEEPDIST 16384 #define MAXSLEEPDIST 16384
#define SLEEPTIME 1536 #define SLEEPTIME 1536
#define ZOFFSET (1<<8) #define ZOFFSET (1<<8)
@ -487,9 +483,6 @@ EXTERN_INLINE_HEADER int G_CheckForSpaceFloor(int sectnum);
EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s); EXTERN_INLINE_HEADER int A_CheckEnemySprite(void const * s);
#ifdef __cplusplus
}
#endif
#if defined actors_c_ || !defined DISABLE_INLINING #if defined actors_c_ || !defined DISABLE_INLINING

View file

@ -12,10 +12,6 @@
#include "vfs.h" #include "vfs.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int g_useCwd; extern int g_useCwd;
#ifndef APPNAME #ifndef APPNAME
@ -157,8 +153,4 @@ extern buildvfs_kfd S_OpenAudio(const char *fn, char searchfirst, uint8_t ismusi
# define S_OpenAudio(fn, searchfirst, ismusic) kopen4loadfrommod(fn, searchfirst) # define S_OpenAudio(fn, searchfirst, ismusic) kopen4loadfrommod(fn, searchfirst)
#endif #endif
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -30,9 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef function_public_h_ #ifndef function_public_h_
#define function_public_h_ #define function_public_h_
#ifdef __cplusplus
extern "C" {
#endif
#define NUMGAMEFUNCTIONS 63 #define NUMGAMEFUNCTIONS 63
#define MAXGAMEFUNCLEN 32 #define MAXGAMEFUNCLEN 32
@ -107,7 +104,4 @@ enum GameFunction_t
gamefunc_Third_Person_View, gamefunc_Third_Person_View,
gamefunc_Toggle_Crouch, gamefunc_Toggle_Crouch,
}; };
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -35,9 +35,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "mmulti.h" #include "mmulti.h"
#include "network.h" #include "network.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ONLY_USERDEFS #ifndef ONLY_USERDEFS
@ -616,9 +613,6 @@ EXTERN_INLINE_HEADER void SetIfGreater(int32_t *variable, int32_t potentialValue
#endif #endif
#ifdef __cplusplus
}
#endif
#ifndef ONLY_USERDEFS #ifndef ONLY_USERDEFS

View file

@ -31,10 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "common.h" // tokenlist #include "common.h" // tokenlist
#include "player.h" // projectile_t #include "player.h" // projectile_t
#ifdef __cplusplus
extern "C" {
#endif
enum enum
{ {
LABEL_ACTION = 0x01, LABEL_ACTION = 0x01,
@ -1404,8 +1400,4 @@ enum ScriptKeywords_t
#endif #endif
#ifdef __cplusplus
}
#endif
#endif // gamedef_h_ #endif // gamedef_h_

View file

@ -30,9 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef gamedefs_public_h_ #ifndef gamedefs_public_h_
#define gamedefs_public_h_ #define gamedefs_public_h_
#ifdef __cplusplus
extern "C" {
#endif
// config file name // config file name
#define SETUPFILENAME APPBASENAME ".cfg" #define SETUPFILENAME APPBASENAME ".cfg"
@ -64,8 +61,5 @@ extern "C" {
#define DEFAULTJOYSTICKANALOGUESATURATE 9500 #define DEFAULTJOYSTICKANALOGUESATURATE 9500
#endif #endif
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -285,10 +285,6 @@ GAMEEXEC_STATIC GAMEEXEC_INLINE void P_ForceAngle(DukePlayer_t *pPlayer)
#endif #endif
// wow, this function sucks // wow, this function sucks
#ifdef __cplusplus
extern "C"
#endif
bool A_Dodge(spritetype * const);
bool A_Dodge(spritetype * const pSprite) bool A_Dodge(spritetype * const pSprite)
{ {
if (A_CheckEnemySprite(pSprite) && pSprite->extra <= 0) // hack if (A_CheckEnemySprite(pSprite) && pSprite->extra <= 0) // hack

View file

@ -66,10 +66,6 @@ static FORCE_INLINE int32_t VM_OnEventWithReturn(int nEventID, int spriteNum, in
return VM_HaveEvent(nEventID) ? VM_ExecuteEventWithValue(nEventID, spriteNum, playerNum, nReturn) : nReturn; return VM_HaveEvent(nEventID) ? VM_ExecuteEventWithValue(nEventID, spriteNum, playerNum, nReturn) : nReturn;
} }
#ifdef __cplusplus
extern "C" {
#endif
enum vmflags_t enum vmflags_t
{ {
VM_RETURN = 0x00000001, VM_RETURN = 0x00000001,
@ -127,20 +123,8 @@ void VM_DrawTileSmall(int32_t x, int32_t y, int32_t tilenum, int32_t shade, int3
void G_GetTimeDate(int32_t * pValues); void G_GetTimeDate(int32_t * pValues);
int G_StartTrack(int levelNum); int G_StartTrack(int levelNum);
#ifdef LUNATIC
void G_ShowView(vec3_t vec, fix16_t a, fix16_t horiz, int sect,
int ix1, int iy1, int ix2, int iy2, bool unbiasedp);
void P_AddWeaponMaybeSwitchI(int32_t snum, int32_t weap);
void VM_FallSprite(int32_t i);
int32_t VM_ResetPlayer2(int32_t snum, int32_t flags);
int32_t VM_CheckSquished2(int32_t i, int32_t snum);
#endif
void VM_UpdateAnim(int const spriteNum, int32_t * const pData); void VM_UpdateAnim(int const spriteNum, int32_t * const pData);
void VM_GetZRange(int const spriteNum, int32_t * const ceilhit, int32_t * const florhit, int const wallDist); void VM_GetZRange(int const spriteNum, int32_t * const ceilhit, int32_t * const florhit, int const wallDist);
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -28,9 +28,6 @@ user_defs ud;
const char *s_buildDate = "20120522"; const char *s_buildDate = "20120522";
#ifdef __cplusplus
extern "C" {
#endif
#ifndef EDUKE32_STANDALONE #ifndef EDUKE32_STANDALONE
char g_volumeNames[MAXVOLUMES][33] = { "L.A. Meltdown", "Lunar Apocalypse", "Shrapnel City" }; char g_volumeNames[MAXVOLUMES][33] = { "L.A. Meltdown", "Lunar Apocalypse", "Shrapnel City" };
@ -134,7 +131,3 @@ char CheatKeys[2] = { sc_D, sc_N };
char g_setupFileName[BMAX_PATH] = SETUPFILENAME; char g_setupFileName[BMAX_PATH] = SETUPFILENAME;
#ifdef __cplusplus
}
#endif

View file

@ -51,10 +51,6 @@ G_EXTERN int32_t *curipos[MAXINTERPOLATIONS];
G_EXTERN int32_t bakipos[MAXINTERPOLATIONS]; G_EXTERN int32_t bakipos[MAXINTERPOLATIONS];
#ifdef __cplusplus
extern "C" {
#endif
G_EXTERN int32_t duke3d_globalflags; G_EXTERN int32_t duke3d_globalflags;
// KEEPINSYNC astub.c (used values only) // KEEPINSYNC astub.c (used values only)
@ -206,10 +202,6 @@ enum
EXTERN_INLINE_HEADER void G_UpdateInterpolations(void); EXTERN_INLINE_HEADER void G_UpdateInterpolations(void);
EXTERN_INLINE_HEADER void G_RestoreInterpolations(void); EXTERN_INLINE_HEADER void G_RestoreInterpolations(void);
#ifdef __cplusplus
}
#endif
#if defined global_c_ || !defined DISABLE_INLINING #if defined global_c_ || !defined DISABLE_INLINING
EXTERN_INLINE void G_UpdateInterpolations(void) //Stick at beginning of G_DoMoveThings EXTERN_INLINE void G_UpdateInterpolations(void) //Stick at beginning of G_DoMoveThings

View file

@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef grpscan_h_ #ifndef grpscan_h_
#define grpscan_h_ #define grpscan_h_
#ifdef __cplusplus
extern "C" {
#endif
#define MAXLISTNAMELEN 32 #define MAXLISTNAMELEN 32
// List of internally-known GRP files // List of internally-known GRP files
@ -101,8 +97,4 @@ extern grpfile_t * FindGroup(int32_t crcval);
int32_t ScanGroups(void); int32_t ScanGroups(void);
void FreeGroups(void); void FreeGroups(void);
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -25,17 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "compat.h" #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 { enum MenuIndex_t {
MENU_NULL = INT32_MIN, // sentinel for "do nothing" MENU_NULL = INT32_MIN, // sentinel for "do nothing"
MENU_CLOSE = -2, // sentinel for "close the menu"/"no menu" MENU_CLOSE = -2, // sentinel for "close the menu"/"no menu"
@ -527,8 +516,4 @@ extern MenuGameplayStemEntry g_MenuGameplayEntries[MAXMENUGAMEPLAYENTRIES];
extern MenuEntry_t ME_NEWGAMECUSTOMENTRIES[MAXMENUGAMEPLAYENTRIES]; extern MenuEntry_t ME_NEWGAMECUSTOMENTRIES[MAXMENUGAMEPLAYENTRIES];
extern MenuEntry_t ME_NEWGAMECUSTOMSUBENTRIES[MAXMENUGAMEPLAYENTRIES][MAXMENUGAMEPLAYENTRIES]; extern MenuEntry_t ME_NEWGAMECUSTOMSUBENTRIES[MAXMENUGAMEPLAYENTRIES][MAXMENUGAMEPLAYENTRIES];
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef osdcmds_h_ #ifndef osdcmds_h_
#define osdcmds_h_ #define osdcmds_h_
#ifdef __cplusplus
extern "C" {
#endif
struct osdcmd_cheatsinfo { struct osdcmd_cheatsinfo {
int32_t cheatnum; // -1 = none, else = see DoCheats() int32_t cheatnum; // -1 = none, else = see DoCheats()
int32_t volume,level; int32_t volume,level;
@ -43,9 +39,5 @@ extern const char *const ConsoleButtons[];
extern uint32_t cl_cheatmask; extern uint32_t cl_cheatmask;
#ifdef __cplusplus
}
#endif
#endif // osdcmds_h_ #endif // osdcmds_h_

View file

@ -26,10 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "build.h" #include "build.h"
#include "inv.h" #include "inv.h"
#ifdef __cplusplus
extern "C" {
#endif
extern int32_t g_mostConcurrentPlayers; extern int32_t g_mostConcurrentPlayers;
#define MOVEFIFOSIZ 2 #define MOVEFIFOSIZ 2
@ -371,11 +367,7 @@ void P_EndLevel(void);
void P_CheckWeaponI(int playerNum); void P_CheckWeaponI(int playerNum);
int P_GetHudPal(const DukePlayer_t *pPlayer); int P_GetHudPal(const DukePlayer_t *pPlayer);
int P_GetKneePal(const DukePlayer_t *pPlayer); int P_GetKneePal(const DukePlayer_t *pPlayer);
#ifdef __cplusplus
}
int P_GetKneePal(const DukePlayer_t *pPlayer, int hudPal); int P_GetKneePal(const DukePlayer_t *pPlayer, int hudPal);
extern "C" {
#endif
int P_GetOverheadPal(const DukePlayer_t *pPlayer); int P_GetOverheadPal(const DukePlayer_t *pPlayer);
int Proj_GetDamage(projectile_t const *pProj); int Proj_GetDamage(projectile_t const *pProj);
@ -415,10 +407,6 @@ static inline int P_GetP(const void *pSprite)
// Get the player index given an APLAYER sprite index. // Get the player index given an APLAYER sprite index.
static inline int P_Get(int32_t spriteNum) { return P_GetP((uspriteptr_t)&sprite[spriteNum]); } static inline int P_Get(int32_t spriteNum) { return P_GetP((uspriteptr_t)&sprite[spriteNum]); }
#ifdef __cplusplus
}
#endif
extern int portableBackupSave(const char *, const char *, int, int); extern int portableBackupSave(const char *, const char *, int, int);
#endif #endif

View file

@ -23,10 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef premap_h_ #ifndef premap_h_
#define premap_h_ #define premap_h_
#ifdef __cplusplus
extern "C" {
#endif
extern int32_t g_levelTextTime; extern int32_t g_levelTextTime;
extern int32_t voting,vote_map,vote_episode; extern int32_t voting,vote_map,vote_episode;
extern palette_t CrosshairColors; extern palette_t CrosshairColors;
@ -49,8 +45,4 @@ void G_ClearFIFO(void);
void G_ResetInterpolations(void); void G_ResetInterpolations(void);
int fragbarheight(void); int fragbarheight(void);
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -27,9 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "vfs.h" #include "vfs.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef LUNATIC #ifdef LUNATIC
# define SV_MAJOR_VER 2 # define SV_MAJOR_VER 2
@ -155,13 +152,4 @@ enum
void G_Util_PtrToIdx(void *ptr, int32_t count, const void *base, int32_t mode); 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 mode); void G_Util_PtrToIdx2(void *ptr, int32_t count, size_t stride, const void *base, int32_t mode);
#ifdef LUNATIC
extern const char *(*El_SerializeGamevars)(int32_t *slenptr, int32_t levelnum);
void El_FreeSaveCode(void);
#endif
#ifdef __cplusplus
}
#endif
#endif #endif

View file

@ -24,10 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "menus.h" #include "menus.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAXUSERQUOTES 6 #define MAXUSERQUOTES 6
extern int32_t user_quote_time[MAXUSERQUOTES]; extern int32_t user_quote_time[MAXUSERQUOTES];
@ -97,6 +93,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_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); 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

View file

@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "namesdyn.h" // for G_GetForcefieldPicnum() #include "namesdyn.h" // for G_GetForcefieldPicnum()
#include "player.h" // playerspawn_t #include "player.h" // playerspawn_t
#ifdef __cplusplus
extern "C" {
#endif
#define MAXCYCLERS 1024 #define MAXCYCLERS 1024
#define MAXANIMATES 1024 #define MAXANIMATES 1024
#define MAXANIMWALLS 512 #define MAXANIMWALLS 512
@ -172,10 +168,6 @@ static inline vec3_t G_GetCameraPosition(int32_t const i, int32_t const smoothra
EXTERN_INLINE_HEADER int32_t G_CheckPlayerInSector(int32_t const sect); EXTERN_INLINE_HEADER int32_t G_CheckPlayerInSector(int32_t const sect);
#ifdef __cplusplus
}
#endif
#if defined sector_c_ || !defined DISABLE_INLINING #if defined sector_c_ || !defined DISABLE_INLINING
EXTERN_INLINE int32_t G_CheckPlayerInSector(int32_t const sect) EXTERN_INLINE int32_t G_CheckPlayerInSector(int32_t const sect)

View file

@ -31,10 +31,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sounds_common.h" #include "sounds_common.h"
#ifdef __cplusplus
extern "C" {
#endif
// KEEPINSYNC lunatic/con_lang.lua // KEEPINSYNC lunatic/con_lang.lua
#define MAXSOUNDS 4096 #define MAXSOUNDS 4096
#define MAXSOUNDINSTANCES 8 #define MAXSOUNDINSTANCES 8
@ -101,8 +97,4 @@ static inline bool S_IsAmbientSFX(int spriteNum)
return (sprite[spriteNum].picnum == MUSICANDSFX && sprite[spriteNum].lotag < 999); return (sprite[spriteNum].picnum == MUSICANDSFX && sprite[spriteNum].lotag < 999);
} }
#ifdef __cplusplus
}
#endif
#endif #endif