diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/animator.cpp | 27 | ||||
-rw-r--r-- | engines/kyra/animator.h | 2 | ||||
-rw-r--r-- | engines/kyra/gui.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/items.cpp | 128 | ||||
-rw-r--r-- | engines/kyra/kyra.cpp | 40 | ||||
-rw-r--r-- | engines/kyra/kyra.h | 11 | ||||
-rw-r--r-- | engines/kyra/scene.cpp | 6 | ||||
-rw-r--r-- | engines/kyra/screen.cpp | 24 | ||||
-rw-r--r-- | engines/kyra/screen.h | 4 | ||||
-rw-r--r-- | engines/kyra/sequences_v1.cpp | 26 | ||||
-rw-r--r-- | engines/kyra/staticres.cpp | 50 | ||||
-rw-r--r-- | engines/kyra/timer.cpp | 8 |
12 files changed, 172 insertions, 160 deletions
diff --git a/engines/kyra/animator.cpp b/engines/kyra/animator.cpp index 443287438d..ba6ded002c 100644 --- a/engines/kyra/animator.cpp +++ b/engines/kyra/animator.cpp @@ -39,10 +39,17 @@ ScreenAnimator::ScreenAnimator(KyraEngine *vm, OSystem *system) { _system = system; _screenObjects = _actors = _items = _sprites = _objectQueue = 0; _noDrawShapesFlag = 0; + + _actorBkgBackUp[0] = new uint8[_screen->getRectSize(8, 69)]; + memset(_actorBkgBackUp[0], 0, _screen->getRectSize(8, 69)); + _actorBkgBackUp[1] = new uint8[_screen->getRectSize(8, 69)]; + memset(_actorBkgBackUp[1], 0, _screen->getRectSize(8, 69)); } ScreenAnimator::~ScreenAnimator() { close(); + delete [] _actorBkgBackUp[0]; + delete [] _actorBkgBackUp[1]; } void ScreenAnimator::init(int actors_, int items_, int sprites_) { @@ -72,7 +79,7 @@ void ScreenAnimator::initAnimStateList() { animStates[0].index = 0; animStates[0].active = 1; animStates[0].flags = 0x800; - animStates[0].background = _vm->_shapes[2]; + animStates[0].background = _actorBkgBackUp[0]; animStates[0].rectSize = _screen->getRectSize(4, 48); animStates[0].width = 4; animStates[0].height = 48; @@ -83,7 +90,7 @@ void ScreenAnimator::initAnimStateList() { animStates[i].index = i; animStates[i].active = 0; animStates[i].flags = 0x800; - animStates[i].background = _vm->_shapes[3]; + animStates[i].background = _actorBkgBackUp[1]; animStates[i].rectSize = _screen->getRectSize(4, 64); animStates[i].width = 4; animStates[i].height = 48; @@ -100,7 +107,7 @@ void ScreenAnimator::initAnimStateList() { for (int i = 16; i < 28; ++i) { animStates[i].index = i; animStates[i].flags = 0; - animStates[i].background = _vm->_shapes[349+i]; + animStates[i].background = _vm->_shapes[345+i]; animStates[i].rectSize = _screen->getRectSize(3, 24); animStates[i].width = 3; animStates[i].height = 16; @@ -294,14 +301,14 @@ void ScreenAnimator::prepDrawAllObjects() { if (!(flagUnk3 & 0x100) && (flagUnk2 & 0x4000)) { tempFlags = curObject->flags & 1; tempFlags |= 0x900 | flagUnk1 | 0x4000; - _screen->drawShape(drawPage, _vm->_shapes[4+shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY); + _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY); } else { if (!(flagUnk2 & 0x4000)) { tempFlags = curObject->flags & 1; tempFlags |= 0x900 | flagUnk1; } - _screen->drawShape(drawPage, _vm->_shapes[4+shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); + _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); } } } else { @@ -309,7 +316,7 @@ void ScreenAnimator::prepDrawAllObjects() { int tempFlags = 0; if (curObject->flags & 1) tempFlags = 1; - _screen->drawShape(drawPage, _vm->_shapes[4+shapesIndex], xpos, ypos, 2, tempFlags | 0x800, drawLayer); + _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 0x800, drawLayer); } } } @@ -428,7 +435,7 @@ void ScreenAnimator::animAddGameItem(int index, uint16 sceneId) { animObj->refreshFlag = 1; animObj->bkgdChangeFlag = 1; animObj->drawY = currentRoom->itemsYPos[index]; - animObj->sceneAnimPtr = _vm->_shapes[220+currentRoom->itemsTable[index]]; + animObj->sceneAnimPtr = _vm->_shapes[216+currentRoom->itemsTable[index]]; animObj->animFrameNumber = -1; animObj->x1 = currentRoom->itemsXPos[index]; animObj->y1 = currentRoom->itemsYPos[index]; @@ -454,7 +461,7 @@ void ScreenAnimator::animAddNPC(int character) { animObj->refreshFlag = 1; animObj->bkgdChangeFlag = 1; animObj->drawY = ch->y1; - animObj->sceneAnimPtr = _vm->_shapes[4+ch->currentAnimFrame]; + animObj->sceneAnimPtr = _vm->_shapes[ch->currentAnimFrame]; animObj->x1 = animObj->x2 = ch->x1 + _vm->_defaultShapeTable[ch->currentAnimFrame-7].xOffset; animObj->y1 = animObj->y2 = ch->y1 + _vm->_defaultShapeTable[ch->currentAnimFrame-7].yOffset; @@ -609,7 +616,7 @@ void ScreenAnimator::animRefreshNPC(int character) { animObj->flags &= 0xFFFFFFFE; animObj->drawY = ch->y1; - animObj->sceneAnimPtr = _vm->shapes()[4+ch->currentAnimFrame]; + animObj->sceneAnimPtr = _vm->shapes()[ch->currentAnimFrame]; animObj->animFrameNumber = ch->currentAnimFrame; if (character == 0) { if (_vm->brandonStatus() & 10) { @@ -619,7 +626,7 @@ void ScreenAnimator::animRefreshNPC(int character) { if (_vm->brandonStatus() & 2) { animObj->animFrameNumber = _brandonDrawFrame; ch->currentAnimFrame = _brandonDrawFrame; - animObj->sceneAnimPtr = _vm->shapes()[4+_brandonDrawFrame]; + animObj->sceneAnimPtr = _vm->shapes()[_brandonDrawFrame]; if (_vm->_brandonStatusBit0x02Flag) { ++_brandonDrawFrame; // TODO: check this diff --git a/engines/kyra/animator.h b/engines/kyra/animator.h index 09a4ec9303..e21a2b52fd 100644 --- a/engines/kyra/animator.h +++ b/engines/kyra/animator.h @@ -109,6 +109,8 @@ protected: AnimObject *_items; AnimObject *_sprites; + uint8 *_actorBkgBackUp[2]; + AnimObject *objectRemoveQueue(AnimObject *queue, AnimObject *rem); AnimObject *objectAddHead(AnimObject *queue, AnimObject *head); AnimObject *objectQueue(AnimObject *queue, AnimObject *add); diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 0cb7f873be..7d6a881ba0 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -173,7 +173,7 @@ int KyraEngine::buttonInventoryCallback(Button *caller) { snd_playSoundEffect(0x35); _screen->hideMouse(); _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12); - _screen->drawShape(0, _shapes[220+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); + _screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); setMouseItem(inventoryItem); updateSentenceCommand(_itemList[inventoryItem], _takenList[1], 179); _screen->showMouse(); @@ -182,8 +182,8 @@ int KyraEngine::buttonInventoryCallback(Button *caller) { } else { snd_playSoundEffect(0x32); _screen->hideMouse(); - _screen->drawShape(0, _shapes[220+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); + _screen->setMouseCursor(1, 1, _shapes[0]); updateSentenceCommand(_itemList[_itemInHand], _placedList[0], 179); _screen->showMouse(); _currentCharacter->inventoryItems[itemOffset] = _itemInHand; diff --git a/engines/kyra/items.cpp b/engines/kyra/items.cpp index ee011affb3..9e0330583d 100644 --- a/engines/kyra/items.cpp +++ b/engines/kyra/items.cpp @@ -183,7 +183,7 @@ void KyraEngine::createMouseItem(int item) { void KyraEngine::destroyMouseItem() { debugC(9, kDebugLevelMain, "KyraEngine::destroyMouseItem()"); _screen->hideMouse(); - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->setMouseCursor(1, 1, _shapes[0]); _itemInHand = -1; _screen->showMouse(); } @@ -191,9 +191,9 @@ void KyraEngine::destroyMouseItem() { void KyraEngine::setMouseItem(int item) { debugC(9, kDebugLevelMain, "KyraEngine::setMouseItem(%d)", item); if (item == -1) - _screen->setMouseCursor(1, 1, _shapes[10]); + _screen->setMouseCursor(1, 1, _shapes[6]); else - _screen->setMouseCursor(8, 15, _shapes[220+item]); + _screen->setMouseCursor(8, 15, _shapes[216+item]); } void KyraEngine::wipeDownMouseItem(int xpos, int ypos) { @@ -203,22 +203,22 @@ void KyraEngine::wipeDownMouseItem(int xpos, int ypos) { xpos -= 8; ypos -= 15; _screen->hideMouse(); - _screen->backUpRect1(xpos, ypos); + backUpItemRect1(xpos, ypos); int y = ypos; int height = 16; while (height >= 0) { - _screen->restoreRect1(xpos, ypos); - _screen->setNewShapeHeight(_shapes[220+_itemInHand], height); + restoreItemRect1(xpos, ypos); + _screen->setNewShapeHeight(_shapes[216+_itemInHand], height); uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, _shapes[220+_itemInHand], xpos, y, 0, 0); + _screen->drawShape(0, _shapes[216+_itemInHand], xpos, y, 0, 0); _screen->updateScreen(); y += 2; height -= 2; delayUntil(nextTime); } - _screen->restoreRect1(xpos, ypos); - _screen->resetShapeHeight(_shapes[220+_itemInHand]); + restoreItemRect1(xpos, ypos); + _screen->resetShapeHeight(_shapes[216+_itemInHand]); destroyMouseItem(); _screen->showMouse(); } @@ -523,18 +523,18 @@ void KyraEngine::itemDropDown(int x, int y, int destX, int destY, byte freeItem, int drawX = x - 8; int drawY = 0; - _screen->backUpRect0(drawX, y - 16); + backUpItemRect0(drawX, y - 16); while (tempY < destY) { - _screen->restoreRect0(drawX, tempY - 16); + restoreItemRect0(drawX, tempY - 16); tempY += addY; if (tempY > destY) tempY = destY; ++addY; drawY = tempY - 16; - _screen->backUpRect0(drawX, drawY); + backUpItemRect0(drawX, drawY); uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, _shapes[220+item], drawX, drawY, 0, 0); + _screen->drawShape(0, _shapes[216+item], drawX, drawY, 0, 0); _screen->updateScreen(); delayUntil(nextTime); } @@ -561,7 +561,7 @@ void KyraEngine::itemDropDown(int x, int y, int destX, int destY, byte freeItem, while (--startAddY) { drawX = (unkX >> 4) - 8; drawY = tempY - 16; - _screen->restoreRect0(drawX, drawY); + restoreItemRect0(drawX, drawY); tempY += addY; unkX += xDiff; if (tempY > destY) @@ -569,15 +569,15 @@ void KyraEngine::itemDropDown(int x, int y, int destX, int destY, byte freeItem, ++addY; drawX = (unkX >> 4) - 8; drawY = tempY - 16; - _screen->backUpRect0(drawX, drawY); + backUpItemRect0(drawX, drawY); uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, _shapes[220+item], drawX, drawY, 0, 0); + _screen->drawShape(0, _shapes[216+item], drawX, drawY, 0, 0); _screen->updateScreen(); delayUntil(nextTime); } - _screen->restoreRect0(drawX, drawY); + restoreItemRect0(drawX, drawY); } else { - _screen->restoreRect0(drawX, tempY - 16); + restoreItemRect0(drawX, tempY - 16); } } currentRoom->itemsXPos[freeItem] = destX; @@ -610,22 +610,22 @@ void KyraEngine::itemSpecialFX(int x, int y, int item) { void KyraEngine::itemSpecialFX1(int x, int y, int item) { debugC(9, kDebugLevelMain, "KyraEngine::itemSpecialFX1(%d, %d, %d)", x, y, item); - uint8 *shape = _shapes[220+item]; + uint8 *shape = _shapes[216+item]; x -= 8; int startY = y; y -= 15; _screen->hideMouse(); - _screen->backUpRect0(x, y); + backUpItemRect0(x, y); for (int i = 1; i <= 16; ++i) { _screen->setNewShapeHeight(shape, i); --startY; - _screen->restoreRect0(x, y); + restoreItemRect0(x, y); uint32 nextTime = _system->getMillis() + 1 * _tickLength; _screen->drawShape(0, shape, x, startY, 0, 0); _screen->updateScreen(); delayUntil(nextTime); } - _screen->restoreRect0(x, y); + restoreItemRect0(x, y); _screen->showMouse(); } @@ -634,27 +634,27 @@ void KyraEngine::itemSpecialFX2(int x, int y, int item) { x -= 8; y -= 15; int yAdd = (int8)(((16 - _itemTable[item].height) >> 1) & 0xFF); - _screen->backUpRect0(x, y); + backUpItemRect0(x, y); if (item >= 80 && item <= 89) snd_playSoundEffect(55); for (int i = 201; i <= 205; ++i) { - _screen->restoreRect0(x, y); + restoreItemRect0(x, y); uint32 nextTime = _system->getMillis() + 3 * _tickLength; - _screen->drawShape(0, _shapes[4+i], x, y + yAdd, 0, 0); + _screen->drawShape(0, _shapes[i], x, y + yAdd, 0, 0); _screen->updateScreen(); delayUntil(nextTime); } for (int i = 204; i >= 201; --i) { - _screen->restoreRect0(x, y); + restoreItemRect0(x, y); uint32 nextTime = _system->getMillis() + 3 * _tickLength; - _screen->drawShape(0, _shapes[220+item], x, y, 0, 0); - _screen->drawShape(0, _shapes[4+i], x, y + yAdd, 0, 0); + _screen->drawShape(0, _shapes[216+item], x, y, 0, 0); + _screen->drawShape(0, _shapes[i], x, y + yAdd, 0, 0); _screen->updateScreen(); delayUntil(nextTime); } - _screen->restoreRect0(x, y); + restoreItemRect0(x, y); } void KyraEngine::magicOutMouseItem(int animIndex, int itemPos) { @@ -696,14 +696,14 @@ void KyraEngine::magicOutMouseItem(int animIndex, int itemPos) { else snd_playSoundEffect(0x37); _screen->hideMouse(); - _screen->backUpRect1(x, y); + backUpItemRect1(x, y); for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) { - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); uint32 nextTime = _system->getMillis() + 4 * _tickLength; - _screen->drawShape(0, _shapes[220+_itemInHand], x + 4, y + 3, 0, 0); + _screen->drawShape(0, _shapes[216+_itemInHand], x + 4, y + 3, 0, 0); if (tableIndex == -1) - _screen->drawShape(0, _shapes[4+shape], x, y, 0, 0); + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); else specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); _screen->updateScreen(); @@ -711,25 +711,25 @@ void KyraEngine::magicOutMouseItem(int animIndex, int itemPos) { } if (itemPos != -1) { - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0); - _screen->backUpRect1(x, y); + backUpItemRect1(x, y); } for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) { - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); uint32 nextTime = _system->getMillis() + 4 * _tickLength; - _screen->drawShape(0, _shapes[220+_itemInHand], x + 4, y + 3, 0, 0); + _screen->drawShape(0, _shapes[216+_itemInHand], x + 4, y + 3, 0, 0); if (tableIndex == -1) - _screen->drawShape(0, _shapes[4+shape], x, y, 0, 0); + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); else specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); _screen->updateScreen(); delayUntil(nextTime); } - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); if (itemPos == -1) { - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->setMouseCursor(1, 1, _shapes[0]); _itemInHand = -1; } else { _characterList[0].inventoryItems[itemPos] = 0xFF; @@ -773,17 +773,17 @@ void KyraEngine::magicInMouseItem(int animIndex, int item, int itemPos) { } _screen->hideMouse(); - _screen->backUpRect1(x, y); + backUpItemRect1(x, y); if (animIndex == 2) snd_playSoundEffect(0x5E); else snd_playSoundEffect(0x37); for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) { - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); uint32 nextTime = _system->getMillis() + 4 * _tickLength; if (tableIndex == -1) - _screen->drawShape(0, _shapes[4+shape], x, y, 0, 0); + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); else specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); _screen->updateScreen(); @@ -791,23 +791,23 @@ void KyraEngine::magicInMouseItem(int animIndex, int item, int itemPos) { } for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) { - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); uint32 nextTime = _system->getMillis() + 4 * _tickLength; if (tableIndex == -1) - _screen->drawShape(0, _shapes[4+shape], x, y, 0, 0); + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); else specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); _screen->updateScreen(); delayUntil(nextTime); } - _screen->restoreRect1(x, y); + restoreItemRect1(x, y); if (itemPos == -1) { - _screen->setMouseCursor(8, 15, _shapes[220+item]); + _screen->setMouseCursor(8, 15, _shapes[216+item]); _itemInHand = item; } else { _characterList[0].inventoryItems[itemPos] = item; _screen->hideMouse(); - _screen->drawShape(0, _shapes[220+item], _itemPosX[itemPos], _itemPosY[itemPos], 0, 0); + _screen->drawShape(0, _shapes[216+item], _itemPosX[itemPos], _itemPosY[itemPos], 0, 0); _screen->showMouse(); } _screen->showMouse(); @@ -840,7 +840,7 @@ void KyraEngine::specialMouseItemFX(int shape, int x, int y, int animIndex, int void KyraEngine::processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops) { debugC(9, kDebugLevelMain, "KyraEngine::processSpecialMouseItemFX(%d, %d, %d, %d, %d, %d)", shape, x, y, tableValue, loopStart, maxLoops); uint8 shapeColorTable[16]; - uint8 *shapePtr = _shapes[4+shape] + 10; + uint8 *shapePtr = _shapes[shape] + 10; if (_flags.useAltShapeHeader) shapePtr += 2; @@ -853,7 +853,7 @@ void KyraEngine::processSpecialMouseItemFX(int shape, int x, int y, int tableVal shapeColorTable[i2] = (i + tableValue) - loopStart; } } - _screen->drawShape(0, _shapes[4+shape], x, y, 0, 0x8000, shapeColorTable); + _screen->drawShape(0, _shapes[shape], x, y, 0, 0x8000, shapeColorTable); } void KyraEngine::updatePlayerItemsForScene() { @@ -863,7 +863,7 @@ void KyraEngine::updatePlayerItemsForScene() { if (_itemInHand > 33) _itemInHand = 33; _screen->hideMouse(); - _screen->setMouseCursor(8, 15, _shapes[220+_itemInHand]); + _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]); _screen->showMouse(); } @@ -905,7 +905,7 @@ void KyraEngine::redrawInventory(int page) { _screen->fillRect(_itemPosX[i], _itemPosY[i], _itemPosX[i] + 15, _itemPosY[i] + 15, 12, page); if (_currentCharacter->inventoryItems[i] != 0xFF) { uint8 item = _currentCharacter->inventoryItems[i]; - _screen->drawShape(page, _shapes[220+item], _itemPosX[i], _itemPosY[i], 0, 0); + _screen->drawShape(page, _shapes[216+item], _itemPosX[i], _itemPosY[i], 0, 0); } } _screen->showMouse(); @@ -913,5 +913,29 @@ void KyraEngine::redrawInventory(int page) { _screen->updateScreen(); } +void KyraEngine::backUpItemRect0(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine::backUpItemRect0(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 3<<3, 24); + _screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]); +} + +void KyraEngine::restoreItemRect0(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine::restoreItemRect0(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 3<<3, 24); + _screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]); +} + +void KyraEngine::backUpItemRect1(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine::backUpItemRect1(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 4<<3, 32); + _screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]); +} + +void KyraEngine::restoreItemRect1(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine::restoreItemRect1(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 4<<3, 32); + _screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]); +} + } // end of namespace Kyra diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index f364711066..a0f28ff6ff 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -403,7 +403,10 @@ KyraEngine::~KyraEngine() { delete [] _scrollDownButton.process0PtrShape; delete [] _scrollDownButton.process1PtrShape; delete [] _scrollDownButton.process2PtrShape; - + + delete [] _itemBkgBackUp[0]; + delete [] _itemBkgBackUp[1]; + for (int i = 0; i < ARRAYSIZE(_shapes); ++i) { if (_shapes[i] != 0) { delete [] _shapes[i]; @@ -468,18 +471,15 @@ void KyraEngine::startup() { resetBrandonPoisonFlags(); _screen->_curPage = 0; // XXX - for (int i = 0; i < 0x0C; ++i) { + for (int i = 0; i < 12; ++i) { int size = _screen->getRectSize(3, 24); - _shapes[365+i] = new byte[size]; + _shapes[361+i] = new byte[size]; } - _shapes[0] = new uint8[_screen->getRectSize(3, 24)]; - memset(_shapes[0], 0, _screen->getRectSize(3, 24)); - _shapes[1] = new uint8[_screen->getRectSize(4, 32)]; - memset(_shapes[1], 0, _screen->getRectSize(4, 32)); - _shapes[2] = new uint8[_screen->getRectSize(8, 69)]; - memset(_shapes[2], 0, _screen->getRectSize(8, 69)); - _shapes[3] = new uint8[_screen->getRectSize(8, 69)]; - memset(_shapes[3], 0, _screen->getRectSize(8, 69)); + + _itemBkgBackUp[0] = new uint8[_screen->getRectSize(3, 24)]; + memset(_itemBkgBackUp[0], 0, _screen->getRectSize(3, 24)); + _itemBkgBackUp[1] = new uint8[_screen->getRectSize(4, 32)]; + memset(_itemBkgBackUp[1], 0, _screen->getRectSize(4, 32)); for (int i = 0; i < _roomTableSize; ++i) { for (int item = 0; item < 12; ++item) { @@ -523,7 +523,7 @@ void KyraEngine::startup() { if (_abortIntroFlag && _skipIntroFlag) { _menuDirectlyToLoad = true; - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->setMouseCursor(1, 1, _shapes[0]); _screen->showMouse(); buttonMenuCallback(0); _menuDirectlyToLoad = false; @@ -548,7 +548,7 @@ void KyraEngine::mainLoop() { snd_playWanderScoreViaMap(0, 1); snd_playSoundEffect(49); _screen->hideMouse(); - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->setMouseCursor(1, 1, _shapes[0]); destroyMouseItem(); _screen->showMouse(); buttonMenuCallback(0); @@ -744,7 +744,7 @@ void KyraEngine::setupShapes123(const Shape *shapeTable, int endShape, int flags debugC(9, kDebugLevelMain, "KyraEngine::setupShapes123(%p, %d, %d)", (const void *)shapeTable, endShape, flags); for (int i = 123; i <= 172; ++i) - _shapes[4+i] = 0; + _shapes[i] = 0; uint8 curImage = 0xFF; int curPageBackUp = _screen->_curPage; @@ -759,7 +759,7 @@ void KyraEngine::setupShapes123(const Shape *shapeTable, int endShape, int flags _screen->loadBitmap(_characterImageTable[newImage], 8, 8, 0); curImage = newImage; } - _shapes[4+i] = _screen->encodeShape(shapeTable[i-123].x<<3, shapeTable[i-123].y, shapeTable[i-123].w<<3, shapeTable[i-123].h, shapeFlags); + _shapes[i] = _screen->encodeShape(shapeTable[i-123].x<<3, shapeTable[i-123].y, shapeTable[i-123].w<<3, shapeTable[i-123].h, shapeFlags); assert(i-7 < _defaultShapeTableSize); _defaultShapeTable[i-7].xOffset = shapeTable[i-123].xOffset; _defaultShapeTable[i-7].yOffset = shapeTable[i-123].yOffset; @@ -773,8 +773,8 @@ void KyraEngine::freeShapes123() { debugC(9, kDebugLevelMain, "KyraEngine::freeShapes123()"); for (int i = 123; i <= 172; ++i) { - delete [] _shapes[4+i]; - _shapes[4+i] = 0; + delete [] _shapes[i]; + _shapes[i] = 0; } } @@ -1031,7 +1031,7 @@ void KyraEngine::updateMousePointer(bool forceUpdate) { if ((newMouseState && _mouseState != newMouseState) || (newMouseState && forceUpdate)) { _mouseState = newMouseState; _screen->hideMouse(); - _screen->setMouseCursor(newX, newY, _shapes[4+shape]); + _screen->setMouseCursor(newX, newY, _shapes[shape]); _screen->showMouse(); } @@ -1041,9 +1041,9 @@ void KyraEngine::updateMousePointer(bool forceUpdate) { _mouseState = _itemInHand; _screen->hideMouse(); if (_itemInHand == -1) { - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->setMouseCursor(1, 1, _shapes[0]); } else { - _screen->setMouseCursor(8, 15, _shapes[220+_itemInHand]); + _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]); } _screen->showMouse(); } diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h index ff72583241..b42a00d510 100644 --- a/engines/kyra/kyra.h +++ b/engines/kyra/kyra.h @@ -583,9 +583,15 @@ protected: int isDropable(int x, int y); int checkNoDropRects(int x, int y); - // --> player items handling: + // --> player items handling void updatePlayerItemsForScene(); + // --> item GFX handling + void backUpItemRect0(int xpos, int ypos); + void restoreItemRect0(int xpos, int ypos); + void backUpItemRect1(int xpos, int ypos); + void restoreItemRect1(int xpos, int ypos); + // items // -> misc void placeItemInGenericMapScene(int item, int index); @@ -767,7 +773,8 @@ protected: bool _mousePressFlag; int8 _mouseWheel; uint8 _flagsTable[69]; - uint8 *_shapes[377]; // TODO: the first 4 entries seem to be screen backup rects, move them in the future out of the shape data + uint8 *_itemBkgBackUp[2]; + uint8 *_shapes[373]; uint16 _gameSpeed; uint16 _tickLength; int _lang; diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp index f72f0cf231..19330a782c 100644 --- a/engines/kyra/scene.cpp +++ b/engines/kyra/scene.cpp @@ -634,7 +634,7 @@ void KyraEngine::initSceneObjectList(int brandonAlive) { AnimObject *curAnimState = _animator->actors(); curAnimState->active = 1; curAnimState->drawY = _currentCharacter->y1; - curAnimState->sceneAnimPtr = _shapes[4+_currentCharacter->currentAnimFrame]; + curAnimState->sceneAnimPtr = _shapes[_currentCharacter->currentAnimFrame]; curAnimState->animFrameNumber = _currentCharacter->currentAnimFrame; startAnimFrame = _currentCharacter->currentAnimFrame-7; int xOffset = _defaultShapeTable[startAnimFrame].xOffset; @@ -676,7 +676,7 @@ void KyraEngine::initSceneObjectList(int brandonAlive) { } curAnimState->drawY = ch->y1; - curAnimState->sceneAnimPtr = _shapes[4+ch->currentAnimFrame]; + curAnimState->sceneAnimPtr = _shapes[ch->currentAnimFrame]; curAnimState->animFrameNumber = ch->currentAnimFrame; startAnimFrame = ch->currentAnimFrame-7; xOffset = _defaultShapeTable[startAnimFrame].xOffset; @@ -754,7 +754,7 @@ void KyraEngine::initSceneObjectList(int brandonAlive) { byte curItem = curRoom->itemsTable[i]; if (curItem != 0xFF) { curAnimState->drawY = curRoom->itemsYPos[i]; - curAnimState->sceneAnimPtr = _shapes[220+curItem]; + curAnimState->sceneAnimPtr = _shapes[216+curItem]; curAnimState->animFrameNumber = (int16)0xFFFF; curAnimState->y1 = curRoom->itemsYPos[i]; curAnimState->x1 = curRoom->itemsXPos[i]; diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index c0e8ed7e92..95bd17d557 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -2429,30 +2429,6 @@ void Screen::rectClip(int &x, int &y, int w, int h) { y = 200 - h; } -void Screen::backUpRect0(int xpos, int ypos) { - debugC(9, kDebugLevelScreen, "Screen::backUpRect0(%d, %d)", xpos, ypos); - rectClip(xpos, ypos, 3<<3, 24); - copyRegionToBuffer(_curPage, xpos, ypos, 3<<3, 24, _vm->shapes()[0]); -} - -void Screen::restoreRect0(int xpos, int ypos) { - debugC(9, kDebugLevelScreen, "Screen::restoreRect0(%d, %d)", xpos, ypos); - rectClip(xpos, ypos, 3<<3, 24); - copyBlockToPage(_curPage, xpos, ypos, 3<<3, 24, _vm->shapes()[0]); -} - -void Screen::backUpRect1(int xpos, int ypos) { - debugC(9, kDebugLevelScreen, "Screen::backUpRect1(%d, %d)", xpos, ypos); - rectClip(xpos, ypos, 4<<3, 32); - copyRegionToBuffer(_curPage, xpos, ypos, 4<<3, 32, _vm->shapes()[1]); -} - -void Screen::restoreRect1(int xpos, int ypos) { - debugC(9, kDebugLevelScreen, "Screen::restoreRect1(%d, %d)", xpos, ypos); - rectClip(xpos, ypos, 4<<3, 32); - copyBlockToPage(_curPage, xpos, ypos, 4<<3, 32, _vm->shapes()[1]); -} - int Screen::getDrawLayer(int x, int y) { debugC(9, kDebugLevelScreen, "Screen::getDrawLayer(%d, %d)", x, y); int xpos = x - 8; diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index f0b1d0e52b..a89bd7a047 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -202,10 +202,6 @@ public: void blockInRegion(int x, int y, int width, int height); void blockOutRegion(int x, int y, int width, int height); - void backUpRect0(int xpos, int ypos); - void restoreRect0(int xpos, int ypos); - void backUpRect1(int xpos, int ypos); - void restoreRect1(int xpos, int ypos); void copyBackgroundBlock(int x, int page, int flag); void copyBackgroundBlock2(int x); diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index da5cf3ccaf..56e946a526 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -314,7 +314,7 @@ void KyraEngine::seq_createAmuletJewel(int jewel, int page, int noSound, int dra _screen->hideMouse(); if (!drawOnly) { for (int i = 0; specialJewelTable[i] != 0xFFFF; ++i) { - _screen->drawShape(page, _shapes[4+specialJewelTable[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->drawShape(page, _shapes[specialJewelTable[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); _screen->updateScreen(); delayWithTicks(3); } @@ -340,13 +340,13 @@ void KyraEngine::seq_createAmuletJewel(int jewel, int page, int noSound, int dra if (opcodes) { for (int i = 0; opcodes[i] != 0xFFFF; ++i) { - _screen->drawShape(page, _shapes[4+opcodes[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->drawShape(page, _shapes[opcodes[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); _screen->updateScreen(); delayWithTicks(3); } } } - _screen->drawShape(page, _shapes[327+jewel], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->drawShape(page, _shapes[323+jewel], _amuletX2[jewel], _amuletY2[jewel], 0, 0); _screen->updateScreen(); _screen->showMouse(); setGameFlag(0x55+jewel); @@ -1797,7 +1797,7 @@ void KyraEngine::drawJewelPress(int jewel, int drawSpecial) { shape = jewel + 0x149; snd_playSoundEffect(0x45); - _screen->drawShape(0, _shapes[4+shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->drawShape(0, _shapes[shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); _screen->updateScreen(); delayWithTicks(2); @@ -1806,7 +1806,7 @@ void KyraEngine::drawJewelPress(int jewel, int drawSpecial) { else shape = jewel + 0x143; - _screen->drawShape(0, _shapes[4+shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->drawShape(0, _shapes[shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); _screen->updateScreen(); _screen->showMouse(); } @@ -1819,13 +1819,13 @@ void KyraEngine::drawJewelsFadeOutStart() { static const uint16 jewelTable4[] = { 0x165, 0x161, 0x15B, 0x156, 0x151, 0xFFFF }; for (int i = 0; jewelTable1[i] != 0xFFFF; ++i) { if (queryGameFlag(0x57)) - _screen->drawShape(0, _shapes[4+jewelTable1[i]], _amuletX2[2], _amuletY2[2], 0, 0); + _screen->drawShape(0, _shapes[jewelTable1[i]], _amuletX2[2], _amuletY2[2], 0, 0); if (queryGameFlag(0x59)) - _screen->drawShape(0, _shapes[4+jewelTable3[i]], _amuletX2[4], _amuletY2[4], 0, 0); + _screen->drawShape(0, _shapes[jewelTable3[i]], _amuletX2[4], _amuletY2[4], 0, 0); if (queryGameFlag(0x56)) - _screen->drawShape(0, _shapes[4+jewelTable2[i]], _amuletX2[1], _amuletY2[1], 0, 0); + _screen->drawShape(0, _shapes[jewelTable2[i]], _amuletX2[1], _amuletY2[1], 0, 0); if (queryGameFlag(0x58)) - _screen->drawShape(0, _shapes[4+jewelTable4[i]], _amuletX2[3], _amuletY2[3], 0, 0); + _screen->drawShape(0, _shapes[jewelTable4[i]], _amuletX2[3], _amuletY2[3], 0, 0); _screen->updateScreen(); delayWithTicks(3); } @@ -1855,13 +1855,13 @@ void KyraEngine::drawJewelsFadeOutEnd(int jewel) { for (int i = 0; jewelTable[i] != 0xFFFF; ++i) { uint16 shape = jewelTable[i]; if (queryGameFlag(0x57)) - _screen->drawShape(0, _shapes[4+shape], _amuletX2[2], _amuletY2[2], 0, 0); + _screen->drawShape(0, _shapes[shape], _amuletX2[2], _amuletY2[2], 0, 0); if (queryGameFlag(0x59)) - _screen->drawShape(0, _shapes[4+shape], _amuletX2[4], _amuletY2[4], 0, 0); + _screen->drawShape(0, _shapes[shape], _amuletX2[4], _amuletY2[4], 0, 0); if (queryGameFlag(0x56)) - _screen->drawShape(0, _shapes[4+shape], _amuletX2[1], _amuletY2[1], 0, 0); + _screen->drawShape(0, _shapes[shape], _amuletX2[1], _amuletY2[1], 0, 0); if (queryGameFlag(0x58)) - _screen->drawShape(0, _shapes[4+shape], _amuletX2[3], _amuletY2[3], 0, 0); + _screen->drawShape(0, _shapes[shape], _amuletX2[3], _amuletY2[3], 0, 0); _screen->updateScreen(); delayWithTicks(3); diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 1de0a7573f..89e07f3d57 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -708,16 +708,16 @@ void KyraEngine::initStaticResource() { void KyraEngine::loadMouseShapes() { _screen->loadBitmap("MOUSE.CPS", 3, 3, 0); _screen->_curPage = 2; - _shapes[4] = _screen->encodeShape(0, 0, 8, 10, 0); - _shapes[5] = _screen->encodeShape(0, 0x17, 0x20, 7, 0); - _shapes[6] = _screen->encodeShape(0x50, 0x12, 0x10, 9, 0); - _shapes[7] = _screen->encodeShape(0x60, 0x12, 0x10, 11, 0); - _shapes[8] = _screen->encodeShape(0x70, 0x12, 0x10, 9, 0); - _shapes[9] = _screen->encodeShape(0x80, 0x12, 0x10, 11, 0); - _shapes[10] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0); - _shapes[364] = _screen->encodeShape(0x28, 0, 0x10, 13, 0); + _shapes[0] = _screen->encodeShape(0, 0, 8, 10, 0); + _shapes[1] = _screen->encodeShape(0, 0x17, 0x20, 7, 0); + _shapes[2] = _screen->encodeShape(0x50, 0x12, 0x10, 9, 0); + _shapes[3] = _screen->encodeShape(0x60, 0x12, 0x10, 11, 0); + _shapes[4] = _screen->encodeShape(0x70, 0x12, 0x10, 9, 0); + _shapes[5] = _screen->encodeShape(0x80, 0x12, 0x10, 11, 0); + _shapes[6] = _screen->encodeShape(0x90, 0x12, 0x10, 10, 0); + _shapes[360] = _screen->encodeShape(0x28, 0, 0x10, 13, 0); _screen->setMouseCursor(1, 1, 0); - _screen->setMouseCursor(1, 1, _shapes[4]); + _screen->setMouseCursor(1, 1, _shapes[0]); _screen->setShapePages(5, 3); } @@ -729,7 +729,7 @@ void KyraEngine::loadCharacterShapes() { assert(i < _defaultShapeTableSize); Shape *shape = &_defaultShapeTable[i]; if (shape->imageIndex == 0xFF) { - _shapes[i+7+4] = 0; + _shapes[i+7] = 0; continue; } if (shape->imageIndex != curImage) { @@ -737,7 +737,7 @@ void KyraEngine::loadCharacterShapes() { _screen->loadBitmap(_characterImageTable[shape->imageIndex], 3, 3, 0); curImage = shape->imageIndex; } - _shapes[i+7+4] = _screen->encodeShape(shape->x<<3, shape->y, shape->w<<3, shape->h, 1); + _shapes[i+7] = _screen->encodeShape(shape->x<<3, shape->y, shape->w<<3, shape->h, 1); } _screen->_curPage = videoPage; } @@ -748,16 +748,16 @@ void KyraEngine::loadSpecialEffectShapes() { int currShape; for (currShape = 173; currShape < 183; currShape++) - _shapes[4 + currShape] = _screen->encodeShape((currShape-173) * 24, 0, 24, 24, 1); + _shapes[currShape] = _screen->encodeShape((currShape-173) * 24, 0, 24, 24, 1); for (currShape = 183; currShape < 190; currShape++) - _shapes[4 + currShape] = _screen->encodeShape((currShape-183) * 24, 24, 24, 24, 1); + _shapes[currShape] = _screen->encodeShape((currShape-183) * 24, 24, 24, 24, 1); for (currShape = 190; currShape < 201; currShape++) - _shapes[4 + currShape] = _screen->encodeShape((currShape-190) * 24, 48, 24, 24, 1); + _shapes[currShape] = _screen->encodeShape((currShape-190) * 24, 48, 24, 24, 1); for (currShape = 201; currShape < 206; currShape++) - _shapes[4 + currShape] = _screen->encodeShape((currShape-201) * 16, 106, 16, 16, 1); + _shapes[currShape] = _screen->encodeShape((currShape-201) * 16, 106, 16, 16, 1); } void KyraEngine::loadItems() { @@ -766,28 +766,28 @@ void KyraEngine::loadItems() { _screen->loadBitmap("JEWELS3.CPS", 3, 3, 0); _screen->_curPage = 2; - _shapes[327] = 0; + _shapes[323] = 0; for (shape = 1; shape < 6; shape++ ) - _shapes[327 + shape] = _screen->encodeShape((shape - 1) * 32, 0, 32, 17, 0); + _shapes[323 + shape] = _screen->encodeShape((shape - 1) * 32, 0, 32, 17, 0); for (shape = 330; shape <= 334; shape++) - _shapes[4 + shape] = _screen->encodeShape((shape-330) * 32, 102, 32, 17, 0); + _shapes[shape] = _screen->encodeShape((shape-330) * 32, 102, 32, 17, 0); for (shape = 335; shape <= 339; shape++) - _shapes[4 + shape] = _screen->encodeShape((shape-335) * 32, 17, 32, 17, 0); + _shapes[shape] = _screen->encodeShape((shape-335) * 32, 17, 32, 17, 0); for (shape = 340; shape <= 344; shape++) - _shapes[4 + shape] = _screen->encodeShape((shape-340) * 32, 34, 32, 17, 0); + _shapes[shape] = _screen->encodeShape((shape-340) * 32, 34, 32, 17, 0); for (shape = 345; shape <= 349; shape++) - _shapes[4 + shape] = _screen->encodeShape((shape-345) * 32, 51, 32, 17, 0); + _shapes[shape] = _screen->encodeShape((shape-345) * 32, 51, 32, 17, 0); for (shape = 350; shape <= 354; shape++) - _shapes[4 + shape] = _screen->encodeShape((shape-350) * 32, 68, 32, 17, 0); + _shapes[shape] = _screen->encodeShape((shape-350) * 32, 68, 32, 17, 0); for (shape = 355; shape <= 359; shape++) - _shapes[4 + shape] = _screen->encodeShape((shape-355) * 32, 85, 32, 17, 0); + _shapes[shape] = _screen->encodeShape((shape-355) * 32, 85, 32, 17, 0); _screen->loadBitmap("ITEMS.CPS", 3, 3, 0); @@ -797,9 +797,9 @@ void KyraEngine::loadItems() { shape = findDuplicateItemShape(i); if (shape != -1) - _shapes[220 + i] = _shapes[220 + shape]; + _shapes[216 + i] = _shapes[216 + shape]; else - _shapes[220 + i] = _screen->encodeShape( (i % 20) * 16, i/20 * 16, 16, 16, 0); + _shapes[216 + i] = _screen->encodeShape( (i % 20) * 16, i/20 * 16, 16, 16, 0); } uint32 size; diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp index 10353f97ca..70d20cd102 100644 --- a/engines/kyra/timer.cpp +++ b/engines/kyra/timer.cpp @@ -259,16 +259,16 @@ void KyraEngine::drawAmulet() { int i = 0; while (amuletTable1[i] != -1) { if (queryGameFlag(87)) - _screen->drawShape(0, _shapes[4+amuletTable1[i]], _amuletX[0], _amuletY[0], 0, 0); + _screen->drawShape(0, _shapes[amuletTable1[i]], _amuletX[0], _amuletY[0], 0, 0); if (queryGameFlag(89)) - _screen->drawShape(0, _shapes[4+amuletTable2[i]], _amuletX[1], _amuletY[1], 0, 0); + _screen->drawShape(0, _shapes[amuletTable2[i]], _amuletX[1], _amuletY[1], 0, 0); if (queryGameFlag(86)) - _screen->drawShape(0, _shapes[4+amuletTable3[i]], _amuletX[2], _amuletY[2], 0, 0); + _screen->drawShape(0, _shapes[amuletTable3[i]], _amuletX[2], _amuletY[2], 0, 0); if (queryGameFlag(88)) - _screen->drawShape(0, _shapes[4+amuletTable4[i]], _amuletX[3], _amuletY[3], 0, 0); + _screen->drawShape(0, _shapes[amuletTable4[i]], _amuletX[3], _amuletY[3], 0, 0); _screen->updateScreen(); delayWithTicks(3); |