aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/screen.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2009-03-01 14:45:30 +0000
committerFlorian Kagerer2009-03-01 14:45:30 +0000
commit7ea5cefef4fb1ef9db52cbf5df7f884770113684 (patch)
tree7ad307cd465c99268b7adc8a8054467df4e6e581 /engines/kyra/screen.cpp
parent40c4733124a43fb2e921efd07a782ed1688cbc90 (diff)
downloadscummvm-rg350-7ea5cefef4fb1ef9db52cbf5df7f884770113684.tar.gz
scummvm-rg350-7ea5cefef4fb1ef9db52cbf5df7f884770113684.tar.bz2
scummvm-rg350-7ea5cefef4fb1ef9db52cbf5df7f884770113684.zip
LOL: implemented some monster related code (monsters now get placed in the maze, but they still don't do anything)
svn-id: r39039
Diffstat (limited to 'engines/kyra/screen.cpp')
-rw-r--r--engines/kyra/screen.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 71d49a7aae..04227322ed 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1151,6 +1151,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
_dsTable = 0;
_dsTableLoopCount = 0;
_dsTable2 = 0;
+ _dsTable5 = 0;
_dsDrawLayer = 0;
uint8 *table3 = 0;
@@ -1195,7 +1196,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
}
if ((flags & 0x2000) && _vm->gameFlags().gameID != GI_KYRA1)
- va_arg(args, int);
+ _dsTable5 = va_arg(args, uint8*);
static const DsMarginSkipFunc dsMarginFunc[] = {
&Screen::drawShapeMarginNoScaleUpwind,
@@ -1248,6 +1249,10 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
&Screen::drawShapePlotType14, // used by Kyra 1 (invisibility)
&Screen::drawShapePlotType11_15, // used by Kyra 1 (invisibility)
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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
};
@@ -1808,6 +1813,20 @@ void Screen::drawShapePlotType14(uint8 *dst, uint8 cmd) {
*dst = cmd;
}
+void Screen::drawShapePlotType37(uint8 *dst, uint8 cmd) {
+ cmd = _dsTable2[cmd];
+
+ if (cmd == 255) {
+ cmd = _dsTable5[*dst];
+ } else {
+ for (int i = 0; i < _dsTableLoopCount; ++i)
+ cmd = _dsTable[cmd];
+ }
+
+ if (cmd)
+ *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;