ref: 847056af1d9a903a66d361ca6fcbd8004c9c2466
parent: bbc6c36a2707dc1c8515eb721ee1f7f95992c0b9
parent: 222ba923d08f4990dbfd6b24551fcaf11c11f5b6
author: Turo Lamminen <turol@users.noreply.github.com>
date: Mon Oct 3 08:33:21 EDT 2022
Merge pull request #1513 from turol/extern-setup Clean up extern, more misc bits
--- a/src/i_sound.c
+++ b/src/i_sound.c
@@ -66,29 +66,6 @@
// depending on whether the current track is substituted.
static music_module_t *active_music_module;
-// Sound modules
-
-extern void I_InitTimidityConfig(void);
-extern sound_module_t sound_sdl_module;
-extern sound_module_t sound_pcsound_module;
-extern music_module_t music_sdl_module;
-extern music_module_t music_opl_module;
-extern music_module_t music_pack_module;
-
-// For OPL module:
-
-extern opl_driver_ver_t opl_drv_ver;
-extern int opl_io_port;
-
-// For native music module:
-
-extern char *music_pack_path;
-extern char *fluidsynth_sf_path;
-extern char *timidity_cfg_path;
-#ifdef _WIN32
-extern int winmm_reverb_level;
-extern int winmm_chorus_level;
-#endif
// DOS-specific options: These are unused but should be maintained
// so that the config file can be shared between chocolate
--- a/src/i_sound.h
+++ b/src/i_sound.h
@@ -250,6 +250,29 @@
void I_SetOPLDriverVer(opl_driver_ver_t ver);
void I_OPL_DevMessages(char *, size_t);
+// Sound modules
+
+void I_InitTimidityConfig(void);
+extern sound_module_t sound_sdl_module;
+extern sound_module_t sound_pcsound_module;
+extern music_module_t music_sdl_module;
+extern music_module_t music_opl_module;
+extern music_module_t music_pack_module;
+
+// For OPL module:
+
+extern int opl_io_port;
+
+// For native music module:
+
+extern char *music_pack_path;
+extern char *fluidsynth_sf_path;
+extern char *timidity_cfg_path;
+#ifdef _WIN32
+extern int winmm_reverb_level;
+extern int winmm_chorus_level;
+#endif
+
#ifdef _WIN32
extern char *winmm_midi_device;
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -30,7 +30,6 @@
#define WINDOW_HELP_URL "https://www.chocolate-doom.org/setup-display"
-extern void RestartTextscreen(void);
typedef struct
{
--- a/src/setup/joystick.h
+++ b/src/setup/joystick.h
@@ -15,7 +15,13 @@
#ifndef SETUP_JOYSTICK_H
#define SETUP_JOYSTICK_H
+
+#include "i_joystick.h"
+
+
extern int joystick_index;
+extern int joystick_physical_buttons[NUM_VIRTUAL_BUTTONS];
+
void ConfigJoystick(void *widget, void *user_data);
void BindJoystickVariables(void);
--- a/src/setup/mainmenu.c
+++ b/src/setup/mainmenu.c
@@ -274,7 +274,6 @@
static void SetIcon(void)
{
- extern SDL_Window *TXT_SDLWindow;
SDL_Surface *surface;
surface = SDL_CreateRGBSurfaceFrom((void *) setup_icon_data, setup_icon_w,
@@ -320,14 +319,6 @@
SetWindowTitle();
}
-// Restart the textscreen library. Used when the video_driver variable
-// is changed.
-
-void RestartTextscreen(void)
-{
- TXT_Shutdown();
- InitTextscreen();
-}
//
// Initialize and run the textscreen GUI.
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -71,9 +71,9 @@
int use_libsamplerate = 0;
float libsamplerate_scale = 0.65;
-static char *music_pack_path = NULL;
-static char *timidity_cfg_path = NULL;
-static char *fluidsynth_sf_path = NULL;
+char *music_pack_path = NULL;
+char *timidity_cfg_path = NULL;
+char *fluidsynth_sf_path = NULL;
static char *gus_patch_path = NULL;
static int gus_ram_kb = 1024;
#ifdef _WIN32
--- a/src/setup/txt_joybinput.c
+++ b/src/setup/txt_joybinput.c
@@ -35,7 +35,6 @@
#define JOYSTICK_INPUT_WIDTH 10
-extern int joystick_physical_buttons[NUM_VIRTUAL_BUTTONS];
// Joystick button variables.
// The ordering of this array is important. We will always try to map
--- a/textscreen/txt_sdl.h
+++ b/textscreen/txt_sdl.h
@@ -37,5 +37,9 @@
void TXT_SDL_SetEventCallback(TxtSDLEventCallbackFunc callback, void *user_data);
+
+extern SDL_Window *TXT_SDLWindow;
+
+
#endif /* #ifndef TXT_SDL_H */