From 05c8865528bec9edbc8f2ceb48ca66c3bdd546dc Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 12 May 2020 18:37:15 +0100 Subject: [PATCH 1/4] make savegamename in doomdef.h an extern, put the actual definition in d_main.c (cherry picked from commit 89cd756cd83e4a03a34d1f16da18142d8167d889) --- src/d_main.c | 2 ++ src/doomdef.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/d_main.c b/src/d_main.c index 15116b53..5acfb610 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -143,6 +143,8 @@ boolean advancedemo; INT32 debugload = 0; #endif +char savegamename[256]; + #ifdef _arch_dreamcast char srb2home[256] = "/cd"; char srb2path[256] = "/cd"; diff --git a/src/doomdef.h b/src/doomdef.h index ed41e346..392ba760 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -506,7 +506,7 @@ void CONS_Debug(INT32 debugflags, const char *fmt, ...) FUNCDEBUG; // Things that used to be in dstrings.h #define SAVEGAMENAME "srb2sav" -char savegamename[256]; +extern char savegamename[256]; // m_misc.h #ifdef GETTEXT From f89400c7282854bf89493d7ddd40167869f2878b Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 12 May 2020 18:40:51 +0100 Subject: [PATCH 2/4] turn all non-extern variables in s_sound.h into externs (and put their real definitions in the .c file) (cherry picked from commit dab212dc56936dd92a935d0c81003ff1d35ee2ee) --- src/s_sound.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_sound.h b/src/s_sound.h index 2a904faf..eeb1f0ab 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -236,7 +236,7 @@ void S_StopSoundByNum(sfxenum_t sfxnum); #ifdef MUSICSLOT_COMPATIBILITY // For compatibility with code/scripts relying on older versions // This is a list of all the "special" slot names and their associated numbers -const char *compat_special_music_slots[16]; +extern const char *compat_special_music_slots[16]; #endif #endif From 697c7f859efe0850ac71fa64983da4eac26cec1b Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 12 May 2020 18:42:16 +0100 Subject: [PATCH 3/4] added missing extern keyword for ms_RoomId in mserv.h (the definition is already in the .c file in this case) (cherry picked from commit 064f4bcf349e9600552a0b99bd0fbfb3cbcf0958) --- src/mserv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mserv.h b/src/mserv.h index 09cd4f08..8f8152a7 100644 --- a/src/mserv.h +++ b/src/mserv.h @@ -68,7 +68,7 @@ extern consvar_t cv_masterserver, cv_servername; // < 0 to not connect (usually -1) (offline mode) // == 0 to show all rooms, not a valid hosting room // anything else is whatever room the MS assigns to that number (online mode) -INT16 ms_RoomId; +extern INT16 ms_RoomId; const char *GetMasterServerPort(void); const char *GetMasterServerIP(void); From 6bd6b3f38e81bae3704815febcb086c5d3f0acec Mon Sep 17 00:00:00 2001 From: James R Date: Fri, 15 May 2020 10:00:05 -0700 Subject: [PATCH 4/4] Add missing extern to colortranslations --- src/k_kart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/k_kart.h b/src/k_kart.h index 2ba5d1bd..86ae0fcc 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -11,7 +11,7 @@ #define KART_FULLTURN 800 -UINT8 colortranslations[MAXTRANSLATIONS][16]; +extern UINT8 colortranslations[MAXTRANSLATIONS][16]; extern const char *KartColor_Names[MAXSKINCOLORS]; extern const UINT8 KartColor_Opposite[MAXSKINCOLORS*2]; void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);