aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage
diff options
context:
space:
mode:
authorStrangerke2011-11-02 01:43:42 +0100
committerStrangerke2011-11-02 01:43:42 +0100
commite38921855cfb88b36c85eb38f18323b476478e78 (patch)
tree68daffab0752b6e00d186c7eded92c858cdc7d94 /engines/tsage
parent1d8960ccde2f07ef687fc088c183432aba25ada3 (diff)
downloadscummvm-rg350-e38921855cfb88b36c85eb38f18323b476478e78.tar.gz
scummvm-rg350-e38921855cfb88b36c85eb38f18323b476478e78.tar.bz2
scummvm-rg350-e38921855cfb88b36c85eb38f18323b476478e78.zip
TSAGE: Blue Force - City Hall (385): Fix Jim action, fix bug when giving him blue prints, change type of _jimFlag
Diffstat (limited to 'engines/tsage')
-rw-r--r--engines/tsage/blue_force/blueforce_scenes3.cpp26
-rw-r--r--engines/tsage/blue_force/blueforce_scenes3.h3
2 files changed, 15 insertions, 14 deletions
diff --git a/engines/tsage/blue_force/blueforce_scenes3.cpp b/engines/tsage/blue_force/blueforce_scenes3.cpp
index 3d42304926..a32bd4ded9 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes3.cpp
@@ -5317,8 +5317,7 @@ bool Scene385::Door::startAction(CursorType action, Event &event) {
bool Scene385::Jim::startAction(CursorType action, Event &event) {
Scene385 *scene = (Scene385 *)BF_GLOBALS._sceneManager._scene;
- switch (action) {
- case CURSOR_TALK:
+ if (action == CURSOR_TALK) {
if (scene->_jimFlag) {
scene->_talkAction = 3867;
scene->setAction(&scene->_action1);
@@ -5342,24 +5341,24 @@ bool Scene385::Jim::startAction(CursorType action, Event &event) {
break;
}
- scene->_jimFlag = 1;
+ scene->_jimFlag = true;
scene->setAction(&scene->_action1);
}
return true;
- case INV_PRINT_OUT:
+ } else if (action == INV_PRINT_OUT) {
if (!BF_GLOBALS.getFlag(fGotPointsForMCard)) {
T2_GLOBALS._uiElements.addScore(30);
- BF_GLOBALS.getFlag(fGotPointsForMCard);
+ BF_GLOBALS.setFlag(fGotPointsForMCard);
scene->setAction(&scene->_action2);
return true;
- }
- break;
- default:
- break;
- }
-
- return NamedObject::startAction(action, event);
+ } else
+ return false;
+ } else if (action < CURSOR_WALK)
+ // Any other inventory item
+ return false;
+ else
+ return NamedObject::startAction(action, event);
}
bool Scene385::Dezi::startAction(CursorType action, Event &event) {
@@ -5430,7 +5429,8 @@ bool Scene385::Exit::startAction(CursorType action, Event &event) {
Scene385::Scene385(): SceneExt() {
- _talkAction = _jimFlag = 0;
+ _talkAction = 0;
+ _jimFlag = false;
}
void Scene385::synchronize(Serializer &s) {
diff --git a/engines/tsage/blue_force/blueforce_scenes3.h b/engines/tsage/blue_force/blueforce_scenes3.h
index 2cff4d5df8..de53db83a9 100644
--- a/engines/tsage/blue_force/blueforce_scenes3.h
+++ b/engines/tsage/blue_force/blueforce_scenes3.h
@@ -815,7 +815,8 @@ public:
SpeakerJake385 _jake385Speaker;
NamedHotspot _item1, _item2, _item3, _item4, _item5;
Exit _exit;
- int _talkAction, _jimFlag;
+ int _talkAction;
+ bool _jimFlag;
Scene385();
virtual void synchronize(Serializer &s);