ScummVM API documentation
awe.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 AWE_AWE_H
23#define AWE_AWE_H
24
25#include "common/scummsys.h"
26#include "common/random.h"
27#include "engines/engine.h"
28#include "awe/detection.h"
29
30namespace Awe {
31
32class AweEngine : public ::Engine {
33private:
34 const AweGameDescription *_gameDescription;
36
37public:
38 AweEngine(OSystem *syst, const AweGameDescription *gameDesc);
39 ~AweEngine() override;
40
41 Common::Error run() override;
42#ifdef TODO
43 bool hasFeature(EngineFeature f) const override;
44 bool isDemo() const;
45
46 Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave = false) override;
48#endif
49
50 int getRandomNumber(int max) {
51 return _random.getRandomNumber(max);
52 }
53 int getRandomNumber(int min, int max) {
54 return min + _random.getRandomNumber(max - min);
55 }
56
57 DataType getDataType() const;
58 Common::Language getLanguage() const;
59};
60
61extern AweEngine *g_engine;
62
63} // namespace Awe
64
65#endif
Definition: awe.h:32
Common::Error run() override
Definition: error.h:81
Definition: random.h:44
uint getRandomNumber(uint max)
Definition: stream.h:745
Definition: stream.h:77
Definition: engine.h:149
virtual Common::Error loadGameStream(Common::SeekableReadStream *stream)
virtual Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false)
EngineFeature
Definition: engine.h:282
virtual bool hasFeature(EngineFeature f) const
Definition: engine.h:412
Definition: system.h:166
Language
Definition: language.h:45
Engine * g_engine
Definition: detection.h:50