diff options
author | Florian Kagerer | 2008-04-06 22:17:02 +0000 |
---|---|---|
committer | Florian Kagerer | 2008-04-06 22:17:02 +0000 |
commit | 831ab122685e8021cf6bdd21db3663852bf2ff6f (patch) | |
tree | f714942078608f4618e2cdafc55043a0aee52237 | |
parent | 1fc3df790560ea185ccc56936381b88a9271f62d (diff) | |
download | scummvm-rg350-831ab122685e8021cf6bdd21db3663852bf2ff6f.tar.gz scummvm-rg350-831ab122685e8021cf6bdd21db3663852bf2ff6f.tar.bz2 scummvm-rg350-831ab122685e8021cf6bdd21db3663852bf2ff6f.zip |
implement missing Screen::drawShapePlotType11_15()
svn-id: r31441
-rw-r--r-- | engines/kyra/screen.cpp | 20 | ||||
-rw-r--r-- | engines/kyra/screen.h | 3 |
2 files changed, 21 insertions, 2 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index f7f579b0e1..61fed19cbc 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1233,10 +1233,12 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int 0, 0, 0, &Screen::drawShapePlotType8, // used by Kyra 2 &Screen::drawShapePlotType9, // used by Kyra 1 - 0, 0, + 0, + &Screen::drawShapePlotType11_15,// used by Kyra 1 &Screen::drawShapePlotType12, // used by Kyra 2 &Screen::drawShapePlotType13, // used by Kyra 1 &Screen::drawShapePlotType14, // used by Kyra 1 (invisibility) + &Screen::drawShapePlotType11_15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -1682,6 +1684,22 @@ void Screen::drawShapePlotType9(uint8 *dst, uint8 cmd) { *dst = cmd; } +void Screen::drawShapePlotType11_15(uint8 *dst, uint8 cmd) { + uint32 relOffs = dst - _dsDstPage; + int t = (_shapePages[0][relOffs] & 0x7f) & 0x87; + + if (_dsDrawLayer < t) { + cmd = _shapePages[1][relOffs]; + } else { + cmd = *dst; + for (int i = 0; i < _dsTableLoopCount; ++i) + cmd = _dsTable[cmd]; + } + + if (cmd) + *dst = cmd; +} + void Screen::drawShapePlotType12(uint8 *dst, uint8 cmd) { uint32 relOffs = dst - _dsDstPage; int t = (_shapePages[0][relOffs] & 0x7f) & 0x87; diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index add8473eff..9db5a7b44a 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -194,9 +194,10 @@ public: void drawShapePlotType4(uint8 *dst, uint8 cmd); void drawShapePlotType8(uint8 *dst, uint8 cmd); void drawShapePlotType9(uint8 *dst, uint8 cmd); + void drawShapePlotType11_15(uint8 *dst, uint8 cmd); void drawShapePlotType12(uint8 *dst, uint8 cmd); void drawShapePlotType13(uint8 *dst, uint8 cmd); - void drawShapePlotType14(uint8 *dst, uint8 cmd); + void drawShapePlotType14(uint8 *dst, uint8 cmd); typedef int (Screen::*DsMarginSkipFunc)(uint8 *&dst, const uint8 *&src, int &cnt); typedef void (Screen::*DsLineFunc)(uint8 *&dst, const uint8 *&src, int &cnt, int scaleState); |