Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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 }
00131
00132 #endif // STARK_SERVICES_SETTINGS_H