ref: bbc6c36a2707dc1c8515eb721ee1f7f95992c0b9
parent: c1eab2431740217d8b43cb4cbb8546579be55e9a
parent: e633e8e5353173534a7177ffa6da68e8a2bb57f0
author: Simon Howard <fraggle@soulsphere.org>
date: Wed Sep 28 07:54:10 EDT 2022
Merge pull request #1512 from turol/extern-common Clean up extern, some common bits
--- a/src/d_loop.h
+++ b/src/d_loop.h
@@ -20,7 +20,9 @@
#define __D_LOOP__
#include "net_defs.h"
+#include "m_fixed.h"
+
// Callback function invoked while waiting for the netgame to start.
// The callback is invoked when new players are ready. The callback
// should return true, or return false to abort startup.
@@ -83,6 +85,12 @@
// Check if it is permitted to play back a demo with a non-vanilla feature.
boolean D_NonVanillaPlayback(boolean conditional, int lumpnum,
const char *feature);
+
+void D_ReceiveTic(ticcmd_t *ticcmds, boolean *playeringame);
+
+
+extern fixed_t offsetms;
+
#endif
--- a/src/deh_defs.h
+++ b/src/deh_defs.h
@@ -58,6 +58,27 @@
extern deh_section_t *deh_section_types[];
extern const char *deh_signatures[];
+// deh_ammo.c:
+extern deh_section_t deh_section_ammo;
+// deh_cheat.c:
+extern deh_section_t deh_section_cheat;
+// deh_frame.c:
+extern deh_section_t deh_section_frame;
+// deh_misc.c:
+extern deh_section_t deh_section_misc;
+// deh_ptr.c:
+extern deh_section_t deh_section_pointer;
+// deh_sound.c
+extern deh_section_t deh_section_sound;
+// deh_text.c:
+extern deh_section_t deh_section_text;
+// deh_thing.c:
+extern deh_section_t deh_section_thing;
+// deh_weapon.c:
+extern deh_section_t deh_section_weapon;
+// deh_bexstr.c:
+extern deh_section_t deh_section_bexstr;
+
#endif /* #ifndef DEH_DEFS_H */
--- a/src/doom/deh_doom.c
+++ b/src/doom/deh_doom.c
@@ -26,26 +26,6 @@
NULL
};
-// deh_ammo.c:
-extern deh_section_t deh_section_ammo;
-// deh_cheat.c:
-extern deh_section_t deh_section_cheat;
-// deh_frame.c:
-extern deh_section_t deh_section_frame;
-// deh_misc.c:
-extern deh_section_t deh_section_misc;
-// deh_ptr.c:
-extern deh_section_t deh_section_pointer;
-// deh_sound.c
-extern deh_section_t deh_section_sound;
-// deh_text.c:
-extern deh_section_t deh_section_text;
-// deh_thing.c:
-extern deh_section_t deh_section_thing;
-// deh_weapon.c:
-extern deh_section_t deh_section_weapon;
-// deh_bexstr.c:
-extern deh_section_t deh_section_bexstr;
//
// List of section types:
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1899,7 +1899,6 @@
static void M_DrawOPLDev(void)
{
- extern void I_OPL_DevMessages(char *, size_t);
char debug[1024];
char *curr, *p;
int line;
--- a/src/heretic/deh_htic.c
+++ b/src/heretic/deh_htic.c
@@ -41,20 +41,8 @@
deh_hhe_version_t deh_hhe_version = deh_hhe_1_0;
-// deh_ammo.c:
-extern deh_section_t deh_section_ammo;
-// deh_frame.c:
-extern deh_section_t deh_section_frame;
-// deh_ptr.c:
-extern deh_section_t deh_section_pointer;
-// deh_sound.c
-extern deh_section_t deh_section_sound;
// deh_htext.c:
extern deh_section_t deh_section_heretic_text;
-// deh_thing.c:
-extern deh_section_t deh_section_thing;
-// deh_weapon.c:
-extern deh_section_t deh_section_weapon;
//
// List of section types:
--- a/src/i_input.h
+++ b/src/i_input.h
@@ -22,6 +22,9 @@
#include "doomtype.h"
+#include "SDL.h"
+
+
#define MAX_MOUSE_BUTTONS 8
extern float mouse_acceleration;
@@ -38,5 +41,9 @@
// I_StopTextInput finishes text input, deactivating the on-screen keyboard
// (if one is used).
void I_StopTextInput(void);
+
+void I_HandleKeyboardEvent(SDL_Event *sdlevent);
+void I_HandleMouseEvent(SDL_Event *sdlevent);
+
#endif
--- a/src/i_sound.h
+++ b/src/i_sound.h
@@ -248,6 +248,8 @@
} opl_driver_ver_t;
void I_SetOPLDriverVer(opl_driver_ver_t ver);
+void I_OPL_DevMessages(char *, size_t);
+
#ifdef _WIN32
extern char *winmm_midi_device;
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -415,8 +415,6 @@
void I_GetEvent(void)
{
- extern void I_HandleKeyboardEvent(SDL_Event *sdlevent);
- extern void I_HandleMouseEvent(SDL_Event *sdlevent);
SDL_Event sdlevent;
SDL_PumpEvents();
--- a/src/i_video.h
+++ b/src/i_video.h
@@ -95,10 +95,15 @@
extern int vga_porch_flash;
extern int force_software_renderer;
+extern int png_screenshots;
+
extern char *window_position;
void I_GetWindowPosition(int *x, int *y, int w, int h);
// Joystic/gamepad hysteresis
extern unsigned int joywait;
+
+extern int usemouse;
+
#endif
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -23,6 +23,7 @@
#include "doomtype.h"
#include "deh_main.h"
#include "deh_str.h"
+#include "d_loop.h"
#include "i_system.h"
#include "i_timer.h"
#include "m_argv.h"
@@ -42,7 +43,6 @@
#include "w_checksum.h"
#include "w_wad.h"
-extern void D_ReceiveTic(ticcmd_t *ticcmds, boolean *playeringame);
typedef enum
{
@@ -99,7 +99,6 @@
net_ticdiff_t cmd;
} net_server_send_t;
-extern fixed_t offsetms;
static net_connection_t client_connection;
static net_clientstate_t client_state;
--- a/src/strife/deh_strife.c
+++ b/src/strife/deh_strife.c
@@ -26,24 +26,6 @@
NULL
};
-// deh_ammo.c:
-extern deh_section_t deh_section_ammo;
-// deh_cheat.c:
-extern deh_section_t deh_section_cheat;
-// deh_frame.c:
-extern deh_section_t deh_section_frame;
-// deh_misc.c:
-extern deh_section_t deh_section_misc;
-// deh_ptr.c:
-extern deh_section_t deh_section_pointer;
-// deh_sound.c
-extern deh_section_t deh_section_sound;
-// deh_text.c:
-extern deh_section_t deh_section_text;
-// deh_thing.c:
-extern deh_section_t deh_section_thing;
-// deh_weapon.c:
-extern deh_section_t deh_section_weapon;
//
// List of section types:
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -841,7 +841,6 @@
// find a file name to save it to
#ifdef HAVE_LIBPNG
- extern int png_screenshots;
if (png_screenshots)
{
ext = "png";
@@ -986,7 +985,6 @@
void V_DrawMouseSpeedBox(int speed)
{
- extern int usemouse;
int bgcolor, bordercolor, black;
// If the mouse is turned off, don't draw the box at all.