Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | pmbaty | 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 | // play-order definitions for custom music |
||
| 41 | /* These values are written to a file as integers, so they must not be |
||
| 42 | * renumbered. |
||
| 43 | */ |
||
| 44 | enum class LevelMusicPlayOrder : uint8_t |
||
| 45 | { |
||
| 46 | Continuous, |
||
| 47 | Level, |
||
| 48 | Random, |
||
| 49 | }; |
||
| 50 | |||
| 51 | struct CCfg : prohibit_void_ptr<CCfg> |
||
| 52 | { |
||
| 53 | #if DXX_USE_ADLMIDI |
||
| 54 | int ADLMIDI_num_chips = 6; |
||
| 55 | /* See common/include/adlmidi_dynamic.h for the symbolic name and for other |
||
| 56 | * values. |
||
| 57 | */ |
||
| 58 | int ADLMIDI_bank = 31; |
||
| 59 | bool ADLMIDI_enabled; |
||
| 60 | #endif |
||
| 61 | bool VSync; |
||
| 62 | bool Grabinput; |
||
| 63 | bool WindowMode; |
||
| 64 | int TexFilt; |
||
| 65 | bool TexAnisotropy; |
||
| 66 | bool Multisample; |
||
| 67 | bool FPSIndicator; |
||
| 68 | LevelMusicPlayOrder CMLevelMusicPlayOrder; |
||
| 69 | std::array<int, 2> CMLevelMusicTrack; |
||
| 70 | ntstring<MISSION_NAME_LEN> LastMission; |
||
| 71 | ntstring<PATH_MAX - 1> CMLevelMusicPath; |
||
| 72 | std::array<ntstring<PATH_MAX - 1>, 5> CMMiscMusic; |
||
| 73 | }; |
||
| 74 | |||
| 75 | extern struct CCfg CGameCfg; |
||
| 76 | } |
||
| 77 | |||
| 78 | #ifdef dsx |
||
| 79 | namespace dsx { |
||
| 80 | struct Cfg : prohibit_void_ptr<Cfg> |
||
| 81 | { |
||
| 82 | int MusicType; |
||
| 83 | int GammaLevel; |
||
| 84 | int ResolutionX; |
||
| 85 | int ResolutionY; |
||
| 86 | int AspectX; |
||
| 87 | int AspectY; |
||
| 88 | uint8_t DigiVolume; |
||
| 89 | uint8_t MusicVolume; |
||
| 90 | bool ReverseStereo; |
||
| 91 | bool OrigTrackOrder; |
||
| 92 | #ifdef DXX_BUILD_DESCENT_II |
||
| 93 | bool MovieSubtitles; |
||
| 94 | int MovieTexFilt; |
||
| 95 | #endif |
||
| 96 | callsign_t LastPlayer; |
||
| 97 | }; |
||
| 98 | extern struct Cfg GameCfg; |
||
| 99 | |||
| 100 | //#ifdef USE_SDLMIXER |
||
| 101 | //#define EXT_MUSIC_ON (GameCfg.SndEnableRedbook || GameCfg.JukeboxOn) |
||
| 102 | //#else |
||
| 103 | //#define EXT_MUSIC_ON (GameCfg.SndEnableRedbook) // JukeboxOn shouldn't do anything if it's not supported |
||
| 104 | //#endif |
||
| 105 | |||
| 106 | extern int ReadConfigFile(void); |
||
| 107 | extern int WriteConfigFile(void); |
||
| 108 | } |
||
| 109 | #endif |
||
| 110 | |||
| 111 | #endif |