ScummVM
animator_mr.cpp
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 #include "kyra/engine/kyra_mr.h"
24 #include "kyra/resource/resource.h"
25 #include "kyra/graphics/wsamovie.h"
26 
27 #include "common/system.h"
28 
29 namespace Kyra {
30 
32  screen()->copyBlockToPage(2, 0, 0, 320, 200, _gamePlayBuffer);
33 }
34 
36  for (int i = 0; i < 67; ++i)
37  _animObjects[i].enabled = false;
38 
39  _animObjects[0].index = 0;
40  _animObjects[0].type = 0;
41  _animObjects[0].enabled = true;
43  _animObjects[0].flags = 0x800;
44  _animObjects[0].width = 57;
45  _animObjects[0].height = 91;
46  _animObjects[0].width2 = 4;
47  _animObjects[0].height2 = 10;
48 
49  for (int i = 1; i < 17; ++i) {
50  _animObjects[i].index = i;
51  _animObjects[i].type = 2;
52  _animObjects[i].flags = 0;
53  _animObjects[i].enabled = false;
56  }
57 
58  for (int i = 17; i <= 66; ++i) {
59  _animObjects[i].index = i;
60  _animObjects[i].type = 1;
62  _animObjects[i].flags = 0x800;
63  _animObjects[i].width = 24;
64  _animObjects[i].height = 20;
65  _animObjects[i].width2 = 0;
66  _animObjects[i].height2 = 0;
67  }
68 }
69 
71  int layer = _screen->getLayer(anim->xPos1, anim->yPos1) - 1;
72  int16 count = 0;
73  for (int i = 0; i < 3; ++i)
74  count += _sceneDatPalette[layer*3+i];
75  count /= 3;
76  count *= -1;
77  count = MAX<int16>(0, MIN<int16>(count, 10));
78  anim->palette = count / 3;
79 }
80 
82  for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
83  if (!curObject->enabled)
84  continue;
85 
86  int x = curObject->xPos2 - (_screen->getScreenDim(2)->sx << 3);
87  int y = curObject->yPos2 - _screen->getScreenDim(2)->sy;
88  int layer = 7;
89 
90  if (curObject->flags & 0x800) {
91  if (!curObject->specialRefresh)
92  layer = 0;
93  else
94  layer = getDrawLayer(curObject->xPos1, curObject->yPos1);
95  }
96 
97  if (curObject->index)
98  drawSceneAnimObject(curObject, x, y, layer);
99  else
100  drawCharacterAnimObject(curObject, x, y, layer);
101  }
102 }
103 
104 void KyraEngine_MR::drawSceneAnimObject(AnimObj *obj, int x, int y, int layer) {
105  if (obj->type == 1) {
106  if (obj->shapeIndex1 == 0xFFFF)
107  return;
108  int scale = getScale(obj->xPos1, obj->yPos1);
109  _screen->drawShape(2, getShapePtr(obj->shapeIndex1), x, y, 2, obj->flags | 0x104, _paletteOverlay, obj->palette, layer, scale, scale);
110  } else {
111  if (obj->shapePtr) {
112  _screen->drawShape(2, obj->shapePtr, x, y, 2, obj->flags, 7);
113  } else {
114  if (obj->shapeIndex3 == 0xFFFF || obj->animNum == 0xFFFF)
115  return;
116  uint16 flags = 0x4000;
117  if (obj->flags & 0x800)
118  flags |= 0x8000;
119  x = obj->xPos2 - _sceneAnimMovie[obj->animNum]->xAdd();
120  y = obj->yPos2 - _sceneAnimMovie[obj->animNum]->yAdd();
121  _sceneAnimMovie[obj->animNum]->displayFrame(obj->shapeIndex3, 2, x, y, flags | layer, 0, 0);
122  }
123  }
124 }
125 
126 void KyraEngine_MR::drawCharacterAnimObject(AnimObj *obj, int x, int y, int layer) {
127  if (_drawNoShapeFlag)
128  return;
129 
130  if (_mainCharacter.animFrame < 9)
132 
133  if (obj->shapeIndex1 == 0xFFFF || _mainCharacter.animFrame == 87)
134  return;
135 
138  if (shape)
139  _screen->drawShape(2, shape, x, y, 2, obj->flags | 4, layer, _charScale, _charScale);
140 }
141 
143  for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
144  if (!curObject->enabled)
145  continue;
146  if (!curObject->needRefresh && !force)
147  continue;
148 
149  const int scale = (curObject->index == 0) ? _charScale : 0;
150 
151  int x = curObject->xPos2 - curObject->width2;
152  if (scale)
153  x -= (0x100 - scale) >> 4;
154 
155  if (x < 0)
156  x = 0;
157  if (x >= 320)
158  x = 319;
159 
160  int y = curObject->yPos2 - curObject->height2;
161  if (scale)
162  y -= (0x100 - scale) >> 3;
163  if (y < 0)
164  y = 0;
165  if (y >= 187)
166  y = 186;
167 
168  int width = curObject->width + curObject->width2 + 8;
169  int height = curObject->height + curObject->height2*2;
170  if (width + x > 320)
171  width -= width + x - 322;
172 
173  const int maxY = _inventoryState ? 143 : 187;
174  if (height + y > maxY)
175  height -= height + y - (maxY + 1);
176 
177  if (height > 0) {
179  }
180 
181  curObject->needRefresh = false;
182  }
183 }
184 
186  bool nextFrame = false;
187 
188  if (_itemAnimDefinition[0].itemIndex == -1)
189  return;
190 
193  _nextAnimItem = (_nextAnimItem + 1) % 10;
194 
195  if (_system->getMillis() < a->nextFrameTime)
196  return;
197 
198  uint16 shpIdx = s->frames[a->currentFrame].index + 248;
200  nextFrame = true;
201  _screen->setMouseCursor(12, 19, getShapePtr(shpIdx));
202  }
203 
204  if (_inventoryState) {
205  for (int i = 0; i < 10; i++) {
206  if (s->itemIndex == _mainCharacter.inventory[i]) {
207  nextFrame = true;
208  _screen->drawShape(2, getShapePtr(422 + i), 9, 0, 0, 0);
209  _screen->drawShape(2, getShapePtr(shpIdx), 9, 0, 0, 0);
210  _screen->copyRegion(9, 0, _inventoryX[i], _inventoryY[i], 24, 20, 2, 0, Screen::CR_NO_P_CHECK);
211  }
212  }
213  }
214 
216 
217  for (int i = 17; i < 66; i++) {
218  AnimObj *animObject = &_animObjects[i];
219  if (animObject->shapeIndex2 == s->itemIndex + 248) {
220  animObject->shapePtr = getShapePtr(shpIdx);
221  animObject->shapeIndex1 = shpIdx;
222  animObject->needRefresh = true;
223  nextFrame = true;
224  }
225  }
226 
227  if (nextFrame) {
229  a->currentFrame = (a->currentFrame + 1) % s->numFrames;
230  }
231 }
232 
234  AnimObj *obj = &_animObjects[0];
235  obj->needRefresh = true;
236  obj->flags &= ~1;
237  obj->xPos1 = _mainCharacter.x1;
238  obj->yPos1 = _mainCharacter.y1;
241 
242  int shapeOffsetX = 0, shapeOffsetY = 0;
243  if (_mainCharacter.animFrame >= 50 && _mainCharacter.animFrame <= 87) {
244  shapeOffsetX = _malcolmShapeXOffset;
245  shapeOffsetY = _malcolmShapeYOffset;
246  } else {
247  shapeOffsetX = _animShapeXAdd;
248  shapeOffsetY = _animShapeYAdd;
249  }
250 
251  obj->xPos2 = _mainCharacter.x1;
252  obj->yPos2 = _mainCharacter.y1;
254  obj->xPos2 += (shapeOffsetX * _charScale) >> 8;
255  obj->yPos2 += (shapeOffsetY * _charScale) >> 8;
258  if (_charBackUpWidth2 == -1) {
259  obj->width2 = 4;
260  obj->height2 = 10;
261  }
262 
263  for (int i = 1; i <= 16; ++i) {
264  if (_animObjects[i].enabled && _animObjects[i].specialRefresh)
265  _animObjects[i].needRefresh = true;
266  }
267 
269  if (_animList)
271  else
273 
274  if (!_loadingState)
275  updateCharPal(1);
276 }
277 
279  AnimObj *animObject = &_animObjects[1+anim];
280  if (!animObject->enabled)
281  return;
282 
283  animObject->needRefresh = true;
284 
285  if (_sceneAnims[anim].flags & 2)
286  animObject->flags |= 1;
287  else
288  animObject->flags &= ~1;
289 
290  if (_sceneAnims[anim].flags & 4) {
291  animObject->shapePtr = _sceneShapes[newFrame];
292  animObject->shapeIndex2 = 0xFFFF;
293  animObject->shapeIndex3 = 0xFFFF;
294  animObject->animNum = 0xFFFF;
295  } else {
296  animObject->shapePtr = 0;
297  animObject->shapeIndex3 = newFrame;
298  animObject->animNum = anim;
299  }
300 
301  animObject->xPos1 = _sceneAnims[anim].x;
302  animObject->yPos1 = _sceneAnims[anim].y;
303  animObject->xPos2 = _sceneAnims[anim].x2;
304  animObject->yPos2 = _sceneAnims[anim].y2;
305 
306  if (_sceneAnims[anim].flags & 0x20) {
307  _animList = deleteAnimListEntry(_animList, animObject);
308  if (!_animList)
309  _animList = initAnimList(_animList, animObject);
310  else
311  _animList = addToAnimListSorted(_animList, animObject);
312  }
313 }
314 
315 void KyraEngine_MR::setupSceneAnimObject(int animId, uint16 flags, int x, int y, int x2, int y2, int w,
316  int h, int unk10, int specialSize, int unk14, int shape, const char *filename) {
317  restorePage3();
318  SceneAnim &anim = _sceneAnims[animId];
319  anim.flags = flags;
320  anim.x = x;
321  anim.y = y;
322  anim.x2 = x2;
323  anim.y2 = y2;
324  anim.width = w;
325  anim.height = h;
326  anim.specialSize = specialSize;
327  anim.shapeIndex = shape;
328  if (filename)
329  strcpy(anim.filename, filename);
330 
331  if (flags & 8) {
332  _sceneAnimMovie[animId]->open(filename, 1, 0);
333  if (_sceneAnimMovie[animId]->opened()) {
334  anim.wsaFlag = 1;
335  if (x2 == -1)
336  x2 = _sceneAnimMovie[animId]->xAdd();
337  if (y2 == -1)
338  y2 = _sceneAnimMovie[animId]->yAdd();
339  if (w == -1)
340  w = _sceneAnimMovie[animId]->width();
341  if (h == -1)
342  h = _sceneAnimMovie[animId]->height();
343  if (x == -1)
344  x = (w >> 1) + x2;
345  if (y == -1)
346  y = y2 + h - 1;
347 
348  anim.x = x;
349  anim.y = y;
350  anim.x2 = x2;
351  anim.y2 = y2;
352  anim.width = w;
353  anim.height = h;
354  }
355  }
356 
357  AnimObj *obj = &_animObjects[1+animId];
358  obj->enabled = true;
359  obj->needRefresh = true;
360 
361  obj->specialRefresh = (anim.flags & 0x20) ? 1 : 0;
362  obj->flags = (anim.flags & 0x10) ? 0x800 : 0;
363  if (anim.flags & 2)
364  obj->flags |= 1;
365 
366  obj->xPos1 = anim.x;
367  obj->yPos1 = anim.y;
368 
369  if ((anim.flags & 4) && anim.shapeIndex != -1)
370  obj->shapePtr = _sceneShapes[anim.shapeIndex];
371  else
372  obj->shapePtr = 0;
373 
374  if (anim.flags & 8) {
375  obj->shapeIndex3 = anim.shapeIndex;
376  obj->animNum = animId;
377  } else {
378  obj->shapeIndex3 = 0xFFFF;
379  obj->animNum = 0xFFFF;
380  }
381 
382  obj->xPos3 = obj->xPos2 = anim.x2;
383  obj->yPos3 = obj->yPos2 = anim.y2;
384  obj->width = anim.width;
385  obj->height = anim.height;
386  obj->width2 = obj->height2 = anim.specialSize;
387 
388  if (_animList)
390  else
392 }
393 
394 void KyraEngine_MR::removeSceneAnimObject(int anim, int refresh) {
395  AnimObj *obj = &_animObjects[anim+1];
396  restorePage3();
397  obj->shapeIndex3 = 0xFFFF;
398  obj->animNum = 0xFFFF;
399  obj->needRefresh = true;
400 
401  if (refresh)
403 
404  obj->enabled = false;
406  _sceneAnimMovie[anim]->close();
407 }
408 
410  restorePage3();
415 
416  _animObjects[0].width2 = (w - _charBackUpWidth) / 2;
418  _animObjects[0].width = w;
419  _animObjects[0].height = h;
420 }
421 
423  restorePage3();
430 }
431 
433  if (_mainCharacter.sceneId == 20 || _mainCharacter.sceneId == 21
434  || _mainCharacter.sceneId == 12 || _mainCharacter.sceneId == 11)
435  return;
436 
437  if (_mainCharacter.animFrame == 87)
438  return;
439 
441  randomSceneChat();
442  } else {
443  static const char *const facingTable[] = {
444  "A", "R", "R", "FR", "FX", "FL", "L", "L"
445  };
446 
448 
449  if (_res->exists(filename.c_str()))
450  runAnimationScript(filename.c_str(), 1, 1, 1, 1);
451  }
452 
454 }
455 
456 } // End of namespace Kyra
Kyra::KyraEngine_MR::restorePage3
void restorePage3() override
Definition: animator_mr.cpp:31
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::KyraEngine_MR::_itemAnimDefinition
const ItemAnimDefinition * _itemAnimDefinition
Definition: kyra_mr.h:222
Kyra::KyraEngine_MR::animSetupPaletteEntry
void animSetupPaletteEntry(AnimObj *anim) override
Definition: animator_mr.cpp:70
Kyra::KyraEngine_v2::SceneAnim::flags
uint16 flags
Definition: kyra_v2.h:200
Kyra::ActiveItemAnim::nextFrameTime
uint32 nextFrameTime
Definition: kyra_v2.h:49
Kyra::KyraEngine_v1::_mouseState
int _mouseState
Definition: kyra_v1.h:348
Kyra::KyraEngine_v2::AnimObj::shapeIndex2
uint16 shapeIndex2
Definition: kyra_v2.h:114
Kyra::KyraEngine_MR::getScale
int getScale(int x, int y) override
Definition: kyra_mr.cpp:1218
Kyra::KyraEngine_v2::SceneAnim
Definition: kyra_v2.h:199
Glk::Level9::scale
int scale
Definition: level9_main.cpp:117
Kyra::KyraEngine_v2::Character::inventory
Item inventory[20]
Definition: kyra_v2.h:324
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::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_MR::removeSceneAnimObject
void removeSceneAnimObject(int anim, int refresh)
Definition: animator_mr.cpp:394
Kyra::KyraEngine_v2::AnimObj::specialRefresh
uint16 specialRefresh
Definition: kyra_v2.h:106
kyra_mr.h
x
x
Definition: soft_render_surface.inl:123
Kyra::KyraEngine_MR::clearAnimObjects
void clearAnimObjects() override
Definition: animator_mr.cpp:35
Kyra::KyraEngine_v2::_charScale
int _charScale
Definition: kyra_v2.h:332
wsamovie.h
Kyra::KyraEngine_v2::_animObjects
AnimObj * _animObjects
Definition: kyra_v2.h:124
Kyra::WSAMovie_v2::yAdd
int yAdd() const override
Definition: wsamovie.h:123
Kyra::KyraEngine_MR::refreshAnimObjects
void refreshAnimObjects(int force) override
Definition: animator_mr.cpp:142
Kyra::KyraEngine_v2::AnimObj::xPos3
int16 xPos3
Definition: kyra_v2.h:116
Engine::_system
OSystem * _system
Definition: engine.h:62
Kyra::KyraEngine_v2::_mainCharacter
Character _mainCharacter
Definition: kyra_v2.h:330
Kyra::KyraEngine_v2::AnimObj::yPos3
int16 yPos3
Definition: kyra_v2.h:116
Kyra::ScreenDim::sx
uint16 sx
Definition: screen.h:49
Kyra::KyraEngine_MR::updateItemAnimations
void updateItemAnimations()
Definition: animator_mr.cpp:185
Common::String
Simple string class for ScummVM.
Definition: str.h:49
Kyra::KyraEngine_v2::Character::x3
int16 x3
Definition: kyra_v2.h:327
Kyra::KyraEngine_v2::Character::sceneId
uint16 sceneId
Definition: kyra_v2.h:318
height
uint16 height
Definition: thumbnail.cpp:41
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::Screen::drawShape
virtual void drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags,...)
Definition: screen.cpp:1492
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::_animShapeXAdd
int _animShapeXAdd
Definition: kyra_v2.h:246
Glk::Alan3::newFrame
void newFrame(Stack theStack, Aint noOfLocals)
Definition: stack.cpp:111
Kyra::KyraEngine_v2::AnimObj::shapeIndex3
uint16 shapeIndex3
Definition: kyra_v2.h:113
Kyra::KyraEngine_v2::_animShapeYAdd
int _animShapeYAdd
Definition: kyra_v2.h:246
Kyra::WSAMovie_v2::xAdd
int xAdd() const override
Definition: wsamovie.h:122
Kyra::KyraEngine_MR::_gamePlayBuffer
uint8 * _gamePlayBuffer
Definition: kyra_mr.h:192
Kyra::KyraEngine_MR::_screen
Screen_MR * _screen
Definition: kyra_mr.h:82
Kyra::KyraEngine_v2::deleteAnimListEntry
AnimObj * deleteAnimListEntry(AnimObj *list, AnimObj *entry)
Definition: animator_v2.cpp:75
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::_animList
AnimObj * _animList
Definition: kyra_v2.h:131
Kyra::KyraEngine_v2::_itemInHand
int _itemInHand
Definition: kyra_v2.h:299
Kyra::KyraEngine_MR::screen
Screen * screen() override
Definition: kyra_mr.h:55
Kyra::KyraEngine_v2::SceneAnim::height
int16 height
Definition: kyra_v2.h:203
width
uint16 width
Definition: thumbnail.cpp:41
Kyra::KyraEngine_MR::getDrawLayer
int getDrawLayer(int x, int y)
Definition: kyra_mr.cpp:1212
Kyra::Screen::getScreenDim
const ScreenDim * getScreenDim(int dim) const
Definition: screen.cpp:488
Kyra::KyraEngine_v2::SceneAnim::x
int16 x
Definition: kyra_v2.h:201
Kyra::KyraEngine_v1::_res
Resource * _res
Definition: kyra_v1.h:263
Kyra::KyraEngine_MR::_charBackUpWidth
int _charBackUpWidth
Definition: kyra_mr.h:214
Kyra::KyraEngine_v2::SceneAnim::y2
int16 y2
Definition: kyra_v2.h:202
Kyra::KyraEngine_v2::AnimObj::index
uint16 index
Definition: kyra_v2.h:102
uint8
unsigned char uint8
Definition: cdtypes.h:28
Kyra::KyraEngine_v2::AnimObj::height
int16 height
Definition: kyra_v2.h:117
Kyra::KyraEngine_MR::setCharacterAnimDim
void setCharacterAnimDim(int w, int h) override
Definition: animator_mr.cpp:409
Kyra::FrameControl::delay
uint16 delay
Definition: kyra_v2.h:38
Kyra::KyraEngine_v2::AnimObj::nextObject
AnimObj * nextObject
Definition: kyra_v2.h:120
Kyra::KyraEngine_MR::talkObjectsInCurScene
bool talkObjectsInCurScene()
Definition: kyra_mr.cpp:1278
Kyra::ItemAnimDefinition::frames
const FrameControl * frames
Definition: kyra_v2.h:44
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_MR::resetCharacterAnimDim
void resetCharacterAnimDim() override
Definition: animator_mr.cpp:422
Kyra::KyraEngine_v2::AnimObj::height2
int16 height2
Definition: kyra_v2.h:118
Kyra::KyraEngine_MR::updateCharacterAnim
void updateCharacterAnim(int charId) override
Definition: animator_mr.cpp:233
Kyra::KyraEngine_MR::showIdleAnim
void showIdleAnim()
Definition: animator_mr.cpp:432
Kyra::KyraEngine_v2::SceneAnim::y
int16 y
Definition: kyra_v2.h:201
Kyra::KyraEngine_v2::_sceneAnims
SceneAnim _sceneAnims[16]
Definition: kyra_v2.h:210
OSystem::getMillis
virtual uint32 getMillis(bool skipRecord=false)=0
Get the number of milliseconds since the program was started.
Kyra::WSAMovie_v1::height
int height() const override
Definition: wsamovie.h:67
Kyra::KyraEngine_MR::setupSceneAnimObject
void setupSceneAnimObject(int anim, uint16 flags, int x, int y, int x2, int y2, int w, int h, int unk10, int specialSize, int unk14, int shape, const char *filename)
Definition: animator_mr.cpp:315
Kyra::KyraEngine_v2::AnimObj::flags
uint16 flags
Definition: kyra_v2.h:108
Kyra::WSAMovie_v2::open
int open(const char *filename, int unk1, Palette *palette) override
Definition: wsamovie.cpp:364
Kyra::KyraEngine_MR::_nextIdleType
bool _nextIdleType
Definition: kyra_mr.h:219
Common::String::format
static String format(const char *fmt,...) GCC_PRINTF(1
Print formatted data into a String object.
Definition: str.cpp:641
Kyra::KyraEngine_v2::AnimObj::enabled
bool enabled
Definition: kyra_v2.h:104
Neverhood::x2
int16 x2
Definition: module1400_sprites.cpp:667
Kyra::KyraEngine_MR::updateSceneAnim
void updateSceneAnim(int anim, int newFrame) override
Definition: animator_mr.cpp:278
Kyra::KyraEngine_v2::AnimObj::shapeIndex1
uint16 shapeIndex1
Definition: kyra_v2.h:111
Kyra::KyraEngine_MR::_inventoryY
static const uint8 _inventoryY[]
Definition: kyra_mr.h:259
int16
signed short int16
Definition: cdtypes.h:30
Kyra::KyraEngine_v2::Character::facing
uint8 facing
Definition: kyra_v2.h:321
Kyra::Screen::copyBlockToPage
void copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src)
Definition: screen.cpp:1058
Kyra::KyraEngine_MR::drawSceneAnimObject
void drawSceneAnimObject(AnimObj *obj, int x, int y, int drawLayer) override
Definition: animator_mr.cpp:104
Kyra::ItemAnimDefinition
Definition: kyra_v2.h:41
Kyra::KyraEngine_v2::SceneAnim::filename
char filename[14]
Definition: kyra_v2.h:207
Kyra::KyraEngine_MR::_nextAnimItem
int _nextAnimItem
Definition: kyra_mr.h:224
Kyra::WSAMovie_v1::width
int width() const override
Definition: wsamovie.h:66
flags
u16 flags
Definition: zipreader.h:215
Kyra::KyraEngine_v2::_drawNoShapeFlag
bool _drawNoShapeFlag
Definition: kyra_v2.h:130
Kyra::KyraEngine_v2::Character::y1
int16 y1
Definition: kyra_v2.h:325
Kyra::ItemAnimDefinition::itemIndex
Item itemIndex
Definition: kyra_v2.h:42
Kyra::KyraEngine_MR::_sceneDatPalette
int8 _sceneDatPalette[45]
Definition: kyra_mr.h:368
Kyra::KyraEngine_MR::_malcolmShapeXOffset
int _malcolmShapeXOffset
Definition: kyra_mr.h:323
Kyra::Screen::isMouseVisible
bool isMouseVisible() const
Definition: screen.cpp:2998
Kyra::Screen::updateScreen
void updateScreen()
Definition: screen.cpp:339
Kyra::KyraEngine_v2::SceneAnim::wsaFlag
uint16 wsaFlag
Definition: kyra_v2.h:206
Kyra::ItemAnimDefinition::numFrames
uint8 numFrames
Definition: kyra_v2.h:43
Kyra::KyraEngine_MR::_malcolmShapeYOffset
int _malcolmShapeYOffset
Definition: kyra_mr.h:323
Kyra::KyraEngine_MR::_charBackUpHeight2
int _charBackUpHeight2
Definition: kyra_mr.h:213
Kyra::KyraEngine_MR::_sceneShapes
uint8 * _sceneShapes[20]
Definition: kyra_mr.h:333
Kyra::KyraEngine_MR::_loadingState
bool _loadingState
Definition: kyra_mr.h:205
system.h
y
y
Definition: soft_render_surface.inl:124
Kyra::KyraEngine_v2::_characterShapeFile
int _characterShapeFile
Definition: kyra_v2.h:263
Kyra::KyraEngine_MR::_activeItemAnim
ActiveItemAnim _activeItemAnim[10]
Definition: kyra_mr.h:223
Kyra::KyraEngine_v1::_tickLength
uint16 _tickLength
Definition: kyra_v1.h:312
Kyra::KyraEngine_v2::AnimObj::xPos1
int16 xPos1
Definition: kyra_v2.h:109
Kyra::KyraEngine_MR::drawCharacterAnimObject
void drawCharacterAnimObject(AnimObj *obj, int x, int y, int drawLayer) override
Definition: animator_mr.cpp:126
Kyra::KyraEngine_v2::refreshAnimObjectsIfNeed
void refreshAnimObjectsIfNeed()
Definition: animator_v2.cpp:115
count
u32 count
Definition: disc_io.c:107
Kyra::KyraEngine_MR::_paletteOverlay
uint8 * _paletteOverlay
Definition: kyra_mr.h:505
Kyra::FrameControl::index
uint16 index
Definition: kyra_v2.h:37
Kyra::KyraEngine_v2::_sceneAnimMovie
WSAMovie_v2 * _sceneAnimMovie[16]
Definition: kyra_v2.h:211
Kyra::KyraEngine_v2::AnimObj::animNum
uint16 animNum
Definition: kyra_v2.h:112
Kyra::KyraEngine_v2::SceneAnim::shapeIndex
int16 shapeIndex
Definition: kyra_v2.h:205
Kyra::ScreenDim::sy
uint16 sy
Definition: screen.h:50
Kyra::WSAMovie_v1::close
void close() override
Definition: wsamovie.cpp:126
Kyra::KyraEngine_v2::AnimObj
Definition: kyra_v2.h:101
Kyra::KyraEngine_v2::AnimObj::palette
uint16 palette
Definition: kyra_v2.h:119
uint16
unsigned short uint16
Definition: cdtypes.h:27
Kyra::KyraEngine_v2::SceneAnim::specialSize
uint16 specialSize
Definition: kyra_v2.h:204
Kyra::WSAMovie_v2::displayFrame
void displayFrame(int frameNum, int pageNum, int x, int y, uint16 flags, const uint8 *table1, const uint8 *table2) override
Definition: wsamovie.h:118
resource.h
Kyra::Screen::copyRegion
void copyRegion(int x1, int y1, int x2, int y2, int w, int h, int srcPage, int dstPage, int flags=0)
Definition: screen.cpp:961
if
if(!(yy_init))
Definition: lingo-lex.cpp:1069
Kyra::Screen::setMouseCursor
virtual void setMouseCursor(int x, int y, const byte *shape)
Definition: screen.cpp:3009
Kyra::KyraEngine_MR::_charBackUpHeight
int _charBackUpHeight
Definition: kyra_mr.h:214
Kyra::KyraEngine_MR::updateCharPal
void updateCharPal(int unk1)
Definition: kyra_mr.cpp:833
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::AnimObj::xPos2
int16 xPos2
Definition: kyra_v2.h:115
Kyra::KyraEngine_MR::_inventoryState
bool _inventoryState
Definition: kyra_mr.h:244
Kyra::KyraEngine_MR::_charBackUpWidth2
int _charBackUpWidth2
Definition: kyra_mr.h:213
Kyra::Screen_MR::getLayer
int getLayer(int x, int y) override
Definition: screen_mr.cpp:35
filename
Common::String filename
Definition: action.cpp:1197
Kyra::ActiveItemAnim
Definition: kyra_v2.h:47
Kyra::KyraEngine_v2::addToAnimListSorted
AnimObj * addToAnimListSorted(AnimObj *list, AnimObj *entry)
Definition: animator_v2.cpp:44
Kyra::KyraEngine_MR::drawAnimObjects
void drawAnimObjects() override
Definition: animator_mr.cpp:81
Kyra::KyraEngine_v2::AnimObj::needRefresh
uint16 needRefresh
Definition: kyra_v2.h:105
Kyra::KyraEngine_MR::randomSceneChat
void randomSceneChat() override
Definition: text_mr.cpp:831
Kyra::Screen::CR_NO_P_CHECK
Definition: screen.h:364
Kyra::KyraEngine_MR::_inventoryX
static const uint8 _inventoryX[]
Definition: kyra_mr.h:258
Common::String::c_str
const char * c_str() const
Definition: str.h:206
Kyra::Resource::exists
bool exists(const char *file, bool errorOutOnFail=false)
Definition: resource.cpp:308