diff options
author | Paul Gilbert | 2015-01-20 08:20:07 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-01-20 08:20:07 -0500 |
commit | 2427f203ee9b98d639ecb0bde6aad17c35875a43 (patch) | |
tree | f1a92a4a64acd145d08226a12465bbcef5799217 /engines/xeen/party.cpp | |
parent | aab62d606ec726b6363f067cee17c284d8b396d1 (diff) | |
download | scummvm-rg350-2427f203ee9b98d639ecb0bde6aad17c35875a43.tar.gz scummvm-rg350-2427f203ee9b98d639ecb0bde6aad17c35875a43.tar.bz2 scummvm-rg350-2427f203ee9b98d639ecb0bde6aad17c35875a43.zip |
XEEN: Implemented handleLight
Diffstat (limited to 'engines/xeen/party.cpp')
-rw-r--r-- | engines/xeen/party.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp index 4571bbe518..3736869eb4 100644 --- a/engines/xeen/party.cpp +++ b/engines/xeen/party.cpp @@ -231,6 +231,7 @@ Party::Party(XeenEngine *vm): _vm(vm) { _partyDead = false; _newDay = false; _isNight = false; + _stepped = false; } void Party::synchronize(Common::Serializer &s) { @@ -543,5 +544,21 @@ void Party::resetTemps() { _blessedActive = false; } +void Party::handleLight() { + Map &map = *_vm->_map; + + if (_stepped) { + map.cellFlagLookup(_mazePosition); + if (map._currentIsDrain && _lightCount) + --_lightCount; + + if (checkSkill(CARTOGRAPHER)) { + map.mazeDataCurrent()._steppedOnTiles[_mazePosition.y & 15][_mazePosition.x & 15] = true; + } + } + + _vm->_interface->_intrIndex1 = _lightCount || + (map.mazeData()._mazeFlags2 & FLAG_IS_DARK) == 0 ? 4 : 0; +} } // End of namespace Xeen |