1
/* ScummVM - Graphic Adventure Engine
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.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
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.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26
#include "common/scummsys.h"
27
#include "common/system.h"
28
#include "common/error.h"
29
#include "common/random.h"
30
#include "common/util.h"
31
#include "engines/engine.h"
32
#include "graphics/surface.h"
33
#include "mads/debugger.h"
34
#include "mads/dialogs.h"
35
#include "mads/events.h"
36
#include "mads/font.h"
37
#include "mads/game.h"
38
#include "mads/screen.h"
39
#include "mads/msurface.h"
40
#include "mads/resources.h"
41
#include "mads/sound.h"
44
* This is the namespace of the MADS engine.
46
* Status of this engine: In Development
48
* Games using this engine:
49
* - Rex Nebular and the Cosmic Gender Bender
54
#define DEBUG_INTERMEDIATE 2
55
#define DEBUG_DETAILED 3
57
enum MADSDebugChannels {
59
kDebugScripts = 1 << 1,
60
kDebugGraphics = 1 << 2
65
GType_Dragonsphere = 1,
70
SCREEN_FADE_SMOOTH = 0,
71
SCREEN_FADE_MEDIUM = 1,
75
struct MADSGameDescription;
78
class MADSEngine : public Engine {
80
const MADSGameDescription *_gameDescription;
81
Common::RandomSource _randomSource;
84
* Handles basic initialisation
89
virtual Common::Error run();
90
virtual bool hasFeature(EngineFeature f) const;
94
EventsManager *_events;
98
Resources *_resources;
99
ScreenSurface _screen;
100
SoundManager *_sound;
103
bool _invObjectsAnimated;
104
bool _textWindowStill;
105
ScreenFade _screenFade;
109
MADSEngine(OSystem *syst, const MADSGameDescription *gameDesc);
110
virtual ~MADSEngine();
112
uint32 getFeatures() const;
113
Common::Language getLanguage() const;
114
Common::Platform getPlatform() const;
115
uint16 getVersion() const;
116
uint32 getGameID() const;
117
uint32 getGameFeatures() const;
119
int getRandomNumber(int maxNumber);
120
int getRandomNumber(int minNumber, int maxNumber);
121
int hypotenuse(int xv, int yv);
124
* Returns true if it is currently okay to restore a game
126
bool canLoadGameStateCurrently();
129
* Returns true if it is currently okay to save the game
131
bool canSaveGameStateCurrently();
134
* Support method that generates a savegame name
135
* @param slot Slot number
137
Common::String generateSaveName(int slot);
140
* Handles loading a game via the GMM
142
virtual Common::Error loadGameState(int slot);
145
* Handles saving the game via the GMM
147
virtual Common::Error saveGameState(int slot, const Common::String &desc);
150
} // End of namespace MADS
152
#endif /* MADS_MADS_H */