TSAGE: Bugfix for getting boat hook from fire box

This commit is contained in:
Paul Gilbert 2011-10-18 22:47:47 +11:00
parent 98b6f74acc
commit 7f13c9ee0e
2 changed files with 16 additions and 16 deletions

View file

@ -2484,7 +2484,7 @@ void Scene342::dispatch() {
* *
*--------------------------------------------------------------------------*/ *--------------------------------------------------------------------------*/
bool Scene350::Item5::startAction(CursorType action, Event &event) { bool Scene350::FireBox::startAction(CursorType action, Event &event) {
Scene350 *scene = (Scene350 *)BF_GLOBALS._sceneManager._scene; Scene350 *scene = (Scene350 *)BF_GLOBALS._sceneManager._scene;
switch (action) { switch (action) {
@ -2571,7 +2571,7 @@ bool Scene350::Hook::startAction(CursorType action, Event &event) {
} }
} }
bool Scene350::Object5::startAction(CursorType action, Event &event) { bool Scene350::FireboxInset::startAction(CursorType action, Event &event) {
Scene350 *scene = (Scene350 *)BF_GLOBALS._sceneManager._scene; Scene350 *scene = (Scene350 *)BF_GLOBALS._sceneManager._scene;
switch (action) { switch (action) {
@ -2579,7 +2579,7 @@ bool Scene350::Object5::startAction(CursorType action, Event &event) {
SceneItem::display2(350, BF_INVENTORY.getObjectScene(INV_HOOK) ? 29 : 28); SceneItem::display2(350, BF_INVENTORY.getObjectScene(INV_HOOK) ? 29 : 28);
return true; return true;
case CURSOR_USE: case CURSOR_USE:
scene->_object5.remove(); scene->_fireBoxInset.remove();
return true; return true;
case INV_HOOK: case INV_HOOK:
BF_INVENTORY.setObjectScene(INV_HOOK, 350); BF_INVENTORY.setObjectScene(INV_HOOK, 350);
@ -2592,7 +2592,7 @@ bool Scene350::Object5::startAction(CursorType action, Event &event) {
BF_GLOBALS._sceneItems.push_front(&scene->_hook); BF_GLOBALS._sceneItems.push_front(&scene->_hook);
return true; return true;
default: default:
return NamedObject::startAction(action, event); return FocusObject::startAction(action, event);
} }
} }
@ -2672,8 +2672,8 @@ void Scene350::postInit(SceneObjectList *OwnerList) {
} }
} }
_item5._sceneRegionId = 5; _fireBox._sceneRegionId = 5;
BF_GLOBALS._sceneItems.push_back(&_item5); BF_GLOBALS._sceneItems.push_back(&_fireBox);
_item4.setDetails(15, 350, 0, 1, 2, 1); _item4.setDetails(15, 350, 0, 1, 2, 1);
BF_GLOBALS._sceneItems.push_back(&_yacht); BF_GLOBALS._sceneItems.push_back(&_yacht);
@ -2729,12 +2729,12 @@ void Scene350::signal() {
case 3: case 3:
BF_GLOBALS._player.setStrip(8); BF_GLOBALS._player.setStrip(8);
_object5.postInit(); _fireBoxInset.postInit();
_object5.setVisage(350); _fireBoxInset.setVisage(350);
_object5.setStrip(4); _fireBoxInset.setStrip(4);
_object5.fixPriority(200); _fireBoxInset.fixPriority(200);
_object5.setPosition(Common::Point(85, 166)); _fireBoxInset.setPosition(Common::Point(85, 166));
BF_GLOBALS._sceneItems.push_front(&_object5); BF_GLOBALS._sceneItems.push_front(&_fireBoxInset);
if (BF_INVENTORY.getObjectScene(INV_HOOK) == 350) { if (BF_INVENTORY.getObjectScene(INV_HOOK) == 350) {
_hook.postInit(); _hook.postInit();

View file

@ -432,7 +432,7 @@ public:
class Scene350: public SceneExt { class Scene350: public SceneExt {
/* Items */ /* Items */
class Item5: public NamedHotspot { class FireBox: public NamedHotspot {
public: public:
virtual bool startAction(CursorType action, Event &event); virtual bool startAction(CursorType action, Event &event);
}; };
@ -454,7 +454,7 @@ class Scene350: public SceneExt {
public: public:
virtual bool startAction(CursorType action, Event &event); virtual bool startAction(CursorType action, Event &event);
}; };
class Object5: public NamedObject { class FireboxInset: public FocusObject {
public: public:
virtual bool startAction(CursorType action, Event &event); virtual bool startAction(CursorType action, Event &event);
}; };
@ -470,9 +470,9 @@ public:
SceneObject _yachtDoor; SceneObject _yachtDoor;
BackgroundSceneObject _yachtBody; BackgroundSceneObject _yachtBody;
Hook _hook; Hook _hook;
Object5 _object5; FireboxInset _fireBoxInset;
NamedHotspot _item1, _item2, _item3, _item4; NamedHotspot _item1, _item2, _item3, _item4;
Item5 _item5; FireBox _fireBox;
Yacht _yacht; Yacht _yacht;
SouthWestExit _swExit; SouthWestExit _swExit;
SpeakerGameText _gameTextSpeaker; SpeakerGameText _gameTextSpeaker;