diff options
author | Strangerke | 2012-04-16 07:43:49 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | d924342d2dca0c14efd7d0607d16c6aeacad84fb (patch) | |
tree | b3e3fb7f220279a2161fd27fa17c177fbc2f4e9c /engines/lilliput | |
parent | e21bb143135698735fbb0f18c9a86ad33243f97b (diff) | |
download | scummvm-rg350-d924342d2dca0c14efd7d0607d16c6aeacad84fb.tar.gz scummvm-rg350-d924342d2dca0c14efd7d0607d16c6aeacad84fb.tar.bz2 scummvm-rg350-d924342d2dca0c14efd7d0607d16c6aeacad84fb.zip |
LILLIPUT: Implement display function 2. This fixes mouse display
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 17 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 1 |
2 files changed, 17 insertions, 1 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index 29d53fe4db..10e55cd4d6 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -237,6 +237,21 @@ void LilliputEngine::displayFunction1a(byte *buf, int var2, int var4) { displayFunction1(buf, 0, var2, var4); } +void LilliputEngine::displayFunction2(byte *buf, int var2, int var4) { + debugC(2, kDebugEngine, "displayFunction2(buf, %d, %d)", var2, var4); + + + int tmpVal = ((var4 & 0xFF) << 8) + (var4 >> 8); + int index2 = var2 + tmpVal + (tmpVal >> 2); + + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { + buf[(i * 16) + j] = ((byte *)_mainSurface->getPixels())[index2 + j]; + } + index2 += 320; + } +} + void LilliputEngine::displayFunction4() { debugC(2, kDebugEngine, "displayFunction4()"); @@ -246,7 +261,7 @@ void LilliputEngine::displayFunction4() { _word15BC8 = _mouseDisplayX; _word15BCA = _mouseDisplayY; - warning("Display function 2"); + displayFunction2(_array15AC8, _mouseDisplayX, _mouseDisplayY); displayFunction1(_bufferIdeogram, _word15AC2 + 80, _mouseDisplayX, _mouseDisplayY); diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index ed049591ad..a59b244ad7 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -168,6 +168,7 @@ public: void displayFunction1(byte *buf, int var1, int var2, int var4); void displayFunction1a(byte *buf, int var2, int var4); + void displayFunction2(byte *buf, int var2, int var4); void displayFunction4(); void displayFunction5(); |