diff options
author | Strangerke | 2012-04-30 14:17:03 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2018-03-28 17:36:57 +0200 |
commit | ab3b7972e0dfdaa9912b22bb60f581231423032e (patch) | |
tree | 7609217b37c01d72c861da2ed93e237657d5a9df /engines/lilliput | |
parent | 8325be0f825ccfd764b54f8d3799ecd4e8796054 (diff) | |
download | scummvm-rg350-ab3b7972e0dfdaa9912b22bb60f581231423032e.tar.gz scummvm-rg350-ab3b7972e0dfdaa9912b22bb60f581231423032e.tar.bz2 scummvm-rg350-ab3b7972e0dfdaa9912b22bb60f581231423032e.zip |
LILLIPUT: Add sprite mirroring to fix display of characters looking left
Diffstat (limited to 'engines/lilliput')
-rw-r--r-- | engines/lilliput/lilliput.cpp | 22 | ||||
-rw-r--r-- | engines/lilliput/lilliput.h | 2 | ||||
-rw-r--r-- | engines/lilliput/script.cpp | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/engines/lilliput/lilliput.cpp b/engines/lilliput/lilliput.cpp index d8f3eb3bdd..a021829ada 100644 --- a/engines/lilliput/lilliput.cpp +++ b/engines/lilliput/lilliput.cpp @@ -309,7 +309,7 @@ void LilliputEngine::displayFunction18(int index, int x, int y, int flags) { index -= 0xF0; } - src += index << 8; + src += ((index & 0xFF) << 8) + (index >> 8); if ( (flags & 2) == 0 ) { for (int y = 0; y < 16; y++) { @@ -321,13 +321,13 @@ void LilliputEngine::displayFunction18(int index, int x, int y, int flags) { buf += 256; } } else { - src += 14; +// src += 14; for (int y = 0; y < 16; y++) { for (int x = 0; x < 16; x++) { - if (src[x] != 0) - buf[x] = src[x]; + if (src[15 - x] != 0) + buf[x] = src[15 - x]; } - src += 32; + src += 16; buf += 256; } } @@ -1227,17 +1227,17 @@ void LilliputEngine::viewportScrollTo(int goalX, int goalY) { _soundHandler->contentFct5(); } -void LilliputEngine::renderCharacters(byte *buf, int x, int y) { +void LilliputEngine::renderCharacters(byte *buf, byte x, byte y) { debugC(2, kDebugEngine, "renderCharacters(buf, %d, %d)", x, y); if ((_nextDisplayCharacterX != x) || (_nextDisplayCharacterY != y)) return; - bool _byte16552 = 0; + byte _byte16552 = 0; if (buf[1] != 0xFF) { int tmpIndex = buf[1]; - if (_rulesChunk9[tmpIndex] == 16) + if ((_rulesChunk9[tmpIndex] & 16) == 0) ++_byte16552; } @@ -1249,12 +1249,12 @@ void LilliputEngine::renderCharacters(byte *buf, int x, int y) { sub1546F(displayX, displayY); if (_byte16552 != 1) { - int var3 = _rulesBuffer2_9[index]; + int flag = _rulesBuffer2_9[index]; int frame = _rulesBuffer2_4[index]; if (frame != 0xFFFF) { frame += _scriptHandler->_array10AB1[index]; - if (var3 & 1) + if ((flag & 1) == 1) frame += _rulesBuffer2_8[index]; if (_array12299[index] != 0xFF) { @@ -1263,7 +1263,7 @@ void LilliputEngine::renderCharacters(byte *buf, int x, int y) { frame = -frame; } - displayFunction18(frame, displayX, displayY, var3); + displayFunction18(frame, displayX, displayY, flag); } } diff --git a/engines/lilliput/lilliput.h b/engines/lilliput/lilliput.h index 029c84361a..1c15e8a486 100644 --- a/engines/lilliput/lilliput.h +++ b/engines/lilliput/lilliput.h @@ -251,7 +251,7 @@ public: void sub17224(int var1, int var4); void sub17264(int index, int var4); - void renderCharacters(byte *buf, int x, int y); + void renderCharacters(byte *buf, byte x, byte y); void sub16553(byte *buf); diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp index d6a35c04c3..3186826957 100644 --- a/engines/lilliput/script.cpp +++ b/engines/lilliput/script.cpp @@ -2789,7 +2789,7 @@ void LilliputScript::OC_displayVGAFile() { int curWord = _currScript->readUint16LE(); int index = _vm->_rulesChunk3[curWord]; Common::String fileName = Common::String((const char *)&_vm->_rulesChunk4[index]); - _word1881B = -1; + _word1881B = 0xFFFF; _vm->displayVGAFile(fileName); OC_PaletteFadeIn(); } |