ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

settings.h

Go to the documentation of this file.
00001 /* ResidualVM - A 3D game interpreter
00002  *
00003  * ResidualVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the AUTHORS
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef STARK_SERVICES_SETTINGS_H
00024 #define STARK_SERVICES_SETTINGS_H
00025 
00026 #include "common/config-manager.h"
00027 #include "common/language.h"
00028 #include "common/ustr.h"
00029 
00030 #include "engines/stark/gfx/texture.h"
00031 #include "engines/stark/services/services.h"
00032 
00033 struct ADGameDescription;
00034 
00035 namespace Audio {
00036 class Mixer;
00037 }
00038 
00039 namespace Stark {
00040 
00046 class Settings {
00047 public:
00048     enum BoolSettingIndex {
00049         kHighModel,
00050         kSubtitle,
00051         kSpecialFX,
00052         kShadow,
00053         kHighFMV,
00054         kTimeSkip
00055     };
00056 
00057     enum IntSettingIndex {
00058         kVoice,
00059         kMusic,
00060         kSfx,
00061         kSaveLoadPage
00062     };
00063 
00064     Settings(Audio::Mixer *mixer, const ADGameDescription *gd);
00065     ~Settings() {}
00066 
00072     bool isDemo() const {
00073         return _isDemo;
00074     }
00075 
00077     bool getBoolSetting(BoolSettingIndex index) { return ConfMan.getBool(_boolKey[index]); }
00078     int getIntSetting(IntSettingIndex index) { return ConfMan.getInt(_intKey[index]); }
00079 
00081     void flipSetting(BoolSettingIndex index) { 
00082         ConfMan.setBool(_boolKey[index], !getBoolSetting(index));
00083     }
00084 
00086     void setIntSetting(IntSettingIndex index, int value);
00087 
00089     bool hasLowResFMV() { return _hasLowRes; }
00090 
00092     void enableBookOfSecrets() { 
00093         ConfMan.setBool("xoBfOsterceS", true);
00094         ConfMan.flushToDisk();
00095     }
00096 
00098     bool hasBookOfSecrets() { return ConfMan.hasKey("xoBfOsterceS"); }
00099 
00101     bool isAssetsModEnabled() const;
00102 
00112     bool shouldPreMultiplyReplacementPNGs() const;
00113 
00115     Gfx::Texture::SamplingFilter getImageSamplingFilter() const;
00116 
00118     Common::CodePage getTextCodePage() const;
00119 
00120 private:
00121     Audio::Mixer *_mixer;
00122     bool _hasLowRes;
00123     const bool _isDemo;
00124     const Common::Language _language;
00125 
00126     const char *_boolKey[6];
00127     const char *_intKey[4];
00128 };
00129 
00130 } // End of namespace Stark
00131 
00132 #endif // STARK_SERVICES_SETTINGS_H


Generated on Sat Apr 20 2019 05:03:54 for ResidualVM by doxygen 1.7.1
curved edge   curved edge