Skip to content

Commit

Permalink
PRINCE: LMB in inventory - update
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Jun 22, 2014
1 parent 1ca309f commit 96a1d24
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions engines/prince/prince.cpp
Expand Up @@ -1694,13 +1694,17 @@ void PrinceEngine::inventoryLeftMouseButton() {
return;
}
} else {
// when this happens?
// test bx, RMBMask 7996 ? right mouse button here? - > return;
//disable_use
if (_currentPointerNumber == 2) {
//disableuseuse
changeCursor(1);
_currentPointerNumber = 1;
//exit_normally
_selectedMob = 0;
_optionsMob = 0;
return;
} else {
return;
}
Expand All @@ -1726,10 +1730,13 @@ void PrinceEngine::inventoryLeftMouseButton() {
printAt(0, 216, _variaTxt->getString(textNr), kNormalWidth / 2, 100);
loadVoice(0, 28, Common::String::format("%05d-01.WAV", textNr));
playSample(28, 0);
//exit_normally
} else {
//store_new_pc
// storeNewPC();

_flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob - 1]._mask);
//byeinv
_showInventoryFlag = false;
}
}
} else {
Expand All @@ -1752,9 +1759,8 @@ void PrinceEngine::inventoryLeftMouseButton() {
//store_new_pc
// storeNewPC();
_flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob - 1]._mask);
_selectedMob = 0;
_optionsMob = 0;
//bye_inv
_showInventoryFlag = false;
}
} else if (_optionEnabled == 1) {
// not_examine
Expand All @@ -1771,9 +1777,8 @@ void PrinceEngine::inventoryLeftMouseButton() {
//store_new_pc
// storeNewPC();
_flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob - 1]._mask);
_selectedMob = 0;
_optionsMob = 0;
//bye_inv
_showInventoryFlag = false;
}
} else if (_optionEnabled == 4) {
// not_use_inv
Expand All @@ -1795,10 +1800,13 @@ void PrinceEngine::inventoryLeftMouseButton() {
printAt(0, 216, _variaTxt->getString(textNr), kNormalWidth / 2, 100);
loadVoice(0, 28, Common::String::format("%05d-01.WAV", textNr));
playSample(28, 0);
//exit_normally
} else {
//store_new_pc
// storeNewPC();

_flags->setFlagValue(Flags::CURRMOB, _invMobList[_selectedMob - 1]._mask);
//byeinv
_showInventoryFlag = false;
}
}
//exit_normally
Expand Down Expand Up @@ -2018,13 +2026,23 @@ void PrinceEngine::displayInventory() {
}
}

if (!_showInventoryFlag) {
break;
}

if (shouldQuit())
return;

getDebugger()->onFrame();
_graph->update(_graph->_screenForInventory);
pause();
}

if (_currentPointerNumber == 2) {
_flags->setFlagValue(Flags::SELITEM, _selectedItem);
} else {
_flags->setFlagValue(Flags::SELITEM, 0);
}
}

void PrinceEngine::createDialogBox(Common::Array<DialogLine> &dialogData) {
Expand Down

0 comments on commit 96a1d24

Please sign in to comment.