ScummVM API documentation
mm.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 MM_MM_H
23 #define MM_MM_H
24 
25 #include "common/random.h"
26 #include "mm/detection.h"
27 
28 namespace MM {
29 
30 enum MightAndMagicDebugChannels {
31  kDebugPath = 1 << 0,
32  kDebugScripts = 1 << 1,
33  kDebugGraphics = 1 << 2,
34  kDebugSound = 1 << 3
35 };
36 
37 class MMEngine : public Engine {
38 protected:
39  const MightAndMagicGameDescription *_gameDescription;
40  Common::RandomSource _randomSource;
41 public:
42  MMEngine(OSystem *syst, const MM::MightAndMagicGameDescription *gameDesc);
43  ~MMEngine() override {}
44 
48  bool hasFeature(EngineFeature f) const override;
49 
53  uint32 getFeatures() const;
54 
59 
64 
68  uint32 getGameID() const;
69 
73  bool getIsCD() const;
74 
78  uint getRandomNumber(int max) {
79  return _randomSource.getRandomNumber(max);
80  }
81 };
82 
83 extern MMEngine *g_engine;
84 
85 } // namespace MM
86 
87 #endif // MM_MM_H
EngineFeature
Definition: engine.h:253
bool getIsCD() const
Definition: random.h:44
Definition: mm.h:37
uint getRandomNumber(uint max)
uint getRandomNumber(int max)
Definition: mm.h:78
bool hasFeature(EngineFeature f) const override
uint32 getFeatures() const
Definition: detection.h:27
Definition: detection.h:43
Common::Platform getPlatform() const
Definition: system.h:161
Common::Language getLanguage() const
uint32 getGameID() const
Definition: engine.h:144
Platform
Definition: platform.h:46
Language
Definition: language.h:45