1 /* 2 * Portions of this file are copyright Rebirth contributors and licensed as 3 * described in COPYING.txt. 4 * Portions of this file are copyright Parallax Software and licensed 5 * according to the Parallax license below. 6 * See COPYING.txt for license details. 7 8 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX 9 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO 10 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A 11 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS 12 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS 13 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE 14 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE 15 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS 16 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. 17 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. 18 */ 19 20 /* 21 * 22 * prototype definitions for descent.cfg reading/writing 23 * 24 */ 25 26 #pragma once 27 28 #if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II) 29 #include "player-callsign.h" 30 #endif 31 32 #ifdef __cplusplus 33 #include "mission.h" 34 #include "pack.h" 35 #include "ntstring.h" 36 #include <array> 37 38 namespace dcx { 39 40 enum class opengl_texture_filter : uint8_t; 41 42 // play-order definitions for custom music 43 /* These values are written to a file as integers, so they must not be 44 * renumbered. 45 */ 46 enum class LevelMusicPlayOrder : uint8_t 47 { 48 Continuous, 49 Level, 50 Random, 51 }; 52 53 struct CCfg : prohibit_void_ptr<CCfg> 54 { 55 uint16_t ResolutionX; 56 uint16_t ResolutionY; 57 #if DXX_USE_ADLMIDI 58 int ADLMIDI_num_chips = 6; 59 /* See common/include/adlmidi_dynamic.h for the symbolic name and for other 60 * values. 61 */ 62 int ADLMIDI_bank = 31; 63 bool ADLMIDI_enabled; 64 #endif 65 bool VSync; 66 bool Grabinput; 67 bool WindowMode; 68 opengl_texture_filter TexFilt; 69 bool TexAnisotropy; 70 bool Multisample; 71 bool FPSIndicator; 72 uint8_t GammaLevel; 73 LevelMusicPlayOrder CMLevelMusicPlayOrder; 74 std::array<int, 2> CMLevelMusicTrack; 75 ntstring<MISSION_NAME_LEN> LastMission; 76 ntstring<PATH_MAX - 1> CMLevelMusicPath; 77 std::array<ntstring<PATH_MAX - 1>, 5> CMMiscMusic; 78 }; 79 80 extern struct CCfg CGameCfg; 81 } 82 83 #ifdef dsx 84 namespace dsx { 85 struct Cfg : prohibit_void_ptr<Cfg> 86 { 87 int MusicType; 88 int AspectX; 89 int AspectY; 90 uint8_t DigiVolume; 91 uint8_t MusicVolume; 92 bool ReverseStereo; 93 bool OrigTrackOrder; 94 #ifdef DXX_BUILD_DESCENT_II 95 bool MovieSubtitles; 96 int MovieTexFilt; 97 #endif 98 callsign_t LastPlayer; 99 }; 100 extern struct Cfg GameCfg; 101 102 //#ifdef USE_SDLMIXER 103 //#define EXT_MUSIC_ON (GameCfg.SndEnableRedbook || GameCfg.JukeboxOn) 104 //#else 105 //#define EXT_MUSIC_ON (GameCfg.SndEnableRedbook) // JukeboxOn shouldn't do anything if it's not supported 106 //#endif 107 108 extern int ReadConfigFile(void); 109 extern int WriteConfigFile(void); 110 } 111 #endif 112 113 #endif 114