From ba9a4cd6e19f084f5209075bce77c067ed7f0051 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sat, 30 Mar 2019 15:21:26 +0100 Subject: KYRA: (EOB2/Amiga) - fix detect magic blue shapes --- engines/kyra/engine/eobcommon.cpp | 5 +++-- engines/kyra/engine/items_eob.cpp | 9 ++++----- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/kyra') diff --git a/engines/kyra/engine/eobcommon.cpp b/engines/kyra/engine/eobcommon.cpp index 5b7c4aea8e..d7fad04a57 100644 --- a/engines/kyra/engine/eobcommon.cpp +++ b/engines/kyra/engine/eobcommon.cpp @@ -806,12 +806,13 @@ void EoBCoreEngine::loadItemsAndDecorationsShapes() { for (int i = 0; i < _numItemIconShapes; i++) _itemIconShapes[i] = _screen->encodeShape((i % 0x14) << 1, (i / 0x14) << 4, 2, 0x10, false, _cgaMappingIcons); - if (_flags.platform == Common::kPlatformAmiga && _flags.gameID == GI_EOB1) { + if (_flags.platform == Common::kPlatformAmiga) { + const uint8 offsY = (_flags.gameID == GI_EOB1) ? 80 : 96; _amigaBlueItemIconShapes = new const uint8*[_numItemIconShapes]; for (int i = 0; i < _numItemIconShapes; i++) { int bx = (i % 0x14) << 1; int by = (i / 0x14) << 4; - _amigaBlueItemIconShapes[i] = _screen->getPagePixel(2, (bx << 3) + 8, by + 88) ? _screen->encodeShape(bx, by + 80, 2, 0x10, false, 0) : _screen->encodeShape(bx, by, 2, 0x10, false, 0); + _amigaBlueItemIconShapes[i] = _screen->getPagePixel(2, (bx << 3) + 8, by + offsY + 8) ? _screen->encodeShape(bx, by + offsY, 2, 0x10, false, 0) : _screen->encodeShape(bx, by, 2, 0x10, false, 0); } } } diff --git a/engines/kyra/engine/items_eob.cpp b/engines/kyra/engine/items_eob.cpp index b4d9d67b2b..39054b614d 100644 --- a/engines/kyra/engine/items_eob.cpp +++ b/engines/kyra/engine/items_eob.cpp @@ -466,11 +466,10 @@ void EoBCoreEngine::drawItemIconShape(int pageNum, Item itemId, int x, int y) { const uint8 *shp = _itemIconShapes[icn]; if (applyBluePal) { - if (_flags.gameID == GI_EOB1) { - if (_amigaBlueItemIconShapes) - shp = _amigaBlueItemIconShapes[icn]; - else - ovl = (_configRenderMode == Common::kRenderCGA) ? _itemsOverlayCGA : &_itemsOverlay[icn << 4]; + if (_amigaBlueItemIconShapes) { + shp = _amigaBlueItemIconShapes[icn]; + } else if (_flags.gameID == GI_EOB1) { + ovl = (_configRenderMode == Common::kRenderCGA) ? _itemsOverlayCGA : &_itemsOverlay[icn << 4]; } else { _screen->setFadeTable(_lightBlueFadingTable); _screen->setShapeFadingLevel(1); -- cgit v1.2.3