diff --git a/src/d_loop.h b/src/d_loop.h index f8538f0bb1..c154be3a64 100644 --- a/src/d_loop.h +++ b/src/d_loop.h @@ -20,6 +20,8 @@ #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 @@ -84,5 +86,11 @@ boolean D_NonVanillaRecord(boolean conditional, const char *feature); boolean D_NonVanillaPlayback(boolean conditional, int lumpnum, const char *feature); +void D_ReceiveTic(ticcmd_t *ticcmds, boolean *playeringame); + + +extern fixed_t offsetms; + + #endif diff --git a/src/deh_defs.h b/src/deh_defs.h index 88c1e91f00..58b61e7cc1 100644 --- a/src/deh_defs.h +++ b/src/deh_defs.h @@ -58,6 +58,27 @@ struct deh_section_s 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 */ diff --git a/src/doom/deh_doom.c b/src/doom/deh_doom.c index b13cc03f0f..b7ff04a738 100644 --- a/src/doom/deh_doom.c +++ b/src/doom/deh_doom.c @@ -26,26 +26,6 @@ const char *deh_signatures[] = 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: diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c index bf46b9086a..bccf0d0494 100644 --- a/src/doom/m_menu.c +++ b/src/doom/m_menu.c @@ -1899,7 +1899,6 @@ void M_StartControlPanel (void) static void M_DrawOPLDev(void) { - extern void I_OPL_DevMessages(char *, size_t); char debug[1024]; char *curr, *p; int line; diff --git a/src/heretic/deh_htic.c b/src/heretic/deh_htic.c index c3aca3474c..0fe638b8ee 100644 --- a/src/heretic/deh_htic.c +++ b/src/heretic/deh_htic.c @@ -41,20 +41,8 @@ static const char *hhe_versions[] = 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: diff --git a/src/i_input.h b/src/i_input.h index 8e3b2f1fa4..0dda76d073 100644 --- 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; @@ -39,4 +42,8 @@ void I_StartTextInput(int x1, int y1, int x2, int y2); // (if one is used). void I_StopTextInput(void); +void I_HandleKeyboardEvent(SDL_Event *sdlevent); +void I_HandleMouseEvent(SDL_Event *sdlevent); + + #endif diff --git a/src/i_sound.h b/src/i_sound.h index b8aaf591c8..7a416231ce 100644 --- a/src/i_sound.h +++ b/src/i_sound.h @@ -248,6 +248,8 @@ typedef enum { } 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; diff --git a/src/i_video.c b/src/i_video.c index f1c67e6700..581b018197 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -415,8 +415,6 @@ static void I_ToggleFullScreen(void) void I_GetEvent(void) { - extern void I_HandleKeyboardEvent(SDL_Event *sdlevent); - extern void I_HandleMouseEvent(SDL_Event *sdlevent); SDL_Event sdlevent; SDL_PumpEvents(); diff --git a/src/i_video.h b/src/i_video.h index 99375ef204..83ab96d5b4 100644 --- a/src/i_video.h +++ b/src/i_video.h @@ -95,10 +95,15 @@ extern int integer_scaling; 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 diff --git a/src/net_client.c b/src/net_client.c index 3799b0e13e..19b720fa6a 100644 --- 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 @@ typedef struct net_ticdiff_t cmd; } net_server_send_t; -extern fixed_t offsetms; static net_connection_t client_connection; static net_clientstate_t client_state; diff --git a/src/strife/deh_strife.c b/src/strife/deh_strife.c index 231045b194..76cb496c16 100644 --- a/src/strife/deh_strife.c +++ b/src/strife/deh_strife.c @@ -26,24 +26,6 @@ const char *deh_signatures[] = 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: diff --git a/src/v_video.c b/src/v_video.c index 060f7e16f9..c35f259f40 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -841,7 +841,6 @@ void V_ScreenShot(const char *format) // find a file name to save it to #ifdef HAVE_LIBPNG - extern int png_screenshots; if (png_screenshots) { ext = "png"; @@ -986,7 +985,6 @@ static void DrawNonAcceleratingBox(int speed) 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.