ScummVM API documentation
mads.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 MADS_MADS_H
23 #define MADS_MADS_H
24 
25 #include "common/scummsys.h"
26 #include "common/system.h"
27 #include "common/error.h"
28 #include "common/random.h"
29 #include "common/util.h"
30 #include "engines/engine.h"
31 #include "mads/detection.h"
32 
33 namespace MADS {
34 
35 #define DEBUG_BASIC 1
36 #define DEBUG_INTERMEDIATE 2
37 #define DEBUG_DETAILED 3
38 
39 enum MADSDebugChannels {
40  kDebugPath = 1,
41  kDebugScripts,
42  kDebugGraphics,
43  kDebugConversations
44 };
45 
46 enum ScreenFade {
47  SCREEN_FADE_SMOOTH = 0,
48  SCREEN_FADE_MEDIUM = 1,
49  SCREEN_FADE_FAST = 2
50 };
51 
52 enum MADSActions {
53  kActionNone,
54  kActionEscape,
55  kActionGameMenu,
56  kActionSave,
57  kActionRestore,
58  kActionScrollUp,
59  kActionScrollDown,
60  kActionStartGame,
61  kActionResumeGame,
62  kActionShowIntro,
63  kActionCredits,
64  kActionQuotes,
65  kActionRestartAnimation
66 };
67 
68 class MADSEngine : public Engine {
69 protected:
70  const MADSGameDescription *_gameDescription;
71  Common::RandomSource _randomSource;
72 
73  bool hasFeature(EngineFeature f) const override;
74 
75 public:
76  MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc);
77  ~MADSEngine() override;
78 
79  uint32 getFeatures() const;
80  Common::Language getLanguage() const;
81  Common::Platform getPlatform() const;
82  uint16 getVersion() const;
83  uint32 getGameID() const;
84  uint32 getGameFeatures() const;
85  bool isDemo() const;
86 
87  int getRandomNumber(int maxNumber);
88  int getRandomNumber(int minNumber, int maxNumber);
89 };
90 
91 } // namespace MADS
92 
93 #endif
EngineFeature
Definition: engine.h:258
Definition: random.h:44
Definition: detection.h:41
Definition: mads.h:68
Definition: action.h:28
Definition: system.h:164
Definition: engine.h:144
Platform
Definition: platform.h:93
bool hasFeature(EngineFeature f) const override
Language
Definition: language.h:45