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 
30 namespace Awe {
31 
32 class AweEngine : public ::Engine {
33 private:
34  const AweGameDescription *_gameDescription;
35  Common::RandomSource _random;
36 
37 public:
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 
61 extern AweEngine *g_engine;
62 
63 } // namespace Awe
64 
65 #endif
EngineFeature
Definition: engine.h:260
Definition: stream.h:77
Definition: error.h:81
Definition: random.h:44
Definition: awe.h:32
uint getRandomNumber(uint max)
Definition: stream.h:745
Definition: engine.h:39
Engine * g_engine
Common::Error run() override
virtual Common::Error loadGameStream(Common::SeekableReadStream *stream)
Definition: detection.h:50
Definition: aifc_player.h:29
Definition: system.h:163
virtual Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave=false)
virtual bool hasFeature(EngineFeature f) const
Definition: engine.h:390
Language
Definition: language.h:45