diff options
-rw-r--r-- | engines/supernova/rooms.cpp | 12 | ||||
-rw-r--r-- | engines/supernova/rooms.h | 16 |
2 files changed, 21 insertions, 7 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index 7bae002b6b..b598b0dc4a 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -2250,8 +2250,6 @@ bool ArsanoMeetup2::interact(Action verb, Object &obj1, Object &obj2) { bool ArsanoMeetup3::interact(Action verb, Object &obj1, Object &obj2) { byte row2[6] = {1, 1, 1, 1, 0, 0}; byte row3[6] = {1, 1, 0, 0, 0, 0}; - - // TODO: Hack, to be move away and renamed when the other uses are found byte rowsX[6] = {1, 1, 1, 0, 0, 0}; if ((verb == ACTION_WALK) && (obj1._id == STAR)) @@ -2831,6 +2829,8 @@ bool AxacussBcorridor::interact(Action verb, Object &obj1, Object &obj2) { } bool AxacussIntersection::interact(Action verb, Object &obj1, Object &obj2) { + byte rowsX[6] = {1, 1, 1, 0, 0, 0}; + if (((verb == ACTION_WALK) || (verb == ACTION_OPEN)) && (obj1._id == DOOR) && !isSectionVisible(1)) _gm->guardShot(); else if ((verb == ACTION_OPEN) && (obj1._id == DOOR) && !obj1.hasProperty(OPENED)) { @@ -2844,8 +2844,7 @@ bool AxacussIntersection::interact(Action verb, Object &obj1, Object &obj2) { _gm->_rooms[CORRIDOR9]->getObject(1)->disableProperty(OPENED); return false; } else if ((verb == ACTION_TALK) && (obj1._id == GUARDIAN)) { - // FIXME: refactor _rowsX and _dialogsX - // _gm->dialog(3, &rowsx, &_dialogsX, 0); + _gm->dialog(3, rowsX, _dialogsX, 0); _gm->guardShot(); } else if ((verb == ACTION_TAKE) && (obj1._id == MASTERKEYCARD)) { _gm->great(0); @@ -2860,11 +2859,12 @@ bool AxacussIntersection::interact(Action verb, Object &obj1, Object &obj2) { } bool AxacussExit::interact(Action verb, Object &obj1, Object &obj2) { + byte rowsX[6] = {1, 1, 1, 0, 0, 0}; + if (((verb == ACTION_WALK) || (verb == ACTION_OPEN)) && (obj1._id == DOOR) && !_gm->_state._powerOff) _gm->guard3Shot(); else if ((verb == ACTION_TALK) && (obj1._id == GUARDIAN)) { - // FIXME: refactor _rowsX and _dialogsX - // _gm->dialog(3, &_rowsX, &_dialogsX,0); + _gm->dialog(3, rowsX, _dialogsX,0); _gm->guard3Shot(); } else if ((verb == ACTION_USE) && Object::combine(obj1, obj2, LAMP, MAGNET)) { _gm->_inventory.remove(*_gm->_rooms[CELL]->getObject(7)); diff --git a/engines/supernova/rooms.h b/engines/supernova/rooms.h index 2607abd7b5..164248c24c 100644 --- a/engines/supernova/rooms.h +++ b/engines/supernova/rooms.h @@ -836,7 +836,6 @@ public: _dialog3[0] = kStringDialogArsanoMeetup3_4; _dialog3[1] = kStringDialogArsanoMeetup3_5; - // TODO: Hack, to be move away and renamed when the other uses are found _dialogsX[0] = kStringDialogX1; _dialogsX[1] = kStringDialogX2; _dialogsX[2] = kStringDialogX3; @@ -1168,10 +1167,18 @@ public: _objectState[3] = Object(_id, kStringAxacussan, kStringAxacussanDescription, GUARDIAN, TALK, 0, 0, 0); _objectState[4] = Object(_id, kStringImage, kStringImageDescription2, NULLOBJECT, NULLTYPE, 2, 2, 0); _objectState[5] = Object(_id, kStringMastercard, kStringMastercardDescription, MASTERKEYCARD, TAKE | COMBINABLE, 255, 255, 1); + + _dialogsX[0] = kStringDialogX1; + _dialogsX[1] = kStringDialogX2; + _dialogsX[2] = kStringDialogX3; } virtual bool interact(Action verb, Object &obj1, Object &obj2); + +private: + StringID _dialogsX[6]; }; + class AxacussExit : public Room { public: AxacussExit(SupernovaEngine *vm, GameManager *gm) { @@ -1189,9 +1196,16 @@ public: _objectState[4] = Object(_id, kStringLamp2,kStringDefaultDescription,LAMP,COMBINABLE,3,3,0); _objectState[5] = Object(_id, kStringAxacussan,kStringDefaultDescription,GUARDIAN,TALK,5,5,0); _objectState[6] = Object(_id, kStringImage,kStringGenericDescription5,NULLOBJECT,NULLTYPE,4,4,0); + + _dialogsX[0] = kStringDialogX1; + _dialogsX[1] = kStringDialogX2; + _dialogsX[2] = kStringDialogX3; } virtual bool interact(Action verb, Object &obj1, Object &obj2); + +private: + StringID _dialogsX[6]; }; class AxacussOffice1 : public Room { public: |