ScummVM API documentation
engine.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 
23 #ifndef AWE_ENGINE_H
24 #define AWE_ENGINE_H
25 
26 #include "audio/mixer.h"
27 #include "awe/intern.h"
28 #include "awe/resource.h"
29 #include "awe/script.h"
30 #include "awe/sfx_player.h"
31 #include "awe/sound.h"
32 #include "awe/video.h"
33 
34 namespace Awe {
35 
36 struct Gfx;
37 struct SystemStub;
38 
39 struct Engine {
40  enum {
41  kStateLogo3DO,
42  kStateTitle3DO,
43  kStateEnd3DO,
44  kStateGame
45  };
46 
47  int _state = 0;
48  Gfx *_graphics = nullptr;
49  SystemStub *_stub = nullptr;
50  Script _script;
51  Sound *_sound = nullptr;
52  Resource _res;
53  SfxPlayer _ply;
54  Video _vid;
55  int _partNum = 0;
56 
57  Engine(Sound *sound, DataType dataType, int partNum);
58 
59  void setSystemStub(SystemStub *, Gfx *);
60 
61  const char *getGameTitle(Language lang) const {
62  return _res.getGameTitle(lang);
63  }
64 
65  void run();
66  void setup(Language lang, int graphicsType);
67  void finish();
68  void processInput();
69 
70  // 3DO
71  void doThreeScreens();
72  void doEndCredits();
73  void playCinepak(const char *name);
74  void scrollText(int a, int b, const char *text);
75  void titlePage();
76 
77  void saveGameState(uint8 slot, const char *desc);
78  void loadGameState(uint8 slot);
79 };
80 
81 } // namespace Awe
82 
83 #endif
Definition: script.h:42
Definition: engine.h:39
Definition: sound.h:57
Definition: gfx.h:62
Definition: resource.h:89
Definition: aifc_player.h:29
Definition: avi_frames.h:36
Definition: system_stub.h:58
Language
Definition: language.h:45
Definition: sfx_player.h:70