void BindDisplayVariables(void) { M_BindIntVariable("aspect_ratio_correct", &aspect_ratio_correct); M_BindIntVariable("integer_scaling", &integer_scaling); M_BindIntVariable("fullscreen", &fullscreen); M_BindIntVariable("fullscreen_width", &fullscreen_width); M_BindIntVariable("fullscreen_height", &fullscreen_height); M_BindIntVariable("window_width", &window_width); M_BindIntVariable("window_height", &window_height); M_BindIntVariable("startup_delay", &startup_delay); M_BindStringVariable("video_driver", &video_driver); M_BindStringVariable("window_position", &window_position); M_BindIntVariable("usegamma", &usegamma); M_BindIntVariable("png_screenshots", &png_screenshots); M_BindIntVariable("vga_porch_flash", &vga_porch_flash); M_BindIntVariable("force_software_renderer", &force_software_renderer); M_BindIntVariable("max_scaling_buffer_pixels", &max_scaling_buffer_pixels); if (gamemission == doom || gamemission == heretic || gamemission == strife) { M_BindIntVariable("show_endoom", &show_endoom); } if (gamemission == doom || gamemission == strife) { M_BindIntVariable("show_diskicon", &show_diskicon); } if (gamemission == heretic || gamemission == hexen || gamemission == strife) { M_BindIntVariable("graphical_startup", &graphical_startup); } }
void BindDisplayVariables(void) { M_BindIntVariable("autoadjust_video_settings", &autoadjust_video_settings); M_BindIntVariable("aspect_ratio_correct", &aspect_ratio_correct); M_BindIntVariable("fullscreen", &fullscreen); M_BindIntVariable("screen_width", &screen_width); M_BindIntVariable("screen_height", &screen_height); M_BindIntVariable("startup_delay", &startup_delay); M_BindStringVariable("video_driver", &video_driver); M_BindStringVariable("window_position", &window_position); M_BindIntVariable("usegamma", &usegamma); M_BindIntVariable("png_screenshots", &png_screenshots); if (gamemission == doom || gamemission == heretic || gamemission == strife) { M_BindIntVariable("show_endoom", &show_endoom); } if (gamemission == doom || gamemission == strife) { M_BindIntVariable("show_diskicon", &show_diskicon); } if (gamemission == heretic || gamemission == hexen || gamemission == strife) { M_BindIntVariable("graphical_startup", &graphical_startup); } }
void I_BindSoundVariables(void) { extern char *snd_dmxoption; extern int use_libsamplerate; extern float libsamplerate_scale; M_BindIntVariable("snd_musicdevice", &snd_musicdevice); M_BindIntVariable("snd_sfxdevice", &snd_sfxdevice); M_BindIntVariable("snd_sbport", &snd_sbport); M_BindIntVariable("snd_sbirq", &snd_sbirq); M_BindIntVariable("snd_sbdma", &snd_sbdma); M_BindIntVariable("snd_mport", &snd_mport); M_BindIntVariable("snd_maxslicetime_ms", &snd_maxslicetime_ms); M_BindStringVariable("snd_musiccmd", &snd_musiccmd); M_BindStringVariable("snd_dmxoption", &snd_dmxoption); M_BindIntVariable("snd_samplerate", &snd_samplerate); M_BindIntVariable("snd_cachesize", &snd_cachesize); M_BindIntVariable("opl_io_port", &opl_io_port); M_BindIntVariable("snd_pitchshift", &snd_pitchshift); M_BindStringVariable("music_pack_path", &music_pack_path); M_BindStringVariable("timidity_cfg_path", &timidity_cfg_path); M_BindStringVariable("gus_patch_path", &gus_patch_path); M_BindIntVariable("gus_ram_kb", &gus_ram_kb); M_BindIntVariable("use_libsamplerate", &use_libsamplerate); M_BindFloatVariable("libsamplerate_scale", &libsamplerate_scale); }
void BindDisplayVariables(void) { M_BindIntVariable("autoadjust_video_settings", &autoadjust_video_settings); M_BindIntVariable("aspect_ratio_correct", &aspect_ratio_correct); M_BindIntVariable("fullscreen", &fullscreen); M_BindIntVariable("screen_width", &screen_width); M_BindIntVariable("screen_height", &screen_height); M_BindIntVariable("screen_bpp", &screen_bpp); M_BindIntVariable("startup_delay", &startup_delay); M_BindStringVariable("video_driver", &video_driver); M_BindStringVariable("window_position", &window_position); M_BindIntVariable("usegamma", &usegamma); M_BindIntVariable("png_screenshots", &png_screenshots); if (gamemission == doom || gamemission == heretic || gamemission == strife) { M_BindIntVariable("show_endoom", &show_endoom); } if (gamemission == heretic || gamemission == hexen || gamemission == strife) { M_BindIntVariable("graphical_startup", &graphical_startup); } // Windows Vista or later? Set screen color depth to // 32 bits per pixel, as 8-bit palettized screen modes // don't work properly in recent versions. #if defined(_WIN32) && !defined(_WIN32_WCE) { OSVERSIONINFOEX version_info; ZeroMemory(&version_info, sizeof(OSVERSIONINFOEX)); version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); GetVersionEx((OSVERSIONINFO *) &version_info); if (version_info.dwPlatformId == VER_PLATFORM_WIN32_NT && version_info.dwMajorVersion >= 6) { screen_bpp = 32; } } #endif // Disable fullscreen by default on OS X, as there is an SDL bug // where some old versions of OS X (<= Snow Leopard) crash. #ifdef __MACOSX__ fullscreen = 0; screen_width = 800; screen_height = 600; #endif }
void D_BindVariables(void) { int i; M_ApplyPlatformDefaults(); I_BindVideoVariables(); I_BindJoystickVariables(); I_BindSoundVariables(); M_BindBaseControls(); M_BindMapControls(); M_BindMenuControls(); M_BindWeaponControls(); M_BindChatControls(MAXPLAYERS); M_BindHereticControls(); M_BindHexenControls(); key_multi_msgplayer[0] = CT_KEY_BLUE; key_multi_msgplayer[1] = CT_KEY_RED; key_multi_msgplayer[2] = CT_KEY_YELLOW; key_multi_msgplayer[3] = CT_KEY_GREEN; key_multi_msgplayer[4] = CT_KEY_PLAYER5; key_multi_msgplayer[5] = CT_KEY_PLAYER6; key_multi_msgplayer[6] = CT_KEY_PLAYER7; key_multi_msgplayer[7] = CT_KEY_PLAYER8; #ifdef FEATURE_MULTIPLAYER NET_BindVariables(); #endif M_BindIntVariable("graphical_startup", &graphical_startup); M_BindIntVariable("mouse_sensitivity", &mouseSensitivity); M_BindIntVariable("sfx_volume", &snd_MaxVolume); M_BindIntVariable("music_volume", &snd_MusicVolume); M_BindIntVariable("messageson", &messageson); M_BindIntVariable("screenblocks", &screenblocks); M_BindIntVariable("snd_channels", &snd_Channels); M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit); M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit); M_BindStringVariable("savedir", &SavePathConfig); // Multiplayer chat macros for (i=0; i<10; ++i) { char buf[12]; M_snprintf(buf, sizeof(buf), "chatmacro%i", i); M_BindStringVariable(buf, &chat_macros[i]); } }
void I_BindVideoVariables(void) { M_BindIntVariable("use_mouse", &usemouse); M_BindIntVariable("autoadjust_video_settings", &autoadjust_video_settings); M_BindIntVariable("fullscreen", &fullscreen); M_BindIntVariable("aspect_ratio_correct", &aspect_ratio_correct); M_BindIntVariable("startup_delay", &startup_delay); M_BindIntVariable("screen_width", &screen_width); M_BindIntVariable("screen_height", &screen_height); M_BindIntVariable("screen_bpp", &screen_bpp); M_BindIntVariable("grabmouse", &grabmouse); M_BindFloatVariable("mouse_acceleration", &mouse_acceleration); M_BindIntVariable("mouse_threshold", &mouse_threshold); M_BindStringVariable("video_driver", &video_driver); M_BindStringVariable("window_position", &window_position); M_BindIntVariable("usegamma", &usegamma); M_BindIntVariable("vanilla_keyboard_mapping", &vanilla_keyboard_mapping); M_BindIntVariable("novert", &novert); M_BindIntVariable("png_screenshots", &png_screenshots); // Windows Vista or later? Set screen color depth to // 32 bits per pixel, as 8-bit palettized screen modes // don't work properly in recent versions. #if defined(_WIN32) && !defined(_WIN32_WCE) { OSVERSIONINFOEX version_info; ZeroMemory(&version_info, sizeof(OSVERSIONINFOEX)); version_info.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); GetVersionEx((OSVERSIONINFO *) &version_info); if (version_info.dwPlatformId == VER_PLATFORM_WIN32_NT && version_info.dwMajorVersion >= 6) { screen_bpp = 32; } } #endif // Disable fullscreen by default on OS X, as there is an SDL bug // where some old versions of OS X (<= Snow Leopard) crash. #ifdef __MACOSX__ fullscreen = 0; screen_width = 800; screen_height = 600; #endif }
void BindMultiplayerVariables(void) { char buf[15]; int i; #ifdef FEATURE_MULTIPLAYER M_BindStringVariable("player_name", &net_player_name); #endif for (i=0; i<10; ++i) { M_snprintf(buf, sizeof(buf), "chatmacro%i", i); M_BindStringVariable(buf, &chat_macros[i]); } switch (gamemission) { case doom: M_BindChatControls(4); key_multi_msgplayer[0] = 'g'; key_multi_msgplayer[1] = 'i'; key_multi_msgplayer[2] = 'b'; key_multi_msgplayer[3] = 'r'; break; case heretic: M_BindChatControls(4); key_multi_msgplayer[0] = 'g'; key_multi_msgplayer[1] = 'y'; key_multi_msgplayer[2] = 'r'; key_multi_msgplayer[3] = 'b'; break; case hexen: M_BindChatControls(8); key_multi_msgplayer[0] = 'b'; key_multi_msgplayer[1] = 'r'; key_multi_msgplayer[2] = 'y'; key_multi_msgplayer[3] = 'g'; key_multi_msgplayer[4] = 'j'; key_multi_msgplayer[5] = 'w'; key_multi_msgplayer[6] = 'h'; key_multi_msgplayer[7] = 'p'; break; default: break; } }
void I_BindSoundVariables(void) { extern char *snd_dmxoption; extern int use_libsamplerate; extern float libsamplerate_scale; M_BindIntVariable("snd_musicdevice", &snd_musicdevice); M_BindIntVariable("snd_sfxdevice", &snd_sfxdevice); M_BindIntVariable("snd_sbport", &snd_sbport); M_BindIntVariable("snd_sbirq", &snd_sbirq); M_BindIntVariable("snd_sbdma", &snd_sbdma); M_BindIntVariable("snd_mport", &snd_mport); M_BindIntVariable("snd_maxslicetime_ms", &snd_maxslicetime_ms); M_BindStringVariable("snd_musiccmd", &snd_musiccmd); M_BindStringVariable("snd_dmxoption", &snd_dmxoption); M_BindIntVariable("snd_samplerate", &snd_samplerate); M_BindIntVariable("snd_cachesize", &snd_cachesize); M_BindIntVariable("opl_io_port", &opl_io_port); M_BindIntVariable("snd_pitchshift", &snd_pitchshift); M_BindStringVariable("timidity_cfg_path", &timidity_cfg_path); M_BindStringVariable("gus_patch_path", &gus_patch_path); M_BindIntVariable("gus_ram_kb", &gus_ram_kb); #ifdef FEATURE_SOUND M_BindIntVariable("use_libsamplerate", &use_libsamplerate); M_BindFloatVariable("libsamplerate_scale", &libsamplerate_scale); #endif // Before SDL_mixer version 1.2.11, MIDI music caused the game // to crash when it looped. If this is an old SDL_mixer version, // disable MIDI. #ifdef __MACOSX__ { const SDL_version *v = Mix_Linked_Version(); if (SDL_VERSIONNUM(v->major, v->minor, v->patch) < SDL_VERSIONNUM(1, 2, 11)) { snd_musicdevice = SNDDEVICE_NONE; } } #endif }
// Bind all variables controlling video options into the configuration // file system. void I_BindVideoVariables(void) { M_BindIntVariable("use_mouse", &usemouse); M_BindIntVariable("fullscreen", &fullscreen); M_BindIntVariable("video_display", &video_display); M_BindIntVariable("aspect_ratio_correct", &aspect_ratio_correct); M_BindIntVariable("integer_scaling", &integer_scaling); M_BindIntVariable("vga_porch_flash", &vga_porch_flash); M_BindIntVariable("startup_delay", &startup_delay); M_BindIntVariable("fullscreen_width", &fullscreen_width); M_BindIntVariable("fullscreen_height", &fullscreen_height); M_BindIntVariable("force_software_renderer", &force_software_renderer); M_BindIntVariable("max_scaling_buffer_pixels", &max_scaling_buffer_pixels); M_BindIntVariable("window_width", &window_width); M_BindIntVariable("window_height", &window_height); M_BindIntVariable("grabmouse", &grabmouse); M_BindStringVariable("video_driver", &video_driver); M_BindStringVariable("window_position", &window_position); M_BindIntVariable("usegamma", &usegamma); M_BindIntVariable("png_screenshots", &png_screenshots); }
void D_BindVariables(void) { int i; M_ApplyPlatformDefaults(); I_BindInputVariables(); I_BindVideoVariables(); I_BindJoystickVariables(); I_BindSoundVariables(); M_BindBaseControls(); M_BindWeaponControls(); M_BindMapControls(); M_BindMenuControls(); M_BindChatControls(MAXPLAYERS); key_multi_msgplayer[0] = HUSTR_KEYGREEN; key_multi_msgplayer[1] = HUSTR_KEYINDIGO; key_multi_msgplayer[2] = HUSTR_KEYBROWN; key_multi_msgplayer[3] = HUSTR_KEYRED; #ifdef FEATURE_MULTIPLAYER NET_BindVariables(); #endif M_BindIntVariable("mouse_sensitivity", &mouseSensitivity); M_BindIntVariable("sfx_volume", &sfxVolume); M_BindIntVariable("music_volume", &musicVolume); M_BindIntVariable("show_messages", &showMessages); M_BindIntVariable("screenblocks", &screenblocks); M_BindIntVariable("detaillevel", &detailLevel); M_BindIntVariable("snd_channels", &snd_channels); M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit); M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit); M_BindIntVariable("show_endoom", &show_endoom); M_BindIntVariable("show_diskicon", &show_diskicon); // Multiplayer chat macros for (i=0; i<10; ++i) { char buf[12]; M_snprintf(buf, sizeof(buf), "chatmacro%i", i); M_BindStringVariable(buf, &chat_macros[i]); } }
void BindSoundVariables(void) { M_BindIntVariable("snd_sfxdevice", &snd_sfxdevice); M_BindIntVariable("snd_musicdevice", &snd_musicdevice); M_BindIntVariable("snd_channels", &numChannels); M_BindIntVariable("snd_samplerate", &snd_samplerate); M_BindIntVariable("sfx_volume", &sfxVolume); M_BindIntVariable("music_volume", &musicVolume); M_BindIntVariable("use_libsamplerate", &use_libsamplerate); M_BindFloatVariable("libsamplerate_scale", &libsamplerate_scale); M_BindIntVariable("gus_ram_kb", &gus_ram_kb); M_BindStringVariable("gus_patch_path", &gus_patch_path); M_BindStringVariable("music_pack_path", &music_pack_path); M_BindStringVariable("timidity_cfg_path", &timidity_cfg_path); M_BindIntVariable("snd_sbport", &snd_sbport); M_BindIntVariable("snd_sbirq", &snd_sbirq); M_BindIntVariable("snd_sbdma", &snd_sbdma); M_BindIntVariable("snd_mport", &snd_mport); M_BindIntVariable("snd_maxslicetime_ms", &snd_maxslicetime_ms); M_BindStringVariable("snd_musiccmd", &snd_musiccmd); M_BindStringVariable("snd_dmxoption", &snd_dmxoption); M_BindIntVariable("snd_cachesize", &snd_cachesize); M_BindIntVariable("opl_io_port", &opl_io_port); M_BindIntVariable("snd_pitchshift", &snd_pitchshift); if (gamemission == strife) { M_BindIntVariable("voice_volume", &voiceVolume); M_BindIntVariable("show_talk", &show_talk); } music_pack_path = M_StringDuplicate(""); timidity_cfg_path = M_StringDuplicate(""); gus_patch_path = M_StringDuplicate(""); // All versions of Heretic and Hexen did pitch-shifting. // Most versions of Doom did not and Strife never did. snd_pitchshift = gamemission == heretic || gamemission == hexen; // Default sound volumes - different games use different values. switch (gamemission) { case doom: default: sfxVolume = 8; musicVolume = 8; break; case heretic: case hexen: sfxVolume = 10; musicVolume = 10; break; case strife: sfxVolume = 8; musicVolume = 13; break; } }
void BindSoundVariables(void) { M_BindIntVariable("snd_sfxdevice", &snd_sfxdevice); M_BindIntVariable("snd_musicdevice", &snd_musicdevice); M_BindIntVariable("snd_channels", &numChannels); M_BindIntVariable("snd_samplerate", &snd_samplerate); M_BindIntVariable("sfx_volume", &sfxVolume); M_BindIntVariable("music_volume", &musicVolume); M_BindIntVariable("use_libsamplerate", &use_libsamplerate); M_BindFloatVariable("libsamplerate_scale", &libsamplerate_scale); M_BindIntVariable("gus_ram_kb", &gus_ram_kb); M_BindStringVariable("gus_patch_path", &gus_patch_path); M_BindStringVariable("timidity_cfg_path", &timidity_cfg_path); M_BindIntVariable("snd_sbport", &snd_sbport); M_BindIntVariable("snd_sbirq", &snd_sbirq); M_BindIntVariable("snd_sbdma", &snd_sbdma); M_BindIntVariable("snd_mport", &snd_mport); M_BindIntVariable("snd_maxslicetime_ms", &snd_maxslicetime_ms); M_BindStringVariable("snd_musiccmd", &snd_musiccmd); M_BindStringVariable("snd_dmxoption", &snd_dmxoption); M_BindIntVariable("snd_cachesize", &snd_cachesize); M_BindIntVariable("opl_io_port", &opl_io_port); M_BindIntVariable("snd_pitchshift", &snd_pitchshift); if (gamemission == strife) { M_BindIntVariable("voice_volume", &voiceVolume); M_BindIntVariable("show_talk", &show_talk); } timidity_cfg_path = M_StringDuplicate(""); gus_patch_path = M_StringDuplicate(""); // All versions of Heretic and Hexen did pitch-shifting. // Most versions of Doom did not and Strife never did. snd_pitchshift = gamemission == heretic || gamemission == hexen; // Default sound volumes - different games use different values. switch (gamemission) { case doom: default: sfxVolume = 8; musicVolume = 8; break; case heretic: case hexen: sfxVolume = 10; musicVolume = 10; break; case strife: sfxVolume = 8; musicVolume = 13; break; } // Before SDL_mixer version 1.2.11, MIDI music caused the game // to crash when it looped. If this is an old SDL_mixer version, // disable MIDI. #ifdef __MACOSX__ { const SDL_version *v = Mix_Linked_Version(); if (SDL_VERSIONNUM(v->major, v->minor, v->patch) < SDL_VERSIONNUM(1, 2, 11)) { snd_musicdevice = SNDDEVICE_NONE; } } #endif }
void NET_BindVariables(void) { M_BindStringVariable("player_name", &net_player_name); }
void D_BindVariables(void) { int i; M_ApplyPlatformDefaults(); I_BindVideoVariables(); I_BindJoystickVariables(); I_BindSoundVariables(); M_BindBaseControls(); M_BindWeaponControls(); M_BindMapControls(); M_BindMenuControls(); M_BindStrifeControls(); // haleyjd 09/01/10: [STRIFE] M_BindChatControls(MAXPLAYERS); // haleyjd 20130915: Strife chat keys key_multi_msgplayer[0] = '1'; key_multi_msgplayer[1] = '2'; key_multi_msgplayer[2] = '3'; key_multi_msgplayer[3] = '4'; key_multi_msgplayer[4] = '5'; key_multi_msgplayer[5] = '6'; key_multi_msgplayer[6] = '7'; key_multi_msgplayer[7] = '8'; #ifdef FEATURE_MULTIPLAYER NET_BindVariables(); #endif // haleyjd 08/29/10: [STRIFE] // * Added voice volume // * Added back flat // * Removed show_messages // * Added show_talk // fraggle 03/06/10: [STRIFE] // * Removed detailLevel // * screenblocks -> screensize // * Added nickname, comport M_BindIntVariable("mouse_sensitivity", &mouseSensitivity); M_BindIntVariable("sfx_volume", &sfxVolume); M_BindIntVariable("music_volume", &musicVolume); M_BindIntVariable("voice_volume", &voiceVolume); M_BindIntVariable("show_talk", &dialogshowtext); M_BindIntVariable("screensize", &screenblocks); M_BindIntVariable("snd_channels", &snd_channels); M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit); M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit); M_BindIntVariable("show_endoom", &show_endoom); M_BindIntVariable("graphical_startup", &graphical_startup); M_BindStringVariable("back_flat", &back_flat); M_BindStringVariable("nickname", &nickname); M_BindIntVariable("comport", &comport); // Multiplayer chat macros for (i=0; i<10; ++i) { char buf[12]; M_snprintf(buf, sizeof(buf), "chatmacro%i", i); M_BindStringVariable(buf, &chat_macros[i]); } }