ScummVM API documentation
emi_registry.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef EMI_REGISTRY_H
23 #define EMI_REGISTRY_H
24 
25 #include "common/str.h"
26 #include "common/hashmap.h"
27 #include "common/hash-str.h"
28 
29 namespace Grim {
30 
31 class EmiRegistry {
32 public:
33  EmiRegistry();
34  ~EmiRegistry() { }
35 
36  bool Get(const Common::String key, float &res) const;
37  void Set(const Common::String key, float &value);
38 
39 private:
40  uint convertVolumeToMixer(uint volume) const;
41  uint convertVolumeFromMixer(uint volume) const;
42  uint convertTalkSpeedToGUI(uint talkspeed) const;
43  uint convertTalkSpeedFromGUI(uint talkspeed) const;
44  bool convertSubtitlesToGUI(uint speechmode) const;
45  bool convertSpeechMuteToGUI(uint speechmode) const;
46  uint convertSpeechModeFromGUI(bool subtitles, bool speechMute) const;
47  const Common::String convertGammaToRegistry(float gamma) const;
48  float convertGammaFromRegistry(const Common::String &gamma) const;
49 
51 
52  Common::StringMap _transMap;
53  StringSet _boolSet;
54 
55  static const char *_boolValues[];
56  static const char *_translTable[][2];
57 };
58 
59 extern EmiRegistry *g_emiregistry;
60 
61 } // end of namespace Grim
62 
63 #endif
Definition: str.h:59
Definition: emi_registry.h:31
Definition: actor.h:33
Definition: set.h:44