dxx-rebirth/common/main/config.h

114 lines
2.8 KiB
C
Raw Normal View History

2006-03-20 17:12:09 +00:00
/*
2014-06-01 17:55:23 +00:00
* Portions of this file are copyright Rebirth contributors and licensed as
* described in COPYING.txt.
* Portions of this file are copyright Parallax Software and licensed
* according to the Parallax license below.
* See COPYING.txt for license details.
2006-03-20 17:12:09 +00:00
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
*/
/*
*
* prototype definitions for descent.cfg reading/writing
*
*/
2015-03-22 18:49:20 +00:00
#pragma once
2006-03-20 17:12:09 +00:00
2015-07-04 21:01:17 +00:00
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
#include "player-callsign.h"
2015-07-04 21:01:17 +00:00
#endif
2006-03-20 17:12:09 +00:00
#ifdef __cplusplus
2016-08-06 19:55:25 +00:00
#include "mission.h"
#include "pack.h"
2014-12-22 04:35:47 +00:00
#include "ntstring.h"
#include <array>
2015-12-13 18:00:49 +00:00
namespace dcx {
2020-05-31 23:04:25 +00:00
enum class opengl_texture_filter : uint8_t;
2020-05-31 23:04:25 +00:00
// play-order definitions for custom music
/* These values are written to a file as integers, so they must not be
* renumbered.
*/
enum class LevelMusicPlayOrder : uint8_t
{
Continuous,
Level,
Random,
};
2015-07-18 03:49:47 +00:00
struct CCfg : prohibit_void_ptr<CCfg>
{
2021-01-25 00:45:07 +00:00
uint16_t ResolutionX;
uint16_t ResolutionY;
#if DXX_USE_ADLMIDI
int ADLMIDI_num_chips = 6;
/* See common/include/adlmidi_dynamic.h for the symbolic name and for other
* values.
*/
int ADLMIDI_bank = 31;
bool ADLMIDI_enabled;
#endif
2015-07-18 03:49:47 +00:00
bool VSync;
bool Grabinput;
2015-12-18 04:08:23 +00:00
bool WindowMode;
opengl_texture_filter TexFilt;
bool TexAnisotropy;
2016-10-02 19:35:33 +00:00
bool Multisample;
2016-10-02 19:35:33 +00:00
bool FPSIndicator;
2020-12-27 22:03:09 +00:00
uint8_t GammaLevel;
2020-05-31 23:04:25 +00:00
LevelMusicPlayOrder CMLevelMusicPlayOrder;
2020-05-02 21:18:42 +00:00
std::array<int, 2> CMLevelMusicTrack;
2016-08-06 19:55:25 +00:00
ntstring<MISSION_NAME_LEN> LastMission;
2016-08-06 19:55:25 +00:00
ntstring<PATH_MAX - 1> CMLevelMusicPath;
2020-05-02 21:18:42 +00:00
std::array<ntstring<PATH_MAX - 1>, 5> CMMiscMusic;
2015-07-18 03:49:47 +00:00
};
extern struct CCfg CGameCfg;
}
2016-01-09 16:38:15 +00:00
#ifdef dsx
2015-12-13 18:00:49 +00:00
namespace dsx {
2014-12-22 04:35:47 +00:00
struct Cfg : prohibit_void_ptr<Cfg>
{
int MusicType;
int AspectX;
int AspectY;
2015-07-04 21:01:17 +00:00
uint8_t DigiVolume;
uint8_t MusicVolume;
bool ReverseStereo;
bool OrigTrackOrder;
#ifdef DXX_BUILD_DESCENT_II
2015-03-22 18:49:20 +00:00
bool MovieSubtitles;
int MovieTexFilt;
2015-07-04 21:01:17 +00:00
#endif
callsign_t LastPlayer;
};
extern struct Cfg GameCfg;
2006-03-20 17:12:09 +00:00
//#ifdef USE_SDLMIXER
//#define EXT_MUSIC_ON (GameCfg.SndEnableRedbook || GameCfg.JukeboxOn)
//#else
//#define EXT_MUSIC_ON (GameCfg.SndEnableRedbook) // JukeboxOn shouldn't do anything if it's not supported
//#endif
extern int ReadConfigFile(void);
extern int WriteConfigFile(void);
}
#endif
2006-03-20 17:12:09 +00:00
#endif