diff options
author | Johannes Schickel | 2006-07-30 14:53:28 +0000 |
---|---|---|
committer | Johannes Schickel | 2006-07-30 14:53:28 +0000 |
commit | 3846565058a62e4636cf9b03f4adb1f4c7f8e5da (patch) | |
tree | 4fcd2a5774c0881762b27a9f6d5195b3e8eab707 /engines/kyra/screen.cpp | |
parent | 8b38f65d1aa2a2e2f50497e47eb6206e3b349b88 (diff) | |
download | scummvm-rg350-3846565058a62e4636cf9b03f4adb1f4c7f8e5da.tar.gz scummvm-rg350-3846565058a62e4636cf9b03f4adb1f4c7f8e5da.tar.bz2 scummvm-rg350-3846565058a62e4636cf9b03f4adb1f4c7f8e5da.zip |
Implements item shape loading for kyra3.
svn-id: r23637
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r-- | engines/kyra/screen.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index f45b9cea1a..0e62402181 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -2210,7 +2210,7 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 * if (palData && palSize) { debugC(9, kDebugLevelMain,"Loading a palette of size %i from %s", palSize, filename); - memcpy(palData, srcData + 10, palSize); + memcpy(palData, srcData + 10, palSize); } uint8 *srcPtr = srcData + 10 + palSize; @@ -2243,9 +2243,15 @@ uint8 *Screen::getPtrToShape(uint8 *shpFile, int shape) { if (shapes <= shape) return 0; - uint32 offset = READ_LE_UINT32(shpFile + (shape << 1) + 2); + uint32 offset = READ_LE_UINT32(shpFile + (shape << 2) + 2); return shpFile + offset + 2; } +uint16 Screen::getShapeSize(uint8 *shp) { + debugC(9, kDebugLevelScreen, "KyraEngine::getShapeSize(%p)", (void *)shp); + + return READ_LE_UINT16(shp+6); +} + } // End of namespace Kyra |