ScummVM
kyra_v2.h
Go to the documentation of this file.
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
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.
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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef KYRA_KYRA_V2_H
24 #define KYRA_KYRA_V2_H
25 
26 #include "kyra/kyra_v1.h"
27 #include "kyra/gui/gui_v1.h"
28 #include "kyra/graphics/wsamovie.h"
29 #include "kyra/engine/item.h"
30 
31 #include "common/list.h"
32 #include "common/hashmap.h"
33 
34 namespace Kyra {
35 
36 struct FrameControl {
39 };
40 
45 };
46 
50 };
51 
52 class Screen_v2;
53 
54 class KyraEngine_v2 : public KyraEngine_v1 {
55 friend class Debugger_v2;
56 friend class GUI_v2;
57 public:
58  struct EngineDesc {
59  // Generic shape related
62 
63  // Scene script
65 
66  // Animation script specific
68 
69  // Item specific
71  };
72 
73  KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc);
74  ~KyraEngine_v2() override;
75 
76  void pauseEngineIntern(bool pause) override;
77 
78  virtual Screen_v2 *screen_v2() const = 0;
79 
80  void delay(uint32 time, bool update = false, bool isMainLoop = false) override;
81 
82  const EngineDesc &engineDesc() const { return _desc; }
83 protected:
85 
86  // run
88  bool _runFlag;
89  bool _showOutro;
90 
91  virtual void update() = 0;
92  virtual void updateWithText() = 0;
93 
94  // detection
95  int _lang;
96 
97  // Input
98  virtual int inputSceneChange(int x, int y, int unk1, int unk2) = 0;
99 
100  // Animator
101  struct AnimObj {
104  bool enabled;
121  };
122 
123  void allocAnimObjects(int actors, int anims, int items);
125 
129 
132 
136 
137  virtual void refreshAnimObjects(int force) = 0;
139 
141  void flagAnimObjsForRefresh();
142 
143  virtual void clearAnimObjects() = 0;
144 
145  virtual void drawAnimObjects() = 0;
146  virtual void drawSceneAnimObject(AnimObj *obj, int x, int y, int drawLayer) = 0;
147  virtual void drawCharacterAnimObject(AnimObj *obj, int x, int y, int drawLayer) = 0;
148 
149  virtual void updateCharacterAnim(int) = 0;
150  virtual void updateSceneAnim(int anim, int newFrame) = 0;
151 
152  void addItemToAnimList(int item);
153  void deleteItemAnimEntry(int item);
154 
155  virtual void animSetupPaletteEntry(AnimObj *){}
156 
157  virtual void setCharacterAnimDim(int w, int h) = 0;
158  virtual void resetCharacterAnimDim() = 0;
159 
160  virtual int getScale(int x, int y) = 0;
161 
163 
164  // Scene
165  struct SceneDesc {
166  char filename1[10];
167  char filename2[10];
168 
172  };
173 
177 
183  bool checkSpecialSceneExit(int num, int x, int y);
184 
186 
187  virtual void enterNewScene(uint16 newScene, int facing, int unk1, int unk2, int unk3) = 0;
188 
189  void runSceneScript6();
190 
193 
194  virtual int trySceneChange(int *moveTable, int unk1, int unk2) = 0;
195 
196  // Animation
197  virtual void restorePage3() = 0;
198 
199  struct SceneAnim {
207  char filename[14];
208  };
209 
212 
213  void freeSceneAnims();
214 
221 
223 
224  // Sequences
228 
229  void runAnimationScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload);
230 
233 
235 
239 
242 
244 
247 
249 
250  virtual int initAnimationShapes(uint8 *filedata) = 0;
251  void processAnimationScript(int allowSkip, int resetChar);
252  virtual void uninitAnimationShapes(int count, uint8 *filedata) = 0;
253 
254  // Shapes
255  typedef Common::HashMap<int, uint8 *> ShapeMap;
257 
258  uint8 *getShapePtr(int index) const;
259  void addShapeToPool(const uint8 *data, int realIndex, int shape);
260  void addShapeToPool(uint8 *shpData, int index);
261  void remShapeFromPool(int idx);
262 
264  virtual void loadCharacterShapes(int shapes) = 0;
265 
266  // pathfinder
267  int _movFacingTable[600];
270 
271  int findWay(int curX, int curY, int dstX, int dstY, int *moveTable, int moveTableSize) override;
272 
273  bool directLinePassable(int x, int y, int toX, int toY);
274 
275  int pathfinderInitPositionTable(int *moveTable);
276  int pathfinderAddToPositionTable(int index, int v1, int v2);
277  int pathfinderInitPositionIndexTable(int tableLen, int x, int y);
279  void pathfinderFinializePath(int *moveTable, int unk1, int x, int y, int moveTableSize);
280 
283 
284  // items
285  struct ItemDefinition {
290  };
291 
292  void initItemList(int size);
293 
295 
298 
301 
302  int findFreeItem();
303  int countAllItems();
304 
305  int findItem(uint16 sceneId, Item id);
306  int findItem(Item item);
307 
308  void resetItemList();
309  void resetItem(int index);
310 
311  virtual void setMouseCursor(Item item) = 0;
312 
313  void setHandItem(Item item) override;
314  void removeHandItem() override;
315 
316  // character
317  struct Character {
323  byte walkspeed;
328  };
329 
333 
334  void moveCharacter(int facing, int x, int y);
335  int updateCharPos(int *table, int force = 0);
337 
339 
340  virtual int getCharacterWalkspeed() const = 0;
341  virtual void updateCharAnimFrame(int *table) = 0;
342 
343  // chat
344  int _vocHigh;
345 
346  const char *_chatText;
351 
354 
355  virtual void setDlgIndex(int dlgIndex) = 0;
356 
357  virtual void randomSceneChat() = 0;
358 
359  // unknown
360  int _unk4, _unk5;
363 
364  // opcodes
375  int o2_delay(EMCState *script);
376  int o2_update(EMCState *script);
396 };
397 
398 } // End of namespace Kyra
399 
400 #endif
Kyra::KyraEngine_v2::_showOutro
bool _showOutro
Definition: kyra_v2.h:89
Kyra::KyraEngine_v2::AnimObj::width
int16 width
Definition: kyra_v2.h:117
Kyra
This is the namespace of the Kyra engine.
Definition: chargen.cpp:37
Kyra::GUI_v2
Definition: gui_v2.h:102
Kyra::KyraEngine_v2::SceneAnim::flags
uint16 flags
Definition: kyra_v2.h:200
Kyra::ActiveItemAnim::nextFrameTime
uint32 nextFrameTime
Definition: kyra_v2.h:49
Kyra::KyraEngine_v2::screen_v2
virtual Screen_v2 * screen_v2() const =0
Kyra::KyraEngine_v2::_sceneScriptState
EMCState _sceneScriptState
Definition: kyra_v2.h:192
Kyra::KyraEngine_v2::AnimObj::shapeIndex2
uint16 shapeIndex2
Definition: kyra_v2.h:114
Kyra::KyraEngine_v2::o2_getCharacterFacing
int o2_getCharacterFacing(EMCState *script)
Definition: script_v2.cpp:41
Kyra::KyraEngine_v2::SceneDesc
Definition: kyra_v2.h:165
Kyra::KyraEngine_v2::pathfinderAddToPositionIndexTable
int pathfinderAddToPositionIndexTable(int index, int v)
Definition: scene_v2.cpp:200
Kyra::KyraEngine_v2::EngineDesc::firstAnimSceneScript
int firstAnimSceneScript
Definition: kyra_v2.h:64
Kyra::KyraEngine_v2::checkSpecialSceneExit
bool checkSpecialSceneExit(int num, int x, int y)
Definition: kyra_v2.cpp:166
Kyra::KyraEngine_v2::SceneAnim
Definition: kyra_v2.h:199
Kyra::KyraEngine_v2::inputSceneChange
virtual int inputSceneChange(int x, int y, int unk1, int unk2)=0
Common::Array< const Opcode * >
Kyra::KyraEngine_v2::Character::inventory
Item inventory[20]
Definition: kyra_v2.h:324
Kyra::KyraEngine_v2::Character::y2
int16 y2
Definition: kyra_v2.h:326
Kyra::KyraEngine_v2::AnimObj::animFlags
uint16 animFlags
Definition: kyra_v2.h:107
Kyra::KyraEngine_v2::o2_moveCharacter
int o2_moveCharacter(EMCState *script)
Definition: script_v2.cpp:77
Kyra::KyraEngine_v2::allocAnimObjects
void allocAnimObjects(int actors, int anims, int items)
Definition: animator_v2.cpp:28
Kyra::KyraEngine_v2::SceneDesc::exit4
uint16 exit4
Definition: kyra_v2.h:169
Kyra::KyraEngine_v2::AnimObj::width2
int16 width2
Definition: kyra_v2.h:118
Kyra::KyraEngine_v2::AnimObj::yPos1
int16 yPos1
Definition: kyra_v2.h:109
Kyra::KyraEngine_v2::drawAnimObjects
virtual void drawAnimObjects()=0
Kyra::KyraEngine_v2::_movFacingTable
int _movFacingTable[600]
Definition: kyra_v2.h:267
Kyra::KyraEngine_v2::initAnimList
AnimObj * initAnimList(AnimObj *list, AnimObj *entry)
Definition: animator_v2.cpp:39
Kyra::KyraEngine_v2::Character::y3
int16 y3
Definition: kyra_v2.h:327
Kyra::KyraEngine_v2::Character::animFrame
uint16 animFrame
Definition: kyra_v2.h:322
Kyra::KyraEngine_v2::o2_getCharacterScene
int o2_getCharacterScene(EMCState *script)
Definition: script_v2.cpp:46
Kyra::KyraEngine_v2::AnimObj::specialRefresh
uint16 specialRefresh
Definition: kyra_v2.h:106
Kyra::KyraEngine_v2::o2_defineRoomEntrance
int o2_defineRoomEntrance(EMCState *script)
Definition: script_v2.cpp:198
x
x
Definition: soft_render_surface.inl:123
Kyra::KyraEngine_v2::_itemListSize
int _itemListSize
Definition: kyra_v2.h:297
Kyra::KyraEngine_v2::resetCharacterAnimDim
virtual void resetCharacterAnimDim()=0
Kyra::KyraEngine_v2::_charScale
int _charScale
Definition: kyra_v2.h:332
Kyra::KyraEngine_v2::_animShapeCount
int _animShapeCount
Definition: kyra_v2.h:237
Kyra::KyraEngine_v2::enterNewScene
virtual void enterNewScene(uint16 newScene, int facing, int unk1, int unk2, int unk3)=0
Kyra::KyraEngine_v2::_chatScriptState
EMCState _chatScriptState
Definition: kyra_v2.h:353
wsamovie.h
Kyra::KyraEngine_v2::_animResetFrame
int _animResetFrame
Definition: kyra_v2.h:243
Kyra::KyraEngine_v2::_mainCharX
int _mainCharX
Definition: kyra_v2.h:331
Kyra::KyraEngine_v2::_animObjects
AnimObj * _animObjects
Definition: kyra_v2.h:124
Kyra::KyraEngine_v2::EngineDesc::maxItemId
Item maxItemId
Definition: kyra_v2.h:70
Kyra::KyraEngine_v2::o2_disableTimer
int o2_disableTimer(EMCState *script)
Definition: script_v2.cpp:293
Kyra::GameFlags
Definition: kyra_v1.h:110
Kyra::KyraEngine_v2::_smoothingPath
bool _smoothingPath
Definition: kyra_v2.h:269
Kyra::KyraEngine_v2::_sceneScriptData
EMCData _sceneScriptData
Definition: kyra_v2.h:191
kyra_v1.h
Kyra::KyraEngine_v2::ItemDefinition
Definition: kyra_v2.h:285
Kyra::KyraEngine_v2::AnimObj::xPos3
int16 xPos3
Definition: kyra_v2.h:116
Kyra::KyraEngine_v2::getScale
virtual int getScale(int x, int y)=0
Kyra::KyraEngine_v2::_unkSceneScreenFlag1
bool _unkSceneScreenFlag1
Definition: kyra_v2.h:361
Kyra::KyraEngine_v2::_sceneListSize
int _sceneListSize
Definition: kyra_v2.h:175
Kyra::KyraEngine_v2::_specialSceneScriptRunFlag
bool _specialSceneScriptRunFlag
Definition: kyra_v2.h:220
Kyra::KyraEngine_v2::SceneDesc::exit2
uint16 exit2
Definition: kyra_v2.h:169
Kyra::KyraEngine_v2::_mainCharacter
Character _mainCharacter
Definition: kyra_v2.h:330
Kyra::KyraEngine_v2::AnimObj::yPos3
int16 yPos3
Definition: kyra_v2.h:116
Kyra::KyraEngine_v2::_animShapeFilename
char _animShapeFilename[14]
Definition: kyra_v2.h:234
Kyra::KyraEngine_v2::drawSceneAnimObject
virtual void drawSceneAnimObject(AnimObj *obj, int x, int y, int drawLayer)=0
Kyra::KyraEngine_v2::Character::x3
int16 x3
Definition: kyra_v2.h:327
Kyra::KyraEngine_v2::Character::sceneId
uint16 sceneId
Definition: kyra_v2.h:318
Kyra::KyraEngine_v2::getShapePtr
uint8 * getShapePtr(int index) const
Definition: kyra_v2.cpp:191
Kyra::KyraEngine_v2::AnimObj::yPos2
int16 yPos2
Definition: kyra_v2.h:115
Kyra::KyraEngine_v2::_chatObject
int _chatObject
Definition: kyra_v2.h:347
Kyra::KyraEngine_v2::_runFlag
bool _runFlag
Definition: kyra_v2.h:88
Kyra::KyraEngine_v2::setCharacterAnimDim
virtual void setCharacterAnimDim(int w, int h)=0
Kyra::KyraEngine_v2::_specialExitCount
int _specialExitCount
Definition: kyra_v2.h:181
uint32
unsigned int uint32
Definition: cdtypes.h:26
Kyra::KyraEngine_v2::_pathfinderFlag
int _pathfinderFlag
Definition: kyra_v2.h:268
Kyra::KyraEngine_v2::Character::x2
int16 x2
Definition: kyra_v2.h:326
Kyra::KyraEngine_v2::~KyraEngine_v2
~KyraEngine_v2() override
Definition: kyra_v2.cpp:110
Kyra::KyraEngine_v2::Character::x1
int16 x1
Definition: kyra_v2.h:325
Kyra::ActiveItemAnim::currentFrame
uint16 currentFrame
Definition: kyra_v2.h:48
Kyra::KyraEngine_v2::_sceneList
SceneDesc * _sceneList
Definition: kyra_v2.h:174
Kyra::KyraEngine_v2::_animShapeXAdd
int _animShapeXAdd
Definition: kyra_v2.h:246
index
SceneIndex index
Definition: action.cpp:432
Kyra::KyraEngine_v2::randomSceneChat
virtual void randomSceneChat()=0
Kyra::KyraEngine_v2::drawCharacterAnimObject
virtual void drawCharacterAnimObject(AnimObj *obj, int x, int y, int drawLayer)=0
Kyra::KyraEngine_v2::_animAnims
AnimObj * _animAnims
Definition: kyra_v2.h:127
Kyra::KyraEngine_v2::_overwriteSceneFacing
bool _overwriteSceneFacing
Definition: kyra_v2.h:185
Glk::Alan3::newFrame
void newFrame(Stack theStack, Aint noOfLocals)
Definition: stack.cpp:111
Kyra::KyraEngine_v2::moveCharacter
void moveCharacter(int facing, int x, int y)
Definition: kyra_v2.cpp:198
Kyra::KyraEngine_v2::countAllItems
int countAllItems()
Definition: items_v2.cpp:47
Kyra::KyraEngine_v2::AnimObj::shapeIndex3
uint16 shapeIndex3
Definition: kyra_v2.h:113
item.h
Sword25::pause
int pause(lua_State *L)
Definition: movieplayer_script.cpp:70
Kyra::KyraEngine_v2::Character::height
uint8 height
Definition: kyra_v2.h:320
Kyra::KyraEngine_v2::_animShapeYAdd
int _animShapeYAdd
Definition: kyra_v2.h:246
Kyra::KyraEngine_v2::updateCharPos
int updateCharPos(int *table, int force=0)
Definition: kyra_v2.cpp:234
Kyra::KyraEngine_v2::_chatVocHigh
int _chatVocHigh
Definition: kyra_v2.h:349
Kyra::KyraEngine_v2::o2_getVocHigh
int o2_getVocHigh(EMCState *script)
Definition: script_v2.cpp:317
Kyra::KyraEngine_v2::deleteAnimListEntry
AnimObj * deleteAnimListEntry(AnimObj *list, AnimObj *entry)
Definition: animator_v2.cpp:75
Kyra::KyraEngine_v2::o2_addSpecialExit
int o2_addSpecialExit(EMCState *script)
Definition: script_v2.cpp:103
Kyra::KyraEngine_v2::_opcodesAnimation
Common::Array< const Opcode * > _opcodesAnimation
Definition: kyra_v2.h:227
Kyra::KyraEngine_v2::runAnimationScript
void runAnimationScript(const char *filename, int allowSkip, int resetChar, int newShapes, int shapeUnload)
Definition: sequences_v2.cpp:30
Kyra::KyraEngine_v2::setMouseCursor
virtual void setMouseCursor(Item item)=0
Kyra::KyraEngine_v2::_animList
AnimObj * _animList
Definition: kyra_v2.h:131
Kyra::KyraEngine_v2::_itemInHand
int _itemInHand
Definition: kyra_v2.h:299
Kyra::KyraEngine_v2::findFreeItem
int findFreeItem()
Definition: items_v2.cpp:39
Kyra::KyraEngine_v2::_gameShapes
ShapeMap _gameShapes
Definition: kyra_v2.h:256
Kyra::KyraEngine_v2::_sceneSpecialScriptsTimer
uint32 _sceneSpecialScriptsTimer[10]
Definition: kyra_v2.h:218
Kyra::KyraEngine_v2::SceneAnim::height
int16 height
Definition: kyra_v2.h:203
Kyra::KyraEngine_v2::_sceneEnterX2
int _sceneEnterX2
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::_animShapeHeight
int _animShapeHeight
Definition: kyra_v2.h:245
Kyra::KyraEngine_v2::ItemDefinition::x
int16 x
Definition: kyra_v2.h:288
Kyra::KyraEngine_v2::_chatScriptData
EMCData _chatScriptData
Definition: kyra_v2.h:352
list.h
Kyra::KyraEngine_v2::pathfinderAddToPositionTable
int pathfinderAddToPositionTable(int index, int v1, int v2)
Definition: scene_v2.cpp:163
Kyra::KyraEngine_v2::_animNeedUpdate
bool _animNeedUpdate
Definition: kyra_v2.h:248
Kyra::KyraEngine_v2::SceneAnim::x
int16 x
Definition: kyra_v2.h:201
Kyra::KyraEngine_v2::addItemToAnimList
void addItemToAnimList(int item)
Definition: animator_v2.cpp:137
Kyra::KyraEngine_v2::_unk5
int _unk5
Definition: kyra_v2.h:360
Kyra::KyraEngine_v2::resetItem
void resetItem(int index)
Definition: items_v2.cpp:77
Kyra::KyraEngine_v2::ItemDefinition::sceneId
uint16 sceneId
Definition: kyra_v2.h:287
Kyra::KyraEngine_v2::directLinePassable
bool directLinePassable(int x, int y, int toX, int toY)
Definition: scene_v2.cpp:99
Kyra::KyraEngine_v2::SceneAnim::y2
int16 y2
Definition: kyra_v2.h:202
Kyra::KyraEngine_v2::AnimObj::index
uint16 index
Definition: kyra_v2.h:102
Kyra::KyraEngine_v2::o2_runAnimationScript
int o2_runAnimationScript(EMCState *script)
Definition: script_v2.cpp:227
uint8
unsigned char uint8
Definition: cdtypes.h:28
Kyra::KyraEngine_v2::AnimObj::height
int16 height
Definition: kyra_v2.h:117
Kyra::FrameControl::delay
uint16 delay
Definition: kyra_v2.h:38
hashmap.h
Kyra::KyraEngine_v2::SceneDesc::filename1
char filename1[10]
Definition: kyra_v2.h:166
Kyra::KyraEngine_v2::AnimObj::nextObject
AnimObj * nextObject
Definition: kyra_v2.h:120
Kyra::KyraEngine_v2::_animationScriptState
EMCState _animationScriptState
Definition: kyra_v2.h:226
Kyra::KyraEngine_v2::o2_waitForConfirmationClick
int o2_waitForConfirmationClick(EMCState *script)
Definition: script_v2.cpp:156
Kyra::KyraEngine_v2::updateSceneAnim
virtual void updateSceneAnim(int anim, int newFrame)=0
Kyra::KyraEngine_v2::updateSpecialSceneScripts
void updateSpecialSceneScripts()
Definition: scene_v2.cpp:39
Kyra::KyraEngine_v2::o2_trySceneChange
int o2_trySceneChange(EMCState *script)
Definition: script_v2.cpp:58
Kyra::KyraEngine_v2::o2_defineScene
int o2_defineScene(EMCState *script)
Definition: script_v2.cpp:242
Kyra::ItemAnimDefinition::frames
const FrameControl * frames
Definition: kyra_v2.h:44
Kyra::KyraEngine_v2::restorePage3
virtual void restorePage3()=0
Kyra::KyraEngine_v2::delay
void delay(uint32 time, bool update=false, bool isMainLoop=false) override
Definition: kyra_v2.cpp:149
Kyra::KyraEngine_v2::o2_checkForItem
int o2_checkForItem(EMCState *script)
Definition: script_v2.cpp:83
Kyra::KyraEngine_v2::_sceneEnterX1
int _sceneEnterX1
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::SceneDesc::exit1
uint16 exit1
Definition: kyra_v2.h:169
Kyra::Screen_v2
Definition: screen_v2.h:31
Kyra::KyraEngine_v2::_savedMouseState
int _savedMouseState
Definition: kyra_v2.h:300
Kyra::KyraEngine_v2::o2_setVocHigh
int o2_setVocHigh(EMCState *script)
Definition: script_v2.cpp:311
entry
Inventory::InventoryEntry * entry
Definition: action.cpp:654
Kyra::KyraEngine_v2::SceneDesc::exit3
uint16 exit3
Definition: kyra_v2.h:169
Kyra::KyraEngine_v2::EngineDesc::animScriptFrameAdd
int animScriptFrameAdd
Definition: kyra_v2.h:67
Kyra::KyraEngine_v2::engineDesc
const EngineDesc & engineDesc() const
Definition: kyra_v2.h:82
Kyra::KyraEngine_v2::SceneAnim::width
int16 width
Definition: kyra_v2.h:203
Kyra::KyraEngine_v2::SceneAnim::x2
int16 x2
Definition: kyra_v2.h:202
Kyra::KyraEngine_v2::_sceneEnterY1
int _sceneEnterY1
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::AnimObj::height2
int16 height2
Definition: kyra_v2.h:118
Kyra::KyraEngine_v2::initItemList
void initItemList(int size)
Definition: items_v2.cpp:28
Kyra::KyraEngine_v2::o2_delay
int o2_delay(EMCState *script)
Definition: script_v2.cpp:117
Kyra::KyraEngine_v2::o2_getCharacterX
int o2_getCharacterX(EMCState *script)
Definition: script_v2.cpp:31
Kyra::KyraEngine_v2::trySceneChange
virtual int trySceneChange(int *moveTable, int unk1, int unk2)=0
Kyra::KyraEngine_v2::_sceneExit3
uint16 _sceneExit3
Definition: kyra_v2.h:178
Kyra::KyraEngine_v2::setHandItem
void setHandItem(Item item) override
Definition: items_v2.cpp:84
Kyra::KyraEngine_v2::SceneAnim::y
int16 y
Definition: kyra_v2.h:201
Kyra::KyraEngine_v2::_sceneAnims
SceneAnim _sceneAnims[16]
Definition: kyra_v2.h:210
Kyra::KyraEngine_v2::flagAnimObjsForRefresh
void flagAnimObjsForRefresh()
Definition: animator_v2.cpp:127
Kyra::KyraEngine_v2::_sceneEnterX4
int _sceneEnterX4
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::SceneDesc::flags
uint8 flags
Definition: kyra_v2.h:170
Kyra::KyraEngine_v2::uninitAnimationShapes
virtual void uninitAnimationShapes(int count, uint8 *filedata)=0
Kyra::KyraEngine_v2::loadCharacterShapes
virtual void loadCharacterShapes(int shapes)=0
Kyra::Debugger_v2
Definition: debugger.h:71
Kyra::KyraEngine_v2::updateCharAnimFrame
virtual void updateCharAnimFrame(int *table)=0
Kyra::KyraEngine_v2::_sceneExit1
uint16 _sceneExit1
Definition: kyra_v2.h:178
Kyra::KyraEngine_v2::pathfinderFinializePath
void pathfinderFinializePath(int *moveTable, int unk1, int x, int y, int moveTableSize)
Definition: scene_v2.cpp:208
Kyra::KyraEngine_v2::_animDelayTime
int _animDelayTime
Definition: kyra_v2.h:241
Kyra::KyraEngine_v2::clearAnimObjects
virtual void clearAnimObjects()=0
Kyra::KyraEngine_v2::AnimObj::flags
uint16 flags
Definition: kyra_v2.h:108
Kyra::KyraEngine_v2::KyraEngine_v2
KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc)
Definition: kyra_v2.cpp:32
Kyra::KyraEngine_v2::_animShapeLastEntry
int _animShapeLastEntry
Definition: kyra_v2.h:238
Kyra::KyraEngine_v2::removeHandItem
void removeHandItem() override
Definition: items_v2.cpp:93
Kyra::KyraEngine_v2::_animShapeWidth
int _animShapeWidth
Definition: kyra_v2.h:245
Kyra::KyraEngine_v2::AnimObj::enabled
bool enabled
Definition: kyra_v2.h:104
Kyra::KyraEngine_v2::addShapeToPool
void addShapeToPool(const uint8 *data, int realIndex, int shape)
Definition: kyra_v2.cpp:173
Kyra::KyraEngine_v2::EngineDesc::characterFrameTable
const uint8 * characterFrameTable
Definition: kyra_v2.h:61
Kyra::KyraEngine_v2::_specialSceneScriptStateBackup
bool _specialSceneScriptStateBackup[10]
Definition: kyra_v2.h:216
Kyra::KyraEngine_v2::AnimObj::shapeIndex1
uint16 shapeIndex1
Definition: kyra_v2.h:111
int16
signed short int16
Definition: cdtypes.h:30
LastExpress::time
uint32 time
Definition: kronos.cpp:48
Kyra::KyraEngine_v2::updateWithText
virtual void updateWithText()=0
Kyra::KyraEngine_v2::o2_getDlgIndex
int o2_getDlgIndex(EMCState *script)
Definition: script_v2.cpp:192
Kyra::KyraEngine_v2::flagAnimObjsSpecialRefresh
void flagAnimObjsSpecialRefresh()
Definition: animator_v2.cpp:132
Kyra::KyraEngine_v2::Character::facing
uint8 facing
Definition: kyra_v2.h:321
Kyra::Item
int16 Item
Definition: item.h:30
Kyra::KyraEngine_v2::_updateCharPosNextUpdate
uint32 _updateCharPosNextUpdate
Definition: kyra_v2.h:338
Kyra::KyraEngine_v2::o2_defineItem
int o2_defineItem(EMCState *script)
Definition: script_v2.cpp:88
Kyra::ItemAnimDefinition
Definition: kyra_v2.h:41
Glk::Alan2::list
void list(Aword cnt)
Definition: exe.cpp:885
Kyra::KyraEngine_v2::getCharacterWalkspeed
virtual int getCharacterWalkspeed() const =0
Kyra::KyraEngine_v2::_sceneEnterY3
int _sceneEnterY3
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::_animNewFrame
int _animNewFrame
Definition: kyra_v2.h:240
Kyra::EMCState
Definition: script.h:47
Kyra::KyraEngine_v2::SceneAnim::filename
char filename[14]
Definition: kyra_v2.h:207
Kyra::KyraEngine_v2::_specialSceneScriptState
bool _specialSceneScriptState[10]
Definition: kyra_v2.h:215
Kyra::KyraEngine_v2::_chatTextEnabled
bool _chatTextEnabled
Definition: kyra_v2.h:350
Kyra::KyraEngine_v2::ShapeMap
Common::HashMap< int, uint8 * > ShapeMap
Definition: kyra_v2.h:255
Kyra::KyraEngine_v2::_pauseStart
uint32 _pauseStart
Definition: kyra_v2.h:87
size
u32 size
Definition: cdaudio.cpp:39
Kyra::KyraEngine_v2::o2_setHiddenItemsEntry
int o2_setHiddenItemsEntry(EMCState *script)
Definition: script_v2.cpp:283
Kyra::KyraEngine_v2::o2_setSpecialSceneScriptRunTime
int o2_setSpecialSceneScriptRunTime(EMCState *script)
Definition: script_v2.cpp:235
Kyra::KyraEngine_v2::updateCharPosWithUpdate
void updateCharPosWithUpdate()
Definition: kyra_v2.cpp:229
Kyra::KyraEngine_v2::_chatVocLow
int _chatVocLow
Definition: kyra_v2.h:349
Kyra::KyraEngine_v2::_hiddenItems
Item _hiddenItems[100]
Definition: kyra_v2.h:294
Kyra::KyraEngine_v2::_chatEndTime
uint32 _chatEndTime
Definition: kyra_v2.h:348
Kyra::FrameControl
Definition: kyra_v2.h:36
Kyra::KyraEngine_v2::_animationScriptData
EMCData _animationScriptData
Definition: kyra_v2.h:225
flags
u16 flags
Definition: zipreader.h:215
Kyra::KyraEngine_v2::SceneDesc::filename2
char filename2[10]
Definition: kyra_v2.h:167
Kyra::KyraEngine_v2::_drawNoShapeFlag
bool _drawNoShapeFlag
Definition: kyra_v2.h:130
Kyra::KyraEngine_v2::Character::y1
int16 y1
Definition: kyra_v2.h:325
Kyra::KyraEngine_v2::_animShapeFiledata
uint8 * _animShapeFiledata
Definition: kyra_v2.h:236
Kyra::KyraEngine_v2::processAnimationScript
void processAnimationScript(int allowSkip, int resetChar)
Definition: sequences_v2.cpp:77
Kyra::ItemAnimDefinition::itemIndex
Item itemIndex
Definition: kyra_v2.h:42
Kyra::KyraEngine_v2::refreshAnimObjects
virtual void refreshAnimObjects(int force)=0
Kyra::KyraEngine_v2::o2_setCharacterFacingOverwrite
int o2_setCharacterFacingOverwrite(EMCState *script)
Definition: script_v2.cpp:51
Kyra::KyraEngine_v2::pathfinderInitPositionTable
int pathfinderInitPositionTable(int *moveTable)
Definition: scene_v2.cpp:113
Kyra::KyraEngine_v2::_sceneEnterX3
int _sceneEnterX3
Definition: kyra_v2.h:179
Glk::AGT::script
void script(uchar onp)
Definition: interface.cpp:962
Kyra::KyraEngine_v2::_unk4
int _unk4
Definition: kyra_v2.h:360
Kyra::KyraEngine_v2::SceneAnim::wsaFlag
uint16 wsaFlag
Definition: kyra_v2.h:206
Kyra::KyraEngine_v2::_chatText
const char * _chatText
Definition: kyra_v2.h:346
Kyra::KyraEngine_v2::_sceneEnterY2
int _sceneEnterY2
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::_pathfinderPositionIndexTable
int _pathfinderPositionIndexTable[200]
Definition: kyra_v2.h:282
Kyra::KyraEngine_v2::_vocHigh
int _vocHigh
Definition: kyra_v2.h:344
Kyra::ItemAnimDefinition::numFrames
uint8 numFrames
Definition: kyra_v2.h:43
Kyra::KyraEngine_v2::findWay
int findWay(int curX, int curY, int dstX, int dstY, int *moveTable, int moveTableSize) override
Definition: scene_v2.cpp:83
Kyra::KyraEngine_v2::remShapeFromPool
void remShapeFromPool(int idx)
Definition: kyra_v2.cpp:183
Graphics::desc
static const BdfFontData desc
Definition: consolefont.cpp:5852
Kyra::KyraEngine_v2::setDlgIndex
virtual void setDlgIndex(int dlgIndex)=0
Kyra::KyraEngine_v2::_desc
EngineDesc _desc
Definition: kyra_v2.h:84
Kyra::KyraEngine_v2::Character::dlgIndex
int16 dlgIndex
Definition: kyra_v2.h:319
Kyra::KyraEngine_v1
Definition: kyra_v1.h:178
Kyra::KyraEngine_v2::_sceneExit4
uint16 _sceneExit4
Definition: kyra_v2.h:178
Kyra::KyraEngine_v2::Character::walkspeed
byte walkspeed
Definition: kyra_v2.h:323
y
y
Definition: soft_render_surface.inl:124
Kyra::KyraEngine_v2::updateCharacterAnim
virtual void updateCharacterAnim(int)=0
Kyra::KyraEngine_v2::_characterShapeFile
int _characterShapeFile
Definition: kyra_v2.h:263
Kyra::KyraEngine_v2::o2_update
int o2_update(EMCState *script)
Definition: script_v2.cpp:140
Kyra::KyraEngine_v2::AnimObj::xPos1
int16 xPos1
Definition: kyra_v2.h:109
Kyra::KyraEngine_v2::_currentScene
uint16 _currentScene
Definition: kyra_v2.h:176
Kyra::KyraEngine_v2::_specialExitTable
uint16 _specialExitTable[25]
Definition: kyra_v2.h:182
Kyra::KyraEngine_v2::refreshAnimObjectsIfNeed
void refreshAnimObjectsIfNeed()
Definition: animator_v2.cpp:115
count
u32 count
Definition: disc_io.c:107
Kyra::KyraEngine_v2::animSetupPaletteEntry
virtual void animSetupPaletteEntry(AnimObj *)
Definition: kyra_v2.h:155
Kyra::FrameControl::index
uint16 index
Definition: kyra_v2.h:37
OSystem
Interface for ScummVM backends.
Definition: system.h:114
Kyra::KyraEngine_v2::initAnimationShapes
virtual int initAnimationShapes(uint8 *filedata)=0
Kyra::KyraEngine_v2::_animItems
AnimObj * _animItems
Definition: kyra_v2.h:128
Kyra::KyraEngine_v2::_sceneExit2
uint16 _sceneExit2
Definition: kyra_v2.h:178
Kyra::KyraEngine_v2::deleteItemAnimEntry
void deleteItemAnimEntry(int item)
Definition: animator_v2.cpp:169
Kyra::KyraEngine_v2::_sceneAnimMovie
WSAMovie_v2 * _sceneAnimMovie[16]
Definition: kyra_v2.h:211
Kyra::KyraEngine_v2::o2_getCharacterY
int o2_getCharacterY(EMCState *script)
Definition: script_v2.cpp:36
Kyra::KyraEngine_v2::_lastProcessedSceneScript
int _lastProcessedSceneScript
Definition: kyra_v2.h:219
Kyra::KyraEngine_v2::SceneDesc::sound
uint8 sound
Definition: kyra_v2.h:171
Kyra::KyraEngine_v2::_screenBuffer
uint8 * _screenBuffer
Definition: kyra_v2.h:162
Kyra::KyraEngine_v2::update
virtual void update()=0
Kyra::KyraEngine_v2::AnimObj::animNum
uint16 animNum
Definition: kyra_v2.h:112
Kyra::KyraEngine_v2::o2_setDlgIndex
int o2_setDlgIndex(EMCState *script)
Definition: script_v2.cpp:186
Kyra::KyraEngine_v2::_mainCharY
int _mainCharY
Definition: kyra_v2.h:331
Kyra::KyraEngine_v2::o2_randomSceneChat
int o2_randomSceneChat(EMCState *script)
Definition: script_v2.cpp:180
Kyra::KyraEngine_v2::SceneAnim::shapeIndex
int16 shapeIndex
Definition: kyra_v2.h:205
Kyra::KyraEngine_v2::ItemDefinition::y
uint8 y
Definition: kyra_v2.h:289
Kyra::KyraEngine_v2::_unkHandleSceneChangeFlag
bool _unkHandleSceneChangeFlag
Definition: kyra_v2.h:362
Kyra::KyraEngine_v2::o2_getShapeFlag1
int o2_getShapeFlag1(EMCState *script)
Definition: script_v2.cpp:151
Kyra::WSAMovie_v2
Definition: wsamovie.h:113
Kyra::KyraEngine_v2::o2_getHiddenItemsEntry
int o2_getHiddenItemsEntry(EMCState *script)
Definition: script_v2.cpp:288
Kyra::KyraEngine_v2::_pathfinderPositionTable
int _pathfinderPositionTable[400]
Definition: kyra_v2.h:281
Kyra::KyraEngine_v2::EngineDesc
Definition: kyra_v2.h:58
Kyra::KyraEngine_v2::AnimObj
Definition: kyra_v2.h:101
Kyra::KyraEngine_v2::EngineDesc::itemShapeStart
int itemShapeStart
Definition: kyra_v2.h:60
Kyra::KyraEngine_v2::AnimObj::palette
uint16 palette
Definition: kyra_v2.h:119
Kyra::KyraEngine_v2::_animActor
AnimObj * _animActor
Definition: kyra_v2.h:126
uint16
unsigned short uint16
Definition: cdtypes.h:27
Kyra::KyraEngine_v2::freeSceneAnims
void freeSceneAnims()
Definition: scene_v2.cpp:29
Kyra::KyraEngine_v2::SceneAnim::specialSize
uint16 specialSize
Definition: kyra_v2.h:204
gui_v1.h
Kyra::KyraEngine_v2::resetItemList
void resetItemList()
Definition: items_v2.cpp:72
Kyra::KyraEngine_v2::_itemList
ItemDefinition * _itemList
Definition: kyra_v2.h:296
Kyra::KyraEngine_v2::AnimObj::shapePtr
uint8 * shapePtr
Definition: kyra_v2.h:110
Kyra::KyraEngine_v2::AnimObj::type
uint16 type
Definition: kyra_v2.h:103
Kyra::KyraEngine_v2::o2a_setAnimationShapes
int o2a_setAnimationShapes(EMCState *script)
Definition: script_v2.cpp:324
Kyra::KyraEngine_v2::AnimObj::xPos2
int16 xPos2
Definition: kyra_v2.h:115
Kyra::EMCData
Definition: script.h:36
Kyra::KyraEngine_v2::o2a_setResetFrame
int o2a_setResetFrame(EMCState *script)
Definition: script_v2.cpp:336
Kyra::KyraEngine_v2::_sceneSpecialScripts
EMCState _sceneSpecialScripts[10]
Definition: kyra_v2.h:217
Kyra::KyraEngine_v2::o2_querySpecialSceneScriptState
int o2_querySpecialSceneScriptState(EMCState *script)
Definition: script_v2.cpp:278
filename
Common::String filename
Definition: action.cpp:1197
Kyra::KyraEngine_v2::o2_setTimerCountdown
int o2_setTimerCountdown(EMCState *script)
Definition: script_v2.cpp:305
Kyra::KyraEngine_v2::runSceneScript6
void runSceneScript6()
Definition: scene_v2.cpp:68
Kyra::KyraEngine_v2::pauseEngineIntern
void pauseEngineIntern(bool pause) override
Actual implementation of pauseEngine by subclasses.
Definition: kyra_v2.cpp:133
Kyra::ActiveItemAnim
Definition: kyra_v2.h:47
Kyra::KyraEngine_v2::_lang
int _lang
Definition: kyra_v2.h:95
Kyra::KyraEngine_v2::addToAnimListSorted
AnimObj * addToAnimListSorted(AnimObj *list, AnimObj *entry)
Definition: animator_v2.cpp:44
Kyra::KyraEngine_v2::o2_enableTimer
int o2_enableTimer(EMCState *script)
Definition: script_v2.cpp:299
Kyra::KyraEngine_v2::AnimObj::needRefresh
uint16 needRefresh
Definition: kyra_v2.h:105
Kyra::KyraEngine_v2::o2_setSpecialSceneScriptState
int o2_setSpecialSceneScriptState(EMCState *script)
Definition: script_v2.cpp:266
Kyra::KyraEngine_v2::ItemDefinition::id
Item id
Definition: kyra_v2.h:286
Kyra::KyraEngine_v2::o2_clearSpecialSceneScriptState
int o2_clearSpecialSceneScriptState(EMCState *script)
Definition: script_v2.cpp:272
Kyra::KyraEngine_v2::_sceneEnterY4
int _sceneEnterY4
Definition: kyra_v2.h:179
Kyra::KyraEngine_v2::Character
Definition: kyra_v2.h:317
Kyra::KyraEngine_v2
Definition: kyra_v2.h:54
Kyra::KyraEngine_v2::findItem
int findItem(uint16 sceneId, Item id)
Definition: items_v2.cpp:56
Kyra::KyraEngine_v2::pathfinderInitPositionIndexTable
int pathfinderInitPositionIndexTable(int tableLen, int x, int y)
Definition: scene_v2.cpp:172