mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 12:48:16 +00:00
TRECISION: Set SObject._flg private, add accessors
This commit is contained in:
parent
c6254cfc78
commit
d22c218897
@ -23,10 +23,11 @@
|
||||
#include "trecision/3d.h"
|
||||
#include "trecision/actor.h"
|
||||
|
||||
|
||||
#include "trecision/sound.h"
|
||||
#include "trecision/scheduler.h"
|
||||
#include "trecision/defines.h"
|
||||
#include "trecision/graphics.h"
|
||||
#include "trecision/sound.h"
|
||||
#include "trecision/trecision.h"
|
||||
|
||||
namespace Trecision {
|
||||
@ -442,7 +443,7 @@ void Actor::actorDoAction(int action) {
|
||||
_vm->_pathFind->_lastStep = stepIdx; // Last step
|
||||
|
||||
// Starts action
|
||||
if (_vm->_obj[_vm->_curObj]._flag & kObjFlagRoomOut)
|
||||
if (_vm->_obj[_vm->_curObj].isRoomOut())
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERGOTOEXIT, MP_DEFAULT, _vm->_obj[_vm->_curObj]._goRoom, 0, _vm->_obj[_vm->_curObj]._ninv, _vm->_curObj);
|
||||
else
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERDOACTION, MP_DEFAULT, 0, 0, 0, 0);
|
||||
|
@ -116,10 +116,10 @@ void AnimTypeManager::executeAtFrameDoit(ATFHandle *h, int doit, int obj) {
|
||||
_vm->_forcedActorPos = BOX_NORMAL;
|
||||
break;
|
||||
case fSETEXTRA:
|
||||
_vm->_obj[obj]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[obj].setExtra(true);
|
||||
break;
|
||||
case fCLREXTRA:
|
||||
_vm->_obj[obj]._flag &= ~kObjFlagExtra;
|
||||
_vm->_obj[obj].setExtra(false);
|
||||
break;
|
||||
|
||||
case fANIMOFF1:
|
||||
|
@ -177,31 +177,31 @@ void DialogManager::afterChoice() {
|
||||
case dTRAMP171:
|
||||
if (_curChoice == 80) {
|
||||
_vm->_obj[ocTRAMP17]._action = 213;
|
||||
_vm->_obj[ocTRAMP17]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(false);
|
||||
} else if (_curChoice == 77) {
|
||||
_vm->_obj[ocTRAMP17]._action = 211;
|
||||
_vm->_obj[ocTRAMP17]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case dTRAMP1714:
|
||||
if (_curChoice == 106) {
|
||||
_vm->_obj[ocTRAMP17]._action = 213;
|
||||
_vm->_obj[ocTRAMP17]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case dTRAMP1713:
|
||||
if (_curChoice == 91) {
|
||||
_vm->_obj[ocTRAMP17]._action = 212;
|
||||
_vm->_obj[ocTRAMP17]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(false);
|
||||
}
|
||||
break;
|
||||
|
||||
case dTRAMP1716:
|
||||
if (_curChoice == 122) {
|
||||
_vm->_obj[ocTRAMP17]._action = 212;
|
||||
_vm->_obj[ocTRAMP17]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(false);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -212,7 +212,7 @@ void DialogManager::afterChoice() {
|
||||
_vm->_room[kRoom17]._bkgAnim = aBKG17B;
|
||||
_vm->addIcon(kItemSkate);
|
||||
} else if (_curChoice == 137) {
|
||||
_vm->_obj[ocTRAMP17]._flag |= kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -220,13 +220,13 @@ void DialogManager::afterChoice() {
|
||||
if ((_curChoice == 151) || (_curChoice == 152)) {
|
||||
_vm->_inventoryObj[kItemRubysPhoto]._action = 1465;
|
||||
_vm->_obj[oTESSERA1A]._action = 238;
|
||||
if (_vm->_obj[oTESSERA1A]._flag & kObjFlagExtra) {
|
||||
if (_vm->_obj[oTESSERA1A].isExtra()) {
|
||||
toggleChoice(154, true);
|
||||
toggleChoice(153, false);
|
||||
} else
|
||||
toggleChoice(153, true);
|
||||
} else if (_curChoice == 154) {
|
||||
if (_vm->_obj[oTESSERA1A]._flag & kObjFlagExtra)
|
||||
if (_vm->_obj[oTESSERA1A].isExtra())
|
||||
toggleChoice(183, true);
|
||||
} else if (_curChoice == 155)
|
||||
_vm->_obj[ocGUARD18]._action = 228;
|
||||
@ -280,14 +280,14 @@ void DialogManager::afterChoice() {
|
||||
|
||||
switch (_curDialog) {
|
||||
case dPOLIZIOTTO16:
|
||||
if ((isDialogFinished(61)) && (isDialogFinished(62)) && (_vm->_obj[ocPOLIZIOTTO16]._flag & kObjFlagExtra))
|
||||
if ((isDialogFinished(61)) && (isDialogFinished(62)) && _vm->_obj[ocPOLIZIOTTO16].isExtra())
|
||||
_vm->setObjectVisible(ocPOLIZIOTTO16, false);
|
||||
break;
|
||||
|
||||
case dTRAMP171:
|
||||
if (_curChoice == 77) {
|
||||
_vm->_obj[ocTRAMP17]._action = 211;
|
||||
_vm->_obj[ocTRAMP17]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocTRAMP17].setPerson(false);
|
||||
} else if (_curChoice == 80)
|
||||
_vm->_obj[ocTRAMP17]._action = 213;
|
||||
else if (_curChoice == 122)
|
||||
@ -302,16 +302,16 @@ void DialogManager::afterChoice() {
|
||||
break;
|
||||
|
||||
case dEVA19:
|
||||
_vm->_obj[oDOORC18]._flag &= ~kObjFlagRoomOut;
|
||||
_vm->_obj[oDOORC18].setRoomOut(false);
|
||||
_vm->_obj[oDOORC18]._action = 221;
|
||||
_vm->_obj[ocEVA19]._action = 1999;
|
||||
_vm->_obj[ocEVA19]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocEVA19].setPerson(false);
|
||||
break;
|
||||
|
||||
case dSHOPKEEPER1A:
|
||||
if (_curChoice == 185) {
|
||||
_vm->changeRoom(kRoom18, a1810ENTRADALNEGOZIO, 10);
|
||||
_vm->_obj[oDOORN18]._flag &= ~kObjFlagRoomOut;
|
||||
_vm->_obj[oDOORN18].setRoomOut(false);
|
||||
_vm->_obj[oDOORN18]._action = 218;
|
||||
_vm->setObjectAnim(oDOORN18, 0);
|
||||
} else if (_curChoice == 183)
|
||||
|
@ -544,10 +544,10 @@ void GraphicsManager::paintScreen(bool flag) {
|
||||
_vm->_flagWaitRegen = false;
|
||||
|
||||
// Handle papaverine delayed action
|
||||
if ((_vm->_curRoom == kRoom4A) && (_vm->_obj[oCHOCOLATES4A]._flag & kObjFlagExtra)) {
|
||||
if (_vm->_curRoom == kRoom4A && _vm->_obj[oCHOCOLATES4A].isExtra()) {
|
||||
if (_vm->_animMgr->smkCurFrame(kSmackerBackground) > 480) {
|
||||
_vm->playScript(s4AHELLEN);
|
||||
_vm->_obj[oCHOCOLATES4A]._flag &= ~kObjFlagExtra;
|
||||
_vm->_obj[oCHOCOLATES4A].setExtra(false);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -93,18 +93,18 @@ void LogicManager::setupAltRoom(uint16 room, bool altRoomFl) {
|
||||
// if we can go beyond
|
||||
if (((_vm->iconPos(kItemMagneticBar) != -1) && (_vm->_dialogMgr->isDialogFinished(436) || _vm->_dialogMgr->isDialogFinished(466)))
|
||||
|| (_vm->_dialogMgr->isDialogFinished(451) || _vm->_dialogMgr->isDialogFinished(481))) {
|
||||
_vm->_obj[od21TO23]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[od21TO23]._flag &= ~kObjFlagExamine;
|
||||
_vm->_obj[od21TO23].setRoomOut(true);
|
||||
_vm->_obj[od21TO23].setExamine(false);
|
||||
} else {
|
||||
_vm->_obj[od21TO23]._flag &= ~kObjFlagRoomOut;
|
||||
_vm->_obj[od21TO23]._flag |= kObjFlagExamine;
|
||||
_vm->_obj[od21TO23].setRoomOut(false);
|
||||
_vm->_obj[od21TO23].setExamine(true);
|
||||
}
|
||||
|
||||
_vm->setObjectAnim(od21TO23, 0);
|
||||
_vm->setObjectVisible(oEXIT21, true);
|
||||
|
||||
_vm->_obj[od21TO22]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[od21TO22]._flag &= ~kObjFlagExamine;
|
||||
_vm->_obj[od21TO22].setRoomOut(true);
|
||||
_vm->_obj[od21TO22].setExamine(false);
|
||||
_vm->setObjectAnim(od21TO22, aWALKOUT);
|
||||
_vm->setObjectAnim(oDOORA21, a212);
|
||||
_vm->setObjectAnim(oDOORC21, a219);
|
||||
@ -118,19 +118,19 @@ void LogicManager::setupAltRoom(uint16 room, bool altRoomFl) {
|
||||
_vm->_obj[oCHAIN21]._position = 6;
|
||||
_vm->_obj[oEXIT21]._position = 21;
|
||||
|
||||
_vm->_obj[od21TO23]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[od21TO23]._flag &= ~kObjFlagExamine;
|
||||
_vm->_obj[od21TO23].setRoomOut(true);
|
||||
_vm->_obj[od21TO23].setExamine(false);
|
||||
_vm->setObjectAnim(od21TO23, aWALKOUT);
|
||||
_vm->setObjectVisible(oEXIT21, true);
|
||||
|
||||
// If we can go beyond
|
||||
if (((_vm->iconPos(kItemMagneticBar) != -1) && (_vm->_dialogMgr->isDialogFinished(436) || _vm->_dialogMgr->isDialogFinished(466)))
|
||||
|| (_vm->_dialogMgr->isDialogFinished(451) || _vm->_dialogMgr->isDialogFinished(481))) {
|
||||
_vm->_obj[od21TO22]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[od21TO22]._flag &= ~kObjFlagExamine;
|
||||
_vm->_obj[od21TO22].setRoomOut(true);
|
||||
_vm->_obj[od21TO22].setExamine(false);
|
||||
} else {
|
||||
_vm->_obj[od21TO22]._flag &= ~kObjFlagRoomOut;
|
||||
_vm->_obj[od21TO22]._flag |= kObjFlagExamine;
|
||||
_vm->_obj[od21TO22].setRoomOut(false);
|
||||
_vm->_obj[od21TO22].setExamine(true);
|
||||
}
|
||||
_vm->setObjectAnim(od21TO22, 0);
|
||||
_vm->_obj[od21TO22]._examine = 335;
|
||||
@ -195,7 +195,7 @@ void LogicManager::setupAltRoom(uint16 room, bool altRoomFl) {
|
||||
_vm->read3D("2E.3d");
|
||||
_vm->_room[kRoom2E].setExtra(false);
|
||||
_vm->setObjectVisible(oDUMMY2E, false);
|
||||
_vm->_obj[oENTRANCE2E]._flag &= ~kObjFlagExamine;
|
||||
_vm->_obj[oENTRANCE2E].setExamine(false);
|
||||
_vm->setObjectVisible(oCATWALKB2E, false);
|
||||
_vm->setObjectVisible(oCRATER2E, false);
|
||||
_vm->setObjectVisible(oSHRUBS2E, false);
|
||||
@ -207,7 +207,7 @@ void LogicManager::setupAltRoom(uint16 room, bool altRoomFl) {
|
||||
_vm->_room[kRoom2E].setExtra(true);
|
||||
_vm->setObjectVisible(oDUMMY2E, true);
|
||||
_vm->setObjectVisible(oENTRANCE2E, true);
|
||||
_vm->_obj[oENTRANCE2E]._flag |= kObjFlagExamine;
|
||||
_vm->_obj[oENTRANCE2E].setExamine(true);
|
||||
_vm->setObjectVisible(oCATWALKB2E, true);
|
||||
_vm->setObjectVisible(oCRATER2E, true);
|
||||
_vm->setObjectVisible(oSHRUBS2E, true);
|
||||
@ -363,7 +363,7 @@ bool LogicManager::startPlayDialog() {
|
||||
} else if (_vm->_curRoom == kRoom1A && (_vm->_oldRoom == kRoom18)) {
|
||||
if (!_vm->_room[kRoom1A].isDone()) {
|
||||
_vm->_dialogMgr->playDialog(dF1A1);
|
||||
_vm->_obj[oTOPO1C]._flag |= kObjFlagTake;
|
||||
_vm->_obj[oTOPO1C].setTake(true);
|
||||
_vm->setObjectAnim(oTOPO1C, a1C3RACCOGLIETOPO);
|
||||
} else {
|
||||
_vm->tendIn();
|
||||
@ -784,16 +784,16 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
|
||||
switch (_vm->_useWith[USED]) {
|
||||
case kItemBankNote:
|
||||
if (_vm->_useWith[WITH] == oDISTRIBUTORE13 && !(_vm->_obj[oDISTRIBUTORE13]._flag & kObjFlagExtra)) {
|
||||
if (_vm->_useWith[WITH] == oDISTRIBUTORE13 && !_vm->_obj[oDISTRIBUTORE13].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a131USABANCONOTA, 0, 0, _vm->_useWith[WITH]);
|
||||
*printSentence = false;
|
||||
_vm->_obj[oDISTRIBUTORE13]._flag |= kObjFlagExtra;
|
||||
} else if ((_vm->_useWith[WITH] == oDISTRIBUTORE13) && (_vm->_obj[oDISTRIBUTORE13]._flag & kObjFlagExtra) && _vm->isObjectVisible(oLATTINA13)) {
|
||||
_vm->_obj[oDISTRIBUTORE13].setExtra(true);
|
||||
} else if ((_vm->_useWith[WITH] == oDISTRIBUTORE13) && _vm->_obj[oDISTRIBUTORE13].isExtra() && _vm->isObjectVisible(oLATTINA13)) {
|
||||
_vm->_textMgr->characterSay(1410);
|
||||
*printSentence = false;
|
||||
} else if ((_vm->_useWith[WITH] == oDISTRIBUTORE13) && (_vm->_obj[oDISTRIBUTORE13]._flag & kObjFlagExtra)) {
|
||||
if (!(_vm->_obj[oSCOMPARTO13]._flag & kObjFlagExtra)) {
|
||||
_vm->_obj[oSCOMPARTO13]._flag |= kObjFlagExtra;
|
||||
} else if ((_vm->_useWith[WITH] == oDISTRIBUTORE13) && _vm->_obj[oDISTRIBUTORE13].isExtra()) {
|
||||
if (!_vm->_obj[oSCOMPARTO13].isExtra()) {
|
||||
_vm->_obj[oSCOMPARTO13].setExtra(true);
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a1311DABOTTADISTRIBUTORE, 0, 0, _vm->_useWith[WITH]);
|
||||
} else
|
||||
_vm->_textMgr->characterSay(1411);
|
||||
@ -836,9 +836,9 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
case kItemLetterboxKey:
|
||||
if (_vm->_useWith[WITH] == oBOXES12) {
|
||||
if (!(_vm->_obj[oBOXES12]._flag & kObjFlagExtra)) {
|
||||
if (!_vm->_obj[oBOXES12].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, kAnim121TryOpenLetterboxes, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oBOXES12]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oBOXES12].setExtra(true);
|
||||
*printSentence = false;
|
||||
} else {
|
||||
_vm->_textMgr->characterSay(1426);
|
||||
@ -860,8 +860,8 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
if (_vm->_useWith[WITH] == oSLOT12 || _vm->_useWith[WITH] == oSLOT13 || _vm->_useWith[WITH] == oSLOT16) {
|
||||
*printSentence = false;
|
||||
_vm->_inventoryObj[kItemLiftCard]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oSLOT12]._flag |= kObjFlagPerson;
|
||||
_vm->_obj[oLIFTA12]._flag |= kObjFlagPerson;
|
||||
_vm->_obj[oSLOT12].setPerson(true);
|
||||
_vm->_obj[oLIFTA12].setPerson(true);
|
||||
_vm->doMouseTalk(_vm->_useWith[WITH]);
|
||||
} else if ((_vm->_useWith[WITH] == oTICKETOFFICE16) || (_vm->_useWith[WITH] == oSLOT23) || (_vm->_useWith[WITH] == oFRONTOFFICEA35) || (_vm->_useWith[WITH] == oSLOTA58) || (_vm->_useWith[WITH] == oSLOTB58)) {
|
||||
*printSentence = false;
|
||||
@ -965,7 +965,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a333LOSEBAR, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->removeIcon(kItemBar);
|
||||
*printSentence = false;
|
||||
} else if (_vm->_obj[_vm->_useWith[WITH]]._flag & kObjFlagPerson) {
|
||||
} else if (_vm->_obj[_vm->_useWith[WITH]].isPerson()) {
|
||||
_vm->_textMgr->characterSay(1436);
|
||||
*printSentence = false;
|
||||
} else if ((_vm->_useWith[WITH] == oTAKE12) || (_vm->_useWith[WITH] == oSTRONGBOXC15) || (_vm->_useWith[WITH] == oDOOR18) || (_vm->_useWith[WITH] == oPADLOCK1B) || (_vm->_useWith[WITH] == oDOORC21) || (_vm->_useWith[WITH] == oPANELC23) || (_vm->_useWith[WITH] == oDOOR2A) || (_vm->_useWith[WITH] == oDOOR2B)) {
|
||||
@ -975,7 +975,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
|
||||
case kItemSubwayCard:
|
||||
if ((_vm->_useWith[WITH] == oTICKETOFFICE16) && (_vm->_obj[oMAPPA16]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oTICKETOFFICE16) && _vm->_obj[oMAPPA16].isExtra()) {
|
||||
if (_vm->_dialogMgr->isDialogFinished(49)) {
|
||||
_vm->_textMgr->characterSay(1457);
|
||||
*printSentence = false;
|
||||
@ -997,7 +997,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
|
||||
case kItemFiveCreditCoin:
|
||||
if ((_vm->_useWith[WITH] == oTICKETOFFICE16) && (_vm->_obj[oMAPPA16]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oTICKETOFFICE16) && _vm->_obj[oMAPPA16].isExtra()) {
|
||||
_vm->_dialogMgr->toggleChoice(46, false);
|
||||
_vm->_dialogMgr->toggleChoice(47, false);
|
||||
_vm->_dialogMgr->toggleChoice(48, false);
|
||||
@ -1005,7 +1005,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
_vm->playScript(S16MONEY);
|
||||
*printSentence = false;
|
||||
_vm->removeIcon(kItemFiveCreditCoin);
|
||||
_vm->_obj[oFINGERPADP16]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[oFINGERPADP16].setRoomOut(true);
|
||||
} else if (_vm->_useWith[WITH] == oTICKETOFFICE16) {
|
||||
_vm->_textMgr->characterSay(146);
|
||||
*printSentence = false;
|
||||
@ -1042,9 +1042,9 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
*updateInventory = false;
|
||||
*printSentence = false;
|
||||
} else if (_vm->_useWith[WITH] == ocPOLIZIOTTO16) {
|
||||
_vm->_obj[ocPOLIZIOTTO16]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[ocPOLIZIOTTO16].setExtra(true);
|
||||
_vm->_textMgr->characterSay(1461);
|
||||
if (_vm->_dialogMgr->isDialogFinished(61) && _vm->_dialogMgr->isDialogFinished(62) && (_vm->_obj[ocPOLIZIOTTO16]._flag & kObjFlagExtra))
|
||||
if (_vm->_dialogMgr->isDialogFinished(61) && _vm->_dialogMgr->isDialogFinished(62) && _vm->_obj[ocPOLIZIOTTO16].isExtra())
|
||||
_vm->setObjectVisible(ocPOLIZIOTTO16, false);
|
||||
*printSentence = false;
|
||||
} else if (_vm->_useWith[WITH] == ocGUARD18) {
|
||||
@ -1147,8 +1147,8 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
_vm->_dialogMgr->toggleChoice(155, true);
|
||||
_vm->_dialogMgr->playDialog(dGUARDIAN18);
|
||||
*updateInventory = false;
|
||||
_vm->_obj[ocGUARD18]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[oDOORC18]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[ocGUARD18].setPerson(false);
|
||||
_vm->_obj[oDOORC18].setRoomOut(true);
|
||||
*printSentence = false;
|
||||
} else if (_vm->_useWith[WITH] == ocGUARD18) {
|
||||
_vm->_textMgr->characterSay(1494);
|
||||
@ -1196,7 +1196,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
_vm->setObjectAnim(oPANNELLOM31, 0);
|
||||
_vm->_obj[oPANNELLOM31]._examine = 715;
|
||||
_vm->_obj[oPANNELLOM31]._action = 716;
|
||||
_vm->_obj[oPANNELLOM31]._flag &= ~kObjFlagRoomOut;
|
||||
_vm->_obj[oPANNELLOM31].setRoomOut(false);
|
||||
}
|
||||
_vm->_soundMgr->play(wCOVER31);
|
||||
*printSentence = false;
|
||||
@ -1387,7 +1387,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
|
||||
case kItemEmptyBeerCan:
|
||||
if ((_vm->_useWith[WITH] == oBRACIERES28) && (_vm->_obj[oBRACIERES28]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oBRACIERES28) && _vm->_obj[oBRACIERES28].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a286, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oBRACIERES28]._examine = 456;
|
||||
*printSentence = false;
|
||||
@ -1503,11 +1503,11 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
|
||||
case kItemSecurityCard:
|
||||
if ((_vm->_useWith[WITH] == oFRONTOFFICEA35) && !(_vm->_obj[oFRONTOFFICEA35]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oFRONTOFFICEA35) && !_vm->_obj[oFRONTOFFICEA35].isExtra()) {
|
||||
_vm->changeRoom(kRoom35P, 0, 10);
|
||||
_vm->removeIcon(kItemSecurityCard);
|
||||
*printSentence = false;
|
||||
} else if ((_vm->_useWith[WITH] == oFRONTOFFICEA35) && (_vm->_obj[oFRONTOFFICEA35]._flag & kObjFlagExtra)) {
|
||||
} else if ((_vm->_useWith[WITH] == oFRONTOFFICEA35) && _vm->_obj[oFRONTOFFICEA35].isExtra()) {
|
||||
_vm->_textMgr->characterSay(1844);
|
||||
*printSentence = false;
|
||||
} else if ((_vm->_useWith[WITH] == oSLOTA58) || (_vm->_useWith[WITH] == oSLOTB58)) {
|
||||
@ -1536,8 +1536,8 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
*printSentence = false;
|
||||
} else if (_vm->_useWith[WITH] == oCAMPANA4U) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a4U3, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oCAMPANA4U]._flag |= kObjFlagExtra;
|
||||
if ((_vm->_obj[oCAMPANA4U]._flag & kObjFlagExtra) && (_vm->_inventoryObj[kItemIronBullet1]._flag & kObjFlagExtra)) {
|
||||
_vm->_obj[oCAMPANA4U].setExtra(true);
|
||||
if (_vm->_obj[oCAMPANA4U].isExtra() && (_vm->_inventoryObj[kItemIronBullet1]._flag & kObjFlagExtra)) {
|
||||
_vm->_obj[oCAMPANA4U]._examine = 1202;
|
||||
_vm->_obj[oCAMPANA4U]._action = 1203;
|
||||
} else
|
||||
@ -1547,9 +1547,9 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
|
||||
case kItemHammer:
|
||||
if ((_vm->_useWith[WITH] == oRAGNO41) && !(_vm->_obj[oRAGNO41]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oRAGNO41) && !_vm->_obj[oRAGNO41].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a416, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oRAGNO41]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oRAGNO41].setExtra(true);
|
||||
_vm->setObjectAnim(oRAGNO41, 0);
|
||||
if (_vm->_obj[oSLOT41]._anim == a414)
|
||||
_vm->setObjectAnim(oSLOT41, a417);
|
||||
@ -1581,9 +1581,9 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
break;
|
||||
|
||||
case kItemClub:
|
||||
if ((_vm->_useWith[WITH] == oTAMBURO43) && !(_vm->_obj[oTAMBURO43]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oTAMBURO43) && !_vm->_obj[oTAMBURO43].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a435, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oTAMBURO43]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oTAMBURO43].setExtra(true);
|
||||
*printSentence = false;
|
||||
} else if ((_vm->_useWith[WITH] == oDOORC4B) || (_vm->_useWith[WITH] == oSERRATURA4B) || (_vm->_useWith[WITH] == oLICANTROPO4P)) {
|
||||
*printSentence = false;
|
||||
@ -1603,7 +1603,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
if (_vm->_useWith[WITH] == oMANOPOLAR45) {
|
||||
_vm->changeRoom(kRoom45S, 0, 2);
|
||||
*printSentence = false;
|
||||
} else if ((_vm->_useWith[WITH] == oCAMPANA4U) && (_vm->_inventoryObj[kItemIronBullet1]._flag & kObjFlagExtra) && (_vm->_obj[oCAMPANA4U]._flag & kObjFlagExtra)) {
|
||||
} else if ((_vm->_useWith[WITH] == oCAMPANA4U) && (_vm->_inventoryObj[kItemIronBullet1]._flag & kObjFlagExtra) && _vm->_obj[oCAMPANA4U].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a4U5, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oCAMPANA4U]._examine = 1204;
|
||||
_vm->_obj[oCAMPANA4U]._action = 1205;
|
||||
@ -1694,7 +1694,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
_vm->removeIcon(_vm->_useWith[USED]);
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a4U4, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_inventoryObj[kItemIronBullet1]._flag |= kObjFlagExtra;
|
||||
if ((_vm->_obj[oCAMPANA4U]._flag & kObjFlagExtra) && (_vm->_inventoryObj[kItemIronBullet1]._flag & kObjFlagExtra)) {
|
||||
if (_vm->_obj[oCAMPANA4U].isExtra() && (_vm->_inventoryObj[kItemIronBullet1]._flag & kObjFlagExtra)) {
|
||||
_vm->_obj[oCAMPANA4U]._examine = 1202;
|
||||
_vm->_obj[oCAMPANA4U]._action = 1203;
|
||||
} else
|
||||
@ -1711,7 +1711,7 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
} else if (_vm->_useWith[WITH] == oCHOCOLATES4A) {
|
||||
_vm->setObjectAnim(oPULSANTE4A, a4A3);
|
||||
*printSentence = false;
|
||||
_vm->_obj[oCHOCOLATES4A]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oCHOCOLATES4A].setExtra(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1832,13 +1832,13 @@ void LogicManager::useInventoryWithScreen(bool *updateInventory, bool *printSent
|
||||
case kItemTester:
|
||||
if ((_vm->_useWith[WITH] == oPANNELLOA) && _vm->_dialogMgr->isDialogFinished(856)) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a569, 0, 0, _vm->_useWith[WITH]);
|
||||
_vm->_obj[oPANNELLOA]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oPANNELLOA].setExtra(true);
|
||||
*printSentence = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case kItemParallelCutter:
|
||||
if ((_vm->_useWith[WITH] == oPANNELLOA) && (_vm->_obj[oPANNELLOA]._flag & kObjFlagExtra)) {
|
||||
if ((_vm->_useWith[WITH] == oPANNELLOA) && _vm->_obj[oPANNELLOA].isExtra()) {
|
||||
_vm->_dialogMgr->playDialog(dF562);
|
||||
_vm->setObjectVisible(oPANNELLOA, false);
|
||||
_vm->setObjectVisible(oCAVOTAGLIATO56, true);
|
||||
@ -1936,7 +1936,7 @@ bool LogicManager::useScreenWithScreen() {
|
||||
_vm->setObjectAnim(oPANNELLOM31, a314APREPANNELLO);
|
||||
_vm->_obj[oPANNELLOM31]._examine = 713;
|
||||
_vm->_obj[oPANNELLOM31]._action = 714;
|
||||
_vm->_obj[oPANNELLOM31]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[oPANNELLOM31].setRoomOut(true);
|
||||
_vm->setObjectVisible(oPANNELLON31, true);
|
||||
|
||||
_vm->setObjectVisible(oMANOMETROC34, true);
|
||||
@ -2075,7 +2075,7 @@ bool LogicManager::mouseExamine(uint16 curObj) {
|
||||
|
||||
case oMAPPA16:
|
||||
if (_vm->iconPos(kItemNoteRotmall17) != -1)
|
||||
_vm->_obj[oMAPPA16]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oMAPPA16].setExtra(true);
|
||||
retVal = true;
|
||||
break;
|
||||
|
||||
@ -2102,7 +2102,7 @@ bool LogicManager::mouseExamine(uint16 curObj) {
|
||||
case oTESSERA1A:
|
||||
if ((_vm->_dialogMgr->isDialogFinished(151) || _vm->_dialogMgr->isDialogFinished(152)) && !_vm->_dialogMgr->isDialogFinished(183))
|
||||
_vm->_dialogMgr->toggleChoice(183, true);
|
||||
_vm->_obj[oTESSERA1A]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oTESSERA1A].setExtra(true);
|
||||
retVal = true;
|
||||
break;
|
||||
|
||||
@ -2354,8 +2354,8 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
|
||||
case ocPOLIZIOTTO16:
|
||||
case oSCALA16:
|
||||
if (!(_vm->_obj[oSCALA16]._flag & kObjFlagExtra)) {
|
||||
_vm->_obj[oSCALA16]._flag |= kObjFlagExtra;
|
||||
if (!_vm->_obj[oSCALA16].isExtra()) {
|
||||
_vm->_obj[oSCALA16].setExtra(true);
|
||||
_vm->_dialogMgr->toggleChoice(61, true);
|
||||
_vm->_dialogMgr->playDialog(dPOLIZIOTTO16);
|
||||
_vm->_obj[oSCALA16]._action = 166;
|
||||
@ -2365,13 +2365,13 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case oPANNELLOC12:
|
||||
if (_vm->_obj[oPANNELLOC12]._flag & kObjFlagExtra) {
|
||||
if (_vm->_obj[oPANNELLOC12].isExtra()) {
|
||||
if (_vm->isObjectVisible(oASCENSOREC12))
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a128RIUSABOTTONE, 0, 0, curObj);
|
||||
else
|
||||
_vm->_textMgr->characterSay(24);
|
||||
} else {
|
||||
_vm->_obj[oPANNELLOC12]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oPANNELLOC12].setExtra(true);
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, _vm->_obj[curObj]._anim, 0, 0, curObj);
|
||||
}
|
||||
break;
|
||||
@ -2420,7 +2420,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
_vm->_textMgr->characterSay(_vm->_obj[oTASTOB15]._action);
|
||||
retVal = false;
|
||||
} else {
|
||||
if (!(_vm->_obj[oNASTRO15]._flag & kObjFlagExtra))
|
||||
if (!_vm->_obj[oNASTRO15].isExtra())
|
||||
_vm->setObjectVisible(oNASTRO15, true);
|
||||
if (_vm->_obj[curObj]._anim)
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, _vm->_obj[curObj]._anim, 0, 0, curObj);
|
||||
@ -2445,11 +2445,11 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case oDOORC18:
|
||||
if (_vm->_obj[ocGUARD18]._flag & kObjFlagPerson) {
|
||||
if (_vm->_obj[ocGUARD18].isPerson()) {
|
||||
_vm->_dialogMgr->toggleChoice(151, false);
|
||||
_vm->_dialogMgr->toggleChoice(152, true);
|
||||
_vm->_dialogMgr->playDialog(dGUARDIAN18);
|
||||
_vm->_obj[ocGUARD18]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocGUARD18].setPerson(false);
|
||||
_vm->_obj[ocGUARD18]._action = 227;
|
||||
_vm->_obj[oDOORC18]._action = 220;
|
||||
} else
|
||||
@ -2457,7 +2457,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case oGRATA1C:
|
||||
if (_vm->_obj[oFAX17]._flag & kObjFlagExtra)
|
||||
if (_vm->_obj[oFAX17].isExtra())
|
||||
_vm->changeRoom(kRoom21, 0, 10);
|
||||
else
|
||||
retVal = true;
|
||||
@ -2521,9 +2521,9 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
else if (_vm->isObjectVisible(oLAMPADINAS29)) {
|
||||
_vm->changeRoom(kRoom29L);
|
||||
retVal = false;
|
||||
} else if (!(_vm->_obj[_vm->_curObj]._flag & kObjFlagExtra)) {
|
||||
} else if (!_vm->_obj[_vm->_curObj].isExtra()) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a291USAINTERRUTTORELUCE, 0, 0, curObj);
|
||||
_vm->_obj[_vm->_curObj]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[_vm->_curObj].setExtra(true);
|
||||
retVal = false;
|
||||
} else
|
||||
retVal = true;
|
||||
@ -2574,7 +2574,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
if (_vm->_obj[curObj]._anim) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, _vm->_obj[curObj]._anim, 0, 0, curObj);
|
||||
_vm->_obj[oBRACIERES28]._examine = 455;
|
||||
_vm->_obj[oBRACIERES28]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oBRACIERES28].setExtra(true);
|
||||
} else
|
||||
retVal = true;
|
||||
break;
|
||||
@ -2598,7 +2598,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case oPANELM2G:
|
||||
if (!(_vm->_obj[oPANELM2G]._flag & kObjFlagExtra)) {
|
||||
if (!_vm->_obj[oPANELM2G].isExtra()) {
|
||||
_vm->_dialogMgr->playDialog(dF2G1);
|
||||
_vm->setObjectVisible(oCOPERCHIO2G, false);
|
||||
_vm->setObjectVisible(oSERBATOIOC2G, false);
|
||||
@ -2606,7 +2606,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
_vm->setObjectVisible(oRAGAZZOS2G, true);
|
||||
_vm->setObjectVisible(oSERBATOIOA2G, true);
|
||||
_vm->setObjectVisible(oPANNELLOE2G, true);
|
||||
_vm->_obj[oPANELM2G]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oPANELM2G].setExtra(true);
|
||||
_vm->_animMgr->_animTab[aBKG2G]._flag |= SMKANIM_OFF1;
|
||||
retVal = false;
|
||||
} else
|
||||
@ -2642,10 +2642,10 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case oCATWALKA2E:
|
||||
if (!(_vm->_obj[oCATWALKA2E]._flag & kObjFlagExtra)) {
|
||||
if (!_vm->_obj[oCATWALKA2E].isExtra()) {
|
||||
_vm->_dialogMgr->playDialog(dF2E1);
|
||||
_vm->setObjectVisible(oDINOSAURO2E, true);
|
||||
_vm->_obj[oCATWALKA2E]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oCATWALKA2E].setExtra(true);
|
||||
_vm->_animMgr->_animTab[aBKG2E]._flag &= ~SMKANIM_OFF2;
|
||||
retVal = false;
|
||||
} else if (_vm->_obj[curObj]._anim) {
|
||||
@ -2685,7 +2685,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
_vm->setObjectAnim(oPANNELLOM31, 0);
|
||||
_vm->_obj[oPANNELLOM31]._examine = 715;
|
||||
_vm->_obj[oPANNELLOM31]._action = 716;
|
||||
_vm->_obj[oPANNELLOM31]._flag &= ~kObjFlagRoomOut;
|
||||
_vm->_obj[oPANNELLOM31].setRoomOut(false);
|
||||
_vm->changeRoom(kRoom31, a3118CHIUDEPANNELLO, 3);
|
||||
} else
|
||||
retVal = true;
|
||||
@ -2716,7 +2716,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
_vm->setObjectVisible(omPIANO35, true);
|
||||
|
||||
_vm->setObjectAnim(oFRONTOFFICEC35, a356PROVASPORTELLO);
|
||||
_vm->_obj[oASCENSORE35]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[oASCENSORE35].setRoomOut(true);
|
||||
_vm->setObjectAnim(oASCENSORE35, a3514ENTRAASCENSORE);
|
||||
|
||||
_vm->_animMgr->_animTab[aBKG35]._flag |= SMKANIM_OFF1;
|
||||
@ -2763,8 +2763,8 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
|
||||
_vm->setObjectAnim(oFRONTOFFICEA35, 0);
|
||||
_vm->_obj[oFRONTOFFICEA35]._action = 1844;
|
||||
_vm->_obj[oFRONTOFFICEA35]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oDOORMC36]._flag |= kObjFlagRoomOut;
|
||||
_vm->_obj[oFRONTOFFICEA35].setExtra(true);
|
||||
_vm->_obj[oDOORMC36].setRoomOut(true);
|
||||
_vm->setObjectAnim(oDOORMC36, a3610APREPORTA);
|
||||
_vm->setObjectAnim(oSCAFFALE36, a3615APRENDESCAFFALE);
|
||||
|
||||
@ -2989,7 +2989,7 @@ bool LogicManager::mouseOperate(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case oLAVATRICEL54:
|
||||
if (_vm->_obj[curObj]._anim && (_vm->_obj[oSECCHIOS54]._flag & kObjFlagExtra) && _vm->isObjectVisible(oGRATAC54) && !_vm->_dialogMgr->isDialogFinished(841))
|
||||
if (_vm->_obj[curObj]._anim && _vm->_obj[oSECCHIOS54].isExtra() && _vm->isObjectVisible(oGRATAC54) && !_vm->_dialogMgr->isDialogFinished(841))
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, _vm->_obj[curObj]._anim, 0, 0, curObj);
|
||||
else
|
||||
retVal = true;
|
||||
@ -3114,7 +3114,7 @@ bool LogicManager::mouseTake(uint16 curObj) {
|
||||
retVal = false;
|
||||
break;
|
||||
case oNASTRO15:
|
||||
_vm->_obj[oNASTRO15]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oNASTRO15].setExtra(true);
|
||||
retVal = false;
|
||||
break;
|
||||
case oMONETA13:
|
||||
@ -3123,7 +3123,7 @@ bool LogicManager::mouseTake(uint16 curObj) {
|
||||
retVal = true;
|
||||
break;
|
||||
case oFOGLIETTO14:
|
||||
_vm->_obj[oFOGLIETTO14]._flag |= kObjFlagExtra;
|
||||
_vm->_obj[oFOGLIETTO14].setExtra(true);
|
||||
_vm->_obj[oMAPPA16]._examine = 152;
|
||||
retVal = false;
|
||||
break;
|
||||
@ -3149,19 +3149,18 @@ bool LogicManager::mouseTalk(uint16 curObj) {
|
||||
|
||||
switch (curObj) {
|
||||
case oTICKETOFFICE16:
|
||||
if ((_vm->_obj[oFINGERPADP16]._flag & kObjFlagRoomOut) && _vm->_dialogMgr->isDialogFinished(50)) {
|
||||
if (_vm->_obj[oFINGERPADP16].isRoomOut() && _vm->_dialogMgr->isDialogFinished(50)) {
|
||||
_vm->_textMgr->characterSay(147);
|
||||
retVal = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!_vm->_dialogMgr->isChoiceVisible(49) && !_vm->_dialogMgr->isChoiceVisible(50)) {
|
||||
if (_vm->_obj[oMAPPA16]._flag & kObjFlagExtra) {
|
||||
if (_vm->_obj[oMAPPA16].isExtra()) {
|
||||
_vm->_dialogMgr->toggleChoice(46, true);
|
||||
_vm->_dialogMgr->toggleChoice(48, true);
|
||||
_vm->_obj[oTICKETOFFICE16]._flag |= kObjFlagExtra;
|
||||
}
|
||||
else {
|
||||
_vm->_obj[oTICKETOFFICE16].setExtra(true);
|
||||
} else {
|
||||
if (_vm->_dialogMgr->isDialogFinished(46)) {
|
||||
_vm->_textMgr->characterSay(_vm->_obj[oTICKETOFFICE16]._action);
|
||||
retVal = false;
|
||||
@ -3175,7 +3174,7 @@ bool LogicManager::mouseTalk(uint16 curObj) {
|
||||
break;
|
||||
|
||||
case ocGUARD18:
|
||||
_vm->_obj[ocGUARD18]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[ocGUARD18].setPerson(false);
|
||||
_vm->_obj[ocGUARD18]._action = 227;
|
||||
_vm->_obj[oDOORC18]._action = 220;
|
||||
break;
|
||||
@ -3697,7 +3696,7 @@ void LogicManager::doMouseLeftRight() {
|
||||
// right combination
|
||||
if ((_wheelPos[0] == 7) && (_wheelPos[1] == 5) && (_wheelPos[2] == 11)) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a2C6PREMEPULSANTEAPERTURA, 0, 0, _vm->_curObj);
|
||||
_vm->_obj[oSFINGE2C]._flag &= ~kObjFlagPerson;
|
||||
_vm->_obj[oSFINGE2C].setPerson(false);
|
||||
} else
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, a2C6PREMEPULSANTE, 0, 0, _vm->_curObj);
|
||||
|
||||
@ -3780,26 +3779,26 @@ void LogicManager::doMouseLeftRight() {
|
||||
}
|
||||
return;
|
||||
} else if ((_vm->_curMessage->_event == ME_MLEFT) &&
|
||||
((!_vm->_room[_vm->_curRoom].hasExtra() && ((_vm->_curObj == oENTRANCE2E) || (_vm->_curObj == od24TO26) || (_vm->_curObj == od21TO23 && !(_vm->_obj[_vm->_curObj]._flag & kObjFlagExamine)))) ||
|
||||
(_vm->_room[_vm->_curRoom].hasExtra() && ((_vm->_curObj == od2ETO2C) || (_vm->_curObj == od24TO23) || (_vm->_curObj == od21TO22 && !(_vm->_obj[_vm->_curObj]._flag & kObjFlagExamine)) || (_vm->_curObj == od2GVTO26))))) {
|
||||
((!_vm->_room[_vm->_curRoom].hasExtra() && ((_vm->_curObj == oENTRANCE2E) || (_vm->_curObj == od24TO26) || (_vm->_curObj == od21TO23 && !_vm->_obj[_vm->_curObj].isExamine()))) ||
|
||||
(_vm->_room[_vm->_curRoom].hasExtra() && ((_vm->_curObj == od2ETO2C) || (_vm->_curObj == od24TO23) || (_vm->_curObj == od21TO22 && !_vm->_obj[_vm->_curObj].isExamine()) || (_vm->_curObj == od2GVTO26))))) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERGOTO, MP_DEFAULT, _vm->_curMessage->_u16Param1, _vm->_curMessage->_u16Param2, 0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_vm->_curMessage->_event == ME_MRIGHT) {
|
||||
if (!(_vm->_obj[_vm->_curObj]._flag & kObjFlagExamine) && (_vm->_curObj != 0)) {
|
||||
if (!_vm->_obj[_vm->_curObj].isExamine() && (_vm->_curObj != 0)) {
|
||||
if (_vm->_flagUseWithStarted) {
|
||||
_vm->_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERGOTO, MP_DEFAULT, _vm->_curMessage->_u16Param1, _vm->_curMessage->_u16Param2, 0, 0);
|
||||
return;
|
||||
}
|
||||
if (_vm->_obj[_vm->_curObj]._flag & kObjFlagRoomIn)
|
||||
if (_vm->_obj[_vm->_curObj].isRoomIn())
|
||||
_vm->changeRoom(_vm->_obj[_vm->_curObj]._goRoom, _vm->_obj[_vm->_curObj]._anim, _vm->_obj[_vm->_curObj]._ninv);
|
||||
else if (_vm->_obj[_vm->_curObj]._flag & kObjFlagRoomOut)
|
||||
else if (_vm->_obj[_vm->_curObj].isRoomOut())
|
||||
_vm->changeRoom(_vm->_obj[_vm->_curObj]._goRoom, 0, _vm->_obj[_vm->_curObj]._ninv);
|
||||
_vm->_actor->actorStop();
|
||||
_vm->_pathFind->nextStep();
|
||||
_vm->_obj[_vm->_curObj]._flag |= kObjFlagDone;
|
||||
} else if (_vm->_obj[_vm->_curObj]._flag & kObjFlagUseWith) {
|
||||
_vm->_obj[_vm->_curObj].setDone(true);
|
||||
} else if (_vm->_obj[_vm->_curObj].isUseWith()) {
|
||||
_vm->_pathFind->_characterGoToPosition = -1;
|
||||
_vm->_actor->actorStop();
|
||||
_vm->_pathFind->nextStep();
|
||||
|
@ -57,32 +57,8 @@ void TrecisionEngine::loadAll() {
|
||||
for (int i = 0; i < MAXROOMS; ++i)
|
||||
_room[i].loadRoom(&dataNl);
|
||||
|
||||
for (int i = 0; i < MAXOBJ; ++i) {
|
||||
uint16 w = dataNl.readUint16LE();
|
||||
uint16 h = dataNl.readUint16LE();
|
||||
_obj[i]._rect.left = dataNl.readUint16LE();
|
||||
_obj[i]._rect.top = dataNl.readUint16LE();
|
||||
_obj[i]._rect.setWidth(w);
|
||||
_obj[i]._rect.setHeight(h);
|
||||
|
||||
_obj[i]._lim.left = dataNl.readUint16LE();
|
||||
_obj[i]._lim.top = dataNl.readUint16LE();
|
||||
_obj[i]._lim.right = dataNl.readUint16LE();
|
||||
_obj[i]._lim.bottom = dataNl.readUint16LE();
|
||||
|
||||
_obj[i]._position = dataNl.readSByte();
|
||||
dataNl.readByte(); // Padding
|
||||
_obj[i]._name = dataNl.readUint16LE();
|
||||
_obj[i]._examine = dataNl.readUint16LE();
|
||||
_obj[i]._action = dataNl.readUint16LE();
|
||||
_obj[i]._goRoom = dataNl.readByte();
|
||||
_obj[i]._nbox = dataNl.readByte();
|
||||
_obj[i]._ninv = dataNl.readByte();
|
||||
_obj[i]._mode = dataNl.readByte();
|
||||
_obj[i]._flag = dataNl.readByte();
|
||||
dataNl.readByte(); // Padding
|
||||
_obj[i]._anim = dataNl.readUint16LE();
|
||||
}
|
||||
for (int i = 0; i < MAXOBJ; ++i)
|
||||
_obj[i].loadObj(&dataNl);
|
||||
|
||||
for (int i = 0; i < MAXINVENTORY; ++i) {
|
||||
_inventoryObj[i]._name = dataNl.readUint16LE();
|
||||
|
@ -464,22 +464,8 @@ bool TrecisionEngine::syncGameStream(Common::Serializer &ser) {
|
||||
for (int a = 0; a < MAXROOMS; a++)
|
||||
_room[a].syncGameStream(ser);
|
||||
|
||||
for (int a = 0; a < MAXOBJ; a++) {
|
||||
ser.syncAsUint16LE(_obj[a]._lim.left);
|
||||
ser.syncAsUint16LE(_obj[a]._lim.top);
|
||||
ser.syncAsUint16LE(_obj[a]._lim.right);
|
||||
ser.syncAsUint16LE(_obj[a]._lim.bottom);
|
||||
ser.syncAsUint16LE(_obj[a]._name);
|
||||
ser.syncAsUint16LE(_obj[a]._examine);
|
||||
ser.syncAsUint16LE(_obj[a]._action);
|
||||
ser.syncAsUint16LE(_obj[a]._anim);
|
||||
ser.syncAsByte(_obj[a]._mode);
|
||||
ser.syncAsByte(_obj[a]._flag);
|
||||
ser.syncAsByte(_obj[a]._goRoom);
|
||||
ser.syncAsByte(_obj[a]._nbox);
|
||||
ser.syncAsByte(_obj[a]._ninv);
|
||||
ser.syncAsSByte(_obj[a]._position);
|
||||
}
|
||||
for (int a = 0; a < MAXOBJ; a++)
|
||||
_obj[a].syncGameStream(ser);
|
||||
|
||||
for (int a = 0; a < MAXINVENTORY; a++) {
|
||||
ser.syncAsUint16LE(_inventoryObj[a]._name);
|
||||
|
@ -147,7 +147,7 @@ void TrecisionEngine::doAction() {
|
||||
_obj[_curObj]._mode &= ~OBJMODE_HIDDEN;
|
||||
|
||||
if (_flagUseWithStarted) {
|
||||
if ((_obj[_curObj]._flag & (kObjFlagRoomOut | kObjFlagRoomIn)) && !(_obj[_curObj]._flag & kObjFlagExamine))
|
||||
if ((_obj[_curObj].isRoomOut() || _obj[_curObj].isRoomIn()) && !_obj[_curObj].isExamine())
|
||||
return;
|
||||
_flagUseWithStarted = false;
|
||||
_flagInventoryLocked = false;
|
||||
@ -155,7 +155,7 @@ void TrecisionEngine::doAction() {
|
||||
_useWithInv[WITH] = false;
|
||||
_lightIcon = 0xFF;
|
||||
|
||||
if (!_useWithInv[USED] && (_curObj == _useWith[USED])) {
|
||||
if (!_useWithInv[USED] && _curObj == _useWith[USED]) {
|
||||
_useWith[USED] = 0;
|
||||
_useWith[WITH] = 0;
|
||||
_useWithInv[USED] = false;
|
||||
@ -168,7 +168,7 @@ void TrecisionEngine::doAction() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_curMessage->_event == ME_MOUSEOPERATE && (_obj[_curObj]._flag & kObjFlagUseWith)) {
|
||||
if (_curMessage->_event == ME_MOUSEOPERATE && _obj[_curObj].isUseWith()) {
|
||||
_flagUseWithStarted = true;
|
||||
_flagInventoryLocked = true;
|
||||
_useWith[USED] = _curObj;
|
||||
@ -182,26 +182,26 @@ void TrecisionEngine::doAction() {
|
||||
|
||||
switch (_curMessage->_event) {
|
||||
case ME_MOUSEOPERATE:
|
||||
if (_obj[_curObj]._flag & kObjFlagRoomIn)
|
||||
if (_obj[_curObj].isRoomIn())
|
||||
doRoomIn(_curObj);
|
||||
else if (_obj[_curObj]._flag & kObjFlagPerson)
|
||||
else if (_obj[_curObj].isPerson())
|
||||
doMouseTalk(_curObj);
|
||||
else if (_obj[_curObj]._flag & kObjFlagRoomOut)
|
||||
else if (_obj[_curObj].isRoomOut())
|
||||
doRoomOut(_curObj);
|
||||
else if (_obj[_curObj]._flag & kObjFlagTake)
|
||||
else if (_obj[_curObj].isTake())
|
||||
doMouseTake(_curObj);
|
||||
else
|
||||
doMouseOperate(_curObj);
|
||||
break;
|
||||
|
||||
case ME_MOUSEEXAMINE:
|
||||
if (_obj[_curObj]._flag & kObjFlagExamine)
|
||||
if (_obj[_curObj].isExamine())
|
||||
doMouseExamine(_curObj);
|
||||
else if (_obj[_curObj]._flag & kObjFlagRoomIn)
|
||||
else if (_obj[_curObj].isRoomIn())
|
||||
doRoomIn(_curObj);
|
||||
else if (_obj[_curObj]._flag & kObjFlagPerson)
|
||||
else if (_obj[_curObj].isPerson())
|
||||
doMouseExamine(_curObj);
|
||||
else if (_obj[_curObj]._flag & kObjFlagRoomOut)
|
||||
else if (_obj[_curObj].isRoomOut())
|
||||
doRoomOut(_curObj);
|
||||
else
|
||||
doMouseExamine(_curObj);
|
||||
@ -477,7 +477,7 @@ void TrecisionEngine::doRoomIn(uint16 curObj) {
|
||||
|
||||
changeRoom(_obj[curObj]._goRoom, curAction, curPos);
|
||||
|
||||
_obj[curObj]._flag |= kObjFlagDone;
|
||||
_obj[curObj].setDone(true);
|
||||
}
|
||||
|
||||
void TrecisionEngine::doRoomOut(uint16 curObj) {
|
||||
@ -489,7 +489,7 @@ void TrecisionEngine::doRoomOut(uint16 curObj) {
|
||||
if (curAction)
|
||||
_scheduler->doEvent(MC_CHARACTER, ME_CHARACTERACTION, MP_DEFAULT, curAction, _obj[curObj]._goRoom, curPos, curObj);
|
||||
|
||||
_obj[curObj]._flag |= kObjFlagDone;
|
||||
_obj[curObj].setDone(true);
|
||||
}
|
||||
|
||||
void TrecisionEngine::doMouseExamine(uint16 curObj) {
|
||||
|
@ -45,4 +45,57 @@ void SRoom::syncGameStream(Common::Serializer &ser) {
|
||||
ser.syncAsUint16LE(_bkgAnim);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
|
||||
void SObject::readRect(Common::SeekableReadStream *stream) {
|
||||
_rect.left = stream->readUint16LE();
|
||||
_rect.top = stream->readUint16LE();
|
||||
_rect.setWidth(stream->readUint16LE());
|
||||
_rect.setHeight(stream->readUint16LE());
|
||||
}
|
||||
|
||||
void SObject::syncGameStream(Common::Serializer &ser) {
|
||||
ser.syncAsUint16LE(_lim.left);
|
||||
ser.syncAsUint16LE(_lim.top);
|
||||
ser.syncAsUint16LE(_lim.right);
|
||||
ser.syncAsUint16LE(_lim.bottom);
|
||||
ser.syncAsUint16LE(_name);
|
||||
ser.syncAsUint16LE(_examine);
|
||||
ser.syncAsUint16LE(_action);
|
||||
ser.syncAsUint16LE(_anim);
|
||||
ser.syncAsByte(_mode);
|
||||
ser.syncAsByte(_flag);
|
||||
ser.syncAsByte(_goRoom);
|
||||
ser.syncAsByte(_nbox);
|
||||
ser.syncAsByte(_ninv);
|
||||
ser.syncAsSByte(_position);
|
||||
}
|
||||
|
||||
void SObject::loadObj(Common::File *file) {
|
||||
uint16 w = file->readUint16LE();
|
||||
uint16 h = file->readUint16LE();
|
||||
_rect.left = file->readUint16LE();
|
||||
_rect.top = file->readUint16LE();
|
||||
_rect.setWidth(w);
|
||||
_rect.setHeight(h);
|
||||
|
||||
_lim.left = file->readUint16LE();
|
||||
_lim.top = file->readUint16LE();
|
||||
_lim.right = file->readUint16LE();
|
||||
_lim.bottom = file->readUint16LE();
|
||||
|
||||
_position = file->readSByte();
|
||||
file->readByte(); // Padding
|
||||
_name = file->readUint16LE();
|
||||
_examine = file->readUint16LE();
|
||||
_action = file->readUint16LE();
|
||||
_goRoom = file->readByte();
|
||||
_nbox = file->readByte();
|
||||
_ninv = file->readByte();
|
||||
_mode = file->readByte();
|
||||
_flag = file->readByte();
|
||||
file->readByte(); // Padding
|
||||
_anim = file->readUint16LE();
|
||||
}
|
||||
|
||||
} // namespace Trecision
|
||||
|
@ -68,24 +68,40 @@ struct SObject {
|
||||
3- objStatus
|
||||
6- center when click !
|
||||
7- inventory referenceable */
|
||||
uint8 _flag; /* Examine = 0
|
||||
Direction = 1
|
||||
Person = 2
|
||||
Carried = 3
|
||||
2- Take
|
||||
3- Open
|
||||
4- Close
|
||||
5- Use
|
||||
6- Extra
|
||||
7- Operated */
|
||||
uint16 _anim;
|
||||
|
||||
void readRect(Common::SeekableReadStream *stream);
|
||||
void setDone(bool on) { if (on) _flag |= kObjFlagDone; else _flag &= ~kObjFlagDone; }
|
||||
void setExamine(bool on) { if (on) _flag |= kObjFlagExamine; else _flag &= ~kObjFlagExamine; }
|
||||
void setExtra(bool on) { if (on) _flag |= kObjFlagExtra; else _flag &= ~kObjFlagExtra; }
|
||||
void setPerson(bool on) { if (on) _flag |= kObjFlagPerson; else _flag &= ~kObjFlagPerson; }
|
||||
void setRoomOut(bool on) { if (on) _flag |= kObjFlagRoomOut; else _flag &= ~kObjFlagRoomOut; }
|
||||
void setRoomIn(bool on) { if (on) _flag |= kObjFlagRoomIn; else _flag &= ~kObjFlagRoomIn; }
|
||||
void setTake(bool on) { if (on) _flag |= kObjFlagTake; else _flag &= ~kObjFlagTake; }
|
||||
|
||||
void readRect(Common::SeekableReadStream *stream) {
|
||||
_rect.left = stream->readUint16LE();
|
||||
_rect.top = stream->readUint16LE();
|
||||
_rect.setWidth(stream->readUint16LE());
|
||||
_rect.setHeight(stream->readUint16LE());
|
||||
}
|
||||
bool isDone() { return _flag & kObjFlagDone; }
|
||||
bool isExamine() { return _flag & kObjFlagExamine; }
|
||||
bool isExtra() { return _flag & kObjFlagExtra; }
|
||||
bool isPerson() { return _flag & kObjFlagPerson; }
|
||||
bool isRoomIn() { return _flag & kObjFlagRoomIn; }
|
||||
bool isRoomOut() { return _flag & kObjFlagRoomOut; }
|
||||
bool isTake() { return _flag & kObjFlagTake; }
|
||||
bool isUseWith() { return _flag & kObjFlagUseWith; }
|
||||
|
||||
void syncGameStream(Common::Serializer &ser);
|
||||
void loadObj(Common::File *file);
|
||||
|
||||
private:
|
||||
uint8 _flag = 0; /* Examine = 0
|
||||
Direction = 1
|
||||
Person = 2
|
||||
Carried = 3
|
||||
2- Take
|
||||
3- Open
|
||||
4- Close
|
||||
5- Use
|
||||
6- Extra
|
||||
7- Operated */
|
||||
};
|
||||
|
||||
struct SInvObject {
|
||||
|
@ -269,7 +269,7 @@ void TextManager::showObjName(uint16 obj, bool show) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_vm->_obj[_vm->_curObj]._flag & (kObjFlagRoomOut | kObjFlagRoomIn)) && !(_vm->_obj[_vm->_curObj]._flag & kObjFlagExamine))
|
||||
if ((_vm->_obj[_vm->_curObj].isRoomOut() || _vm->_obj[_vm->_curObj].isRoomIn()) && !_vm->_obj[_vm->_curObj].isExamine())
|
||||
return;
|
||||
|
||||
desc = _vm->_sysText[kMessageUse];
|
||||
@ -306,8 +306,8 @@ void TextManager::showObjName(uint16 obj, bool show) {
|
||||
|
||||
if (obj == _vm->_lastObj)
|
||||
return;
|
||||
if (!(_vm->_obj[obj]._flag & kObjFlagExamine)) {
|
||||
if ((_vm->_obj[obj]._flag & kObjFlagDone) || _vm->_room[_vm->_obj[obj]._goRoom].isDone()) {
|
||||
if (!_vm->_obj[obj].isExamine()) {
|
||||
if (_vm->_obj[obj].isDone() || _vm->_room[_vm->_obj[obj]._goRoom].isDone()) {
|
||||
desc = _vm->_sysText[kMessageGoto];
|
||||
if (_vm->_obj[obj]._mode & OBJMODE_HIDDEN)
|
||||
desc += dunno;
|
||||
|
@ -312,7 +312,7 @@ void AnimManager::toggleMuteBgAnim(uint16 animation) {
|
||||
decoder->muteTrack(1, true);
|
||||
else if (animation == aBKG14 && (animFlag & SMKANIM_OFF1))
|
||||
decoder->muteTrack(1, true);
|
||||
else if (animation == aBKG1C && (_vm->_obj[oFAX17]._flag & kObjFlagExtra)) {
|
||||
else if (animation == aBKG1C && _vm->_obj[oFAX17].isExtra()) {
|
||||
_animTab[animation]._flag |= SMKANIM_OFF1;
|
||||
decoder->muteTrack(1, true);
|
||||
} else if (animation == aBKG1D && (animFlag & SMKANIM_OFF1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user