diff options
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r-- | engines/kyra/screen.cpp | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 04227322ed..ec0a899dcc 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1151,12 +1151,11 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int _dsTable = 0; _dsTableLoopCount = 0; _dsTable2 = 0; + _dsTable3 = 0; + _dsTable4 = 0; _dsTable5 = 0; _dsDrawLayer = 0; - uint8 *table3 = 0; - uint8 *table4 = 0; - if (flags & 0x8000) { _dsTable2 = va_arg(args, uint8*); } @@ -1169,8 +1168,8 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int } if (flags & 0x1000) { - table3 = va_arg(args, uint8*); - table4 = va_arg(args, uint8*); + _dsTable3 = va_arg(args, uint8*); + _dsTable4 = va_arg(args, uint8*); } if (flags & 0x200) { @@ -1252,8 +1251,11 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &Screen::drawShapePlotType37, // used by LoL (monsters) - 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, + &Screen::drawShapePlotType52, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0 }; int scaleCounterV = 0; @@ -1827,6 +1829,16 @@ void Screen::drawShapePlotType37(uint8 *dst, uint8 cmd) { *dst = cmd; } +void Screen::drawShapePlotType52(uint8 *dst, uint8 cmd) { + cmd = _dsTable2[cmd]; + uint8 offs = _dsTable3[cmd]; + + if (!(offs & 0x80)) + cmd = _dsTable4[(offs << 8) | *dst]; + + *dst = cmd; +} + void Screen::decodeFrame3(const uint8 *src, uint8 *dst, uint32 size) { debugC(9, kDebugLevelScreen, "Screen::decodeFrame3(%p, %p, %u)", (const void *)src, (const void *)dst, size); const uint8 *dstEnd = dst + size; |