diff options
author | Gregory Montoir | 2005-09-02 18:35:01 +0000 |
---|---|---|
committer | Gregory Montoir | 2005-09-02 18:35:01 +0000 |
commit | a861226f203b9cdff448a3cd5642d776837fed7c (patch) | |
tree | 821971b54eef25cf0404b1871ee97c2e742f4eef /kyra | |
parent | 35bd5fa824d8c1dba93454f5f9fb49e38c3c93d9 (diff) | |
download | scummvm-rg350-a861226f203b9cdff448a3cd5642d776837fed7c.tar.gz scummvm-rg350-a861226f203b9cdff448a3cd5642d776837fed7c.tar.bz2 scummvm-rg350-a861226f203b9cdff448a3cd5642d776837fed7c.zip |
fix shape loading for cdrom version
svn-id: r18737
Diffstat (limited to 'kyra')
-rw-r--r-- | kyra/kyra.cpp | 7 | ||||
-rw-r--r-- | kyra/screen.cpp | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/kyra/kyra.cpp b/kyra/kyra.cpp index 79b9901c08..3f3d616a95 100644 --- a/kyra/kyra.cpp +++ b/kyra/kyra.cpp @@ -433,7 +433,12 @@ uint8 *KyraEngine::seq_setPanPages(int pageNum, int shape) { const uint8 *data = _screen->getPagePtr(pageNum); uint16 numShapes = READ_LE_UINT16(data); if (shape < numShapes) { - uint16 offs = READ_LE_UINT16(data + 2 + shape * 2); + uint32 offs = 0; + if (_game == KYRA1CD) { + offs = READ_LE_UINT32(data + 2 + shape * 4); + } else { + offs = READ_LE_UINT16(data + 2 + shape * 2); + } if (offs != 0) { data += offs; uint16 sz = READ_LE_UINT16(data + 6); diff --git a/kyra/screen.cpp b/kyra/screen.cpp index c23fbf5885..229009986f 100644 --- a/kyra/screen.cpp +++ b/kyra/screen.cpp @@ -323,6 +323,9 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int DrawShapePlotPixelCallback plotPixel = _drawShapePlotPixelTable[ppc]; const uint8 *src = shapeData; + if (_vm->game() == KYRA1CD) { + src += 2; + } uint16 shapeFlags = READ_LE_UINT16(src); src += 2; int shapeHeight = *src++; |