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
28namespace MM {
29
30enum MightAndMagicDebugChannels {
31 kDebugPath = 1,
32 kDebugScripts,
33 kDebugGraphics,
34 kDebugSound,
35};
36
37class MMEngine : public Engine {
38protected:
39 const MightAndMagicGameDescription *_gameDescription;
40 Common::RandomSource _randomSource;
41public:
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
83extern MMEngine *g_engine;
84
85} // namespace MM
86
87#endif // MM_MM_H
Definition: random.h:44
uint getRandomNumber(uint max)
Definition: engine.h:149
EngineFeature
Definition: engine.h:282
Definition: mm.h:37
bool hasFeature(EngineFeature f) const override
Common::Platform getPlatform() const
uint getRandomNumber(int max)
Definition: mm.h:78
uint32 getFeatures() const
bool getIsCD() const
Common::Language getLanguage() const
uint32 getGameID() const
Definition: system.h:166
Language
Definition: language.h:45
Platform
Definition: platform.h:93
Definition: detection.h:27
Definition: detection.h:43