ScummVM API documentation
emi.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 EMI_ENGINE_H
23 #define EMI_ENGINE_H
24 
25 #include "engines/grim/grim.h"
26 #include "engines/grim/emi/layer.h"
27 
28 namespace Grim {
29 
30 class TextObject;
31 class Actor;
32 
33 class EMIEngine : public GrimEngine {
34 public:
35  EMIEngine(OSystem *syst, uint32 gameFlags, GrimGameType gameType, Common::Platform platform, Common::Language language);
36  virtual ~EMIEngine();
37 
38  const char *getUpdateFilename() override;
39 
40  void pushText();
41  void popText();
42  void purgeText();
43 
44  void invalidateActiveActorsList() override;
45  void invalidateTextObjectsSortOrder() override;
46  void invalidateSortOrder();
47  void sortActiveActorsList();
48  void temporaryStoreSaveGameImage();
49  void storeSaveGameImage(SaveGame *state) override;
50 
51 private:
52  LuaBase *createLua() override;
53  void drawNormalMode() override;
54  void updateDrawMode() override;
55  static bool compareTextLayer(const TextObject *x, const TextObject *y);
56  void drawTextObjects() override;
57  static bool compareActor(const Actor *x, const Actor *y);
58  void sortTextObjects();
59  static bool compareLayer(const Layer *x, const Layer *y);
60  void sortLayers();
61 
62  Common::List<TextObject *> _textObjects;
63  Common::List<Layer *> _layers;
64 
65  bool _textObjectsSortOrderInvalidated;
66  bool _sortOrderInvalidated;
67 };
68 
69 extern EMIEngine *g_emi;
70 
71 } // end of namespace Grim
72 
73 #endif
Definition: grim.h:58
Definition: layer.h:33
Definition: list.h:44
Definition: savegame.h:33
Definition: actor.h:33
Definition: textobject.h:84
Definition: emi.h:33
void invalidateActiveActorsList() override
Actor represents a 3D character on screen.
Definition: actor.h:72
Definition: lua.h:102
Definition: system.h:175
Platform
Definition: platform.h:46
Language
Definition: language.h:45