diff options
author | sylvaintv | 2012-04-24 01:20:29 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | 1b86a778f3e37eb54e0ea5bdfc528d3f98695c51 (patch) | |
tree | 3e716b27cca09868c8b26131e61ef1b121dbf859 | |
parent | b348db605b07cd829ab275d921a5b3ce8d0ecf4c (diff) | |
download | scummvm-rg350-1b86a778f3e37eb54e0ea5bdfc528d3f98695c51.tar.gz scummvm-rg350-1b86a778f3e37eb54e0ea5bdfc528d3f98695c51.tar.bz2 scummvm-rg350-1b86a778f3e37eb54e0ea5bdfc528d3f98695c51.zip |
LILLIPUT: Implements displayFunction18
Draw characters (men or men2)
-rw-r--r-- | engines/lilliput/lilliput.cpp | 38 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 1 |
2 files changed, 39 insertions, 0 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index e808f48ffc..1e21c2aa5d 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -283,6 +283,44 @@ Common::Platform LilliputEngine::getPlatform() const { return _platform; } + +void LilliputEngine::displayFunction18(int index, int position, int flags) { + + byte* buf = _buffer1_45k + ((position & 0xFF) << 8) + (position >> 8); + + byte* src = _bufferMen; + if (index < 0) { + src = _bufferIdeogram; + index = -index; + } else if (index > 0xF0) { + src = _bufferMen2; + index -= 0xF0; + } + + src += index << 8; + + if ( (flags & 2) == 0 ) { + for (int y = 0; y < 16; y++) { + for (int x = 0; x < 16; x++) { + if (src[x] != 0) + buf[x] = src[x]; + } + src += 16; + buf += 256; + } + } else { + src += 14; + for (int y = 0; y < 16; y++) { + for (int x = 0; x < 16; x++) { + if (src[x] != 0) + buf[x] = src[x]; + } + src += 32; + buf += 256; + } + } +} + // display mouse cursor, if any void LilliputEngine::displayFunction1(byte *buf, int var1, int var2, int var4) { debugC(2, kDebugEngine, "displayFunction1(buf, %d, %d, %d)", var1, var2, var4); diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index 948e05145a..f0f0009ad8 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -224,6 +224,7 @@ public: void displayFunction15(); void displayFunction16(); void displayFunction17(); + void displayFunction18(int index, int var2, int flags); void displayString(byte *buf, int var2, int var4); void displayChar(int index, int var1); |