aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-14 07:51:23 -0400
committerPaul Gilbert2016-07-10 16:11:04 -0400
commita6d03a15c9b305afab75d5b89b9c818249031ec7 (patch)
tree4586926a64f047c3af217a1fb2223144bd8b1569 /engines/titanic
parent57d75d19cfc0801211b3d22c292f1585c8ca1c5a (diff)
downloadscummvm-rg350-a6d03a15c9b305afab75d5b89b9c818249031ec7.tar.gz
scummvm-rg350-a6d03a15c9b305afab75d5b89b9c818249031ec7.tar.bz2
scummvm-rg350-a6d03a15c9b305afab75d5b89b9c818249031ec7.zip
TITANIC: More CMagazine message handlers
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/carry/magazine.cpp30
-rw-r--r--engines/titanic/npcs/deskbot.h2
2 files changed, 26 insertions, 6 deletions
diff --git a/engines/titanic/carry/magazine.cpp b/engines/titanic/carry/magazine.cpp
index 20e0b16f5e..ac74da8c71 100644
--- a/engines/titanic/carry/magazine.cpp
+++ b/engines/titanic/carry/magazine.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/carry/magazine.h"
+#include "titanic/npcs/deskbot.h"
namespace Titanic {
@@ -51,22 +52,41 @@ void CMagazine::load(SimpleFile *file) {
}
bool CMagazine::UseWithCharMsg(CUseWithCharMsg *msg) {
- // todo
- return true;
+ CDeskbot *deskbot = static_cast<CDeskbot *>(msg->_character);
+ if (deskbot) {
+ if (deskbot->_field108) {
+ setVisible(false);
+ setPosition(Point(1000, 1000));
+ CActMsg actMsg("2ndClassUpgrade");
+ actMsg.execute("Deskbot");
+ }
+
+ return true;
+ } else {
+ return CCarry::UseWithCharMsg(msg);
+ }
}
bool CMagazine::MouseDoubleClickMsg(CMouseDoubleClickMsg *msg) {
- // todo
return true;
}
bool CMagazine::VisibleMsg(CVisibleMsg *msg) {
- // todo
+ setVisible(msg->_visible);
return true;
}
bool CMagazine::UseWithOtherMsg(CUseWithOtherMsg *msg) {
- // todo
+ if (msg->_other->getName() == "SwitchOnDeskbot") {
+ // TODO: other _field108 if
+ if (false) {
+ setVisible(false);
+ setPosition(Point(1000, 1000));
+ CActMsg actMsg("2ndClassUpgrade");
+ actMsg.execute("Deskbot");
+ }
+ }
+
return true;
}
diff --git a/engines/titanic/npcs/deskbot.h b/engines/titanic/npcs/deskbot.h
index cb977e416d..50c3e3fb46 100644
--- a/engines/titanic/npcs/deskbot.h
+++ b/engines/titanic/npcs/deskbot.h
@@ -31,7 +31,7 @@ class CDeskbot : public CTrueTalkNPC {
private:
static int _v1;
static int _v2;
-private:
+public:
int _field108;
int _field10C;
public: