diff options
author | Bendegúz Nagy | 2016-08-26 22:50:13 +0200 |
---|---|---|
committer | Bendegúz Nagy | 2016-08-26 23:02:22 +0200 |
commit | 89473344d872962dc4ac2c828f6a1c7dfc17867d (patch) | |
tree | c292b8be17226428feebdae32b767285efec8e48 /engines/dm/dm.cpp | |
parent | 92a3ccb4a7d1eafb16ae5f469c271f277d1261a3 (diff) | |
download | scummvm-rg350-89473344d872962dc4ac2c828f6a1c7dfc17867d.tar.gz scummvm-rg350-89473344d872962dc4ac2c828f6a1c7dfc17867d.tar.bz2 scummvm-rg350-89473344d872962dc4ac2c828f6a1c7dfc17867d.zip |
DM: Fix several bugs realted to dungeon thing management and item handling
Diffstat (limited to 'engines/dm/dm.cpp')
-rw-r--r-- | engines/dm/dm.cpp | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/engines/dm/dm.cpp b/engines/dm/dm.cpp index aa47af2f7a..f591399e2c 100644 --- a/engines/dm/dm.cpp +++ b/engines/dm/dm.cpp @@ -69,11 +69,6 @@ uint16 returnNextVal(uint16 val) { bool isOrientedWestEast(direction dir) { return dir & 1; } - -uint16 setFlag(uint16 &val, uint16 mask) { - return val |= mask; -} - uint16 toggleFlag(uint16& val, uint16 mask) { return val ^= mask; } @@ -314,7 +309,7 @@ void DMEngine::f2_gameloop() { while (true) { if (_g327_newPartyMapIndex != kM1_mapIndexNone) { - T0002002: +T0002002: f3_processNewPartyMap(_g327_newPartyMapIndex); _movsens->f267_getMoveResult(Thing::_party, kM1_MapXNotOnASquare, 0, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY); _g327_newPartyMapIndex = kM1_mapIndexNone; @@ -326,15 +321,34 @@ void DMEngine::f2_gameloop() { if (_g327_newPartyMapIndex != kM1_mapIndexNone) goto T0002002; + if (!_inventoryMan->_g432_inventoryChampionOrdinal && !_championMan->_g300_partyIsSleeping) { + Box box(0, 223, 0, 135); + _displayMan->f135_fillBoxBitmap(_displayMan->_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport); // dummy code + _displayMan->f128_drawDungeon(_dungeonMan->_g308_partyDir, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY); + if (_g325_setMousePointerToObjectInMainLoop) { + _g325_setMousePointerToObjectInMainLoop = false; + _eventMan->f78_showMouse(); + _eventMan->f68_setPointerToObject(_objectMan->_g412_objectIconForMousePointer); + _eventMan->f77_hideMouse(); + + } + if (_eventMan->_g326_refreshMousePointerInMainLoop) { + _eventMan->_g326_refreshMousePointerInMainLoop = false; + _eventMan->_g598_mousePointerBitmapUpdated = true; + _eventMan->f78_showMouse(); + _eventMan->f77_hideMouse(); + } + } + if (_championMan->_g303_partyDead) break; _g313_gameTime++; if (!(_g313_gameTime & 511)) - _inventoryMan->f338_decreaseTorchesLightPower(); - if (_g310_disabledMovementTicks) { - _g310_disabledMovementTicks--; - } + //_inventoryMan->f338_decreaseTorchesLightPower(); + if (_g310_disabledMovementTicks) { + _g310_disabledMovementTicks--; + } if (_championMan->_g407_party._freezeLifeTicks) { _championMan->_g407_party._freezeLifeTicks -= 1; } @@ -345,15 +359,10 @@ void DMEngine::f2_gameloop() { _g321_stopWaitingForPlayerInput = false; //do { - _eventMan->processInput(); - _eventMan->f380_processCommandQueue(); - //} while (!_g321_stopWaitingForPlayerInput /*|| !_g301_gameTimeTicking */); + _eventMan->processInput(); + _eventMan->f380_processCommandQueue(); + //} while (!_g321_stopWaitingForPlayerInput /*|| !_g301_gameTimeTicking */); - if (!_inventoryMan->_g432_inventoryChampionOrdinal && !_championMan->_g300_partyIsSleeping) { - Box box(0, 223, 0, 135); - _displayMan->f135_fillBoxBitmap(_displayMan->_g296_bitmapViewport, box, k0_ColorBlack, k112_byteWidthViewport, k136_heightViewport); // dummy code - _displayMan->f128_drawDungeon(_dungeonMan->_g308_partyDir, _dungeonMan->_g306_partyMapX, _dungeonMan->_g307_partyMapY); - } _displayMan->updateScreen(); _system->delayMillis(18); |