Skip to content

Commit

Permalink
LILLIPUT: Fix a couple of glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke authored and sev- committed Mar 28, 2018
1 parent 59b9b70 commit 9054e0f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions engines/lilliput/lilliput.cpp
Expand Up @@ -285,14 +285,15 @@ Common::Platform LilliputEngine::getPlatform() const {


void LilliputEngine::displayFunction18(int index, int position, int flags) {
debugC(2, kDebugEngine, "displayFunction18(%d, %d, %d)", index, position, flags);

byte* buf = _buffer1_45k + ((position & 0xFF) << 8) + (position >> 8);

byte* src = _bufferMen;
if (index < 0) {
src = _bufferIdeogram;
index = -index;
} else if (index > 0xF0) {
} else if (index >= 0xF0) {
src = _bufferMen2;
index -= 0xF0;
}
Expand Down Expand Up @@ -1616,12 +1617,13 @@ void LilliputEngine::displayHeroismIndicator() {
int var4 = (_scriptHandler->_word15FFD >> 8) + ((_scriptHandler->_word15FFD & 0xFF) << 8);
int index = _scriptHandler->_word15FFB + var4 + (var4 >> 2);

if ((_scriptHandler->_byte15FFA & 0xFF) == 0) {
var2 = _scriptHandler->_byte15FFA & 0xFF;
if (var2 != 0) {
// sub16064(var1, _scriptHandler->_byte15FFA);
for (int i = 0; i < (_scriptHandler->_byte15FFA << 2); i++) {
((byte *)_mainSurface->getPixels())[index - (i * 320)] = var1;
((byte *)_mainSurface->getPixels())[index - (i * 320) + 1] = var1;
((byte *)_mainSurface->getPixels())[index - (i * 320) + 2] = var1;
for (int i = 0; i < (var2 << 2); i++) {
((byte *)_mainSurface->getPixels())[index - (i * 320)] = var1;
((byte *)_mainSurface->getPixels())[index - (i * 320) + 1] = var1;
((byte *)_mainSurface->getPixels())[index - (i * 320) + 2] = var1;
}
}

Expand Down

0 comments on commit 9054e0f

Please sign in to comment.