Skip to content

Commit

Permalink
LILLIPUT: Remove some useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Mar 29, 2018
1 parent a4fe03c commit 411e182
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 33 deletions.
39 changes: 9 additions & 30 deletions engines/lilliput/lilliput.cpp
Expand Up @@ -117,7 +117,6 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)

_console = new LilliputConsole(this);
_rnd = 0;
_int8installed = false;
_mousePos = Common::Point(0, 0);
_oldMousePos = Common::Point(0, 0);
_mouseDisplayPos = Common::Point(0, 0);
Expand All @@ -141,9 +140,6 @@ LilliputEngine::LilliputEngine(OSystem *syst, const LilliputGameDescription *gd)
_nextDisplayCharacterPos = Common::Point(0, 0);
_animationTick = 0;
_byte12A05 = 10; // Used to trigger sound and animations in int8, 1 time out of 10
_byte12A06 = 2; // Used to switch _byte12A07 between true and false, 1 time our of 3
_byte12A07 = 0; // Set but never used
_byte12A08 = 0; // Used to avoid two executions of int8 at the same time. Useless in ScummVM
_refreshScreenFlag = false;
_byte16552 = 0;
_lastInterfaceHotspotIndex = -1;
Expand Down Expand Up @@ -262,33 +258,18 @@ void LilliputEngine::update() {
}

void LilliputEngine::newInt8() {
if (_byte12A06 == 0) {
_byte12A06 = 2;
_byte12A07 ^= 1;
}
--_byte12A06;
// TODO: check 'out 20h, 20h'

if (!_int8installed)
return;

// if (_soundEnabled)
_soundHandler->contentFct1();

if (_byte12A08 != 1) {
_byte12A08 = 1;
if (_byte12A05 != 0)
--_byte12A05;
else {
_byte12A05 = 10;
if (_int8Timer != 0)
--_int8Timer;
if (_byte12A05 != 0)
--_byte12A05;
else {
_byte12A05 = 10;
if (_int8Timer != 0)
--_int8Timer;

_animationTick ^= 1;
if (!_refreshScreenFlag)
displayRefreshScreen();
}
_byte12A08 = 0;
_animationTick ^= 1;
if (!_refreshScreenFlag)
displayRefreshScreen();
}
}

Expand Down Expand Up @@ -2819,10 +2800,8 @@ Common::Error LilliputEngine::run() {
CursorMan.showMouse(true);

loadRules();
_int8installed = true;

_lastTime = _system->getMillis();

_scriptHandler->runScript(ScriptStream(_initScript, _initScriptSize));

while (!_shouldQuit) {
Expand Down
1 change: 0 additions & 1 deletion engines/lilliput/lilliput.h
Expand Up @@ -141,7 +141,6 @@ class LilliputEngine : public Engine {
byte _displayStringBuf[160];

bool _saveFlag;
bool _int8installed;
bool _displayMap;

int _word10800_ERULES;
Expand Down
2 changes: 0 additions & 2 deletions engines/lilliput/script.cpp
Expand Up @@ -1378,7 +1378,6 @@ byte LilliputScript::OC_comparePos() {
if (var1 == Common::Point(d1, d2))
return 1;

warning("OC_comparePos - debug: %d-%d %d-%d", var1.x, var1.y, d1, d2);
return 0;
}

Expand Down Expand Up @@ -2661,7 +2660,6 @@ void LilliputScript::OC_setSeek() {

int16 var = getValue1();
_characterSeek[_vm->_currentScriptCharacter] = (byte)(var & 0xFF);
warning("debug - OC_setSeek: _characterSeek[%d] = %d", _vm->_currentScriptCharacter, var);
_vm->_characterSubTargetPosX[_vm->_currentScriptCharacter] = -1;
}

Expand Down

0 comments on commit 411e182

Please sign in to comment.