diff options
author | lukaslw | 2014-06-21 21:38:39 +0200 |
---|---|---|
committer | lukaslw | 2014-06-22 20:09:24 +0200 |
commit | d67690c5f6f0c839038edbb45bcc43cce2fffd86 (patch) | |
tree | 7c1f8b40d6b4749a2ef218f88764e62e7b3892c4 /engines/prince | |
parent | a428f324f2a85e0a86f6751f0f27da6f1f71f967 (diff) | |
download | scummvm-rg350-d67690c5f6f0c839038edbb45bcc43cce2fffd86.tar.gz scummvm-rg350-d67690c5f6f0c839038edbb45bcc43cce2fffd86.tar.bz2 scummvm-rg350-d67690c5f6f0c839038edbb45bcc43cce2fffd86.zip |
PRINCE: Inventory turning on - update
Diffstat (limited to 'engines/prince')
-rw-r--r-- | engines/prince/prince.cpp | 16 | ||||
-rw-r--r-- | engines/prince/prince.h | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index da2f635d33..d074ff78e1 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -83,7 +83,7 @@ PrinceEngine::PrinceEngine(OSystem *syst, const PrinceGameDescription *gameDesc) _invLineX(134), _invLineY(176), _invLine(5), _invLines(3), _invLineW(70), _invLineH(76), _maxInvW(72), _maxInvH(76), _invLineSkipX(2), _invLineSkipY(3), _showInventoryFlag(false), _inventoryBackgroundRemember(false), _mst_shadow(0), _mst_shadow2(0), _candleCounter(0), _invX1(53), _invY1(18), _invWidth(536), _invHeight(438), - _invCurInside(false), _optionsFlag(false), _optionEnabled(0), _invExamY(120), + _invCurInside(false), _optionsFlag(false), _optionEnabled(0), _invExamY(120), _invMaxCount(2), _invCounter(0), _optionsMob(0), _currentPointerNumber(1), _selectedMob(0), _selectedItem(0), _selectedMode(0), _optionsWidth(210), _optionsHeight(170), _invOptionsWidth(210), _invOptionsHeight(130), _optionsStep(20), _invOptionsStep(20), _optionsNumber(7), _invOptionsNumber(5), _optionsColor1(236), _optionsColor2(252), @@ -2315,8 +2315,18 @@ void PrinceEngine::mainLoop() { // inventory turning on: Common::Point mousePos = _system->getEventManager()->getMousePos(); - if (mousePos.y == 0 && !_showInventoryFlag) { - inventoryFlagChange(true); + if (mousePos.y < 4 && !_showInventoryFlag) { + _invCounter++; + } else { + _invCounter = 0; + } + if (_invCounter >= _invMaxCount) { + if (_flags->getFlagValue(Flags::INVALLOWED) != 1) { + // 29 - Basement, 50 - Map, 59 - Intro + if (_locationNr != 29 && _locationNr != 50 && _locationNr != 59) { + inventoryFlagChange(true); + } + } } if (_debugger->_locationNr != _locationNr) diff --git a/engines/prince/prince.h b/engines/prince/prince.h index 4782287132..de3809b92d 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -330,6 +330,8 @@ public: int _mst_shadow; int _mst_shadow2; // blinking after adding new item int _candleCounter; // special counter for candle inventory item + int _invMaxCount; // time to turn inventory on + int _invCounter; // turning on counter void inventoryFlagChange(bool inventoryState); bool loadAllInv(); |