aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-02 21:48:45 -0400
committerPaul Gilbert2016-07-10 16:38:14 -0400
commit8551f08d0d006b0a2be483420e8920be501d1d55 (patch)
tree68bea3dadd51f58ff5daa0cc7229f041a48c531d /engines/titanic
parentdd9a4f4b5b5b55fa41129568ff8ad4c9329e6759 (diff)
downloadscummvm-rg350-8551f08d0d006b0a2be483420e8920be501d1d55.tar.gz
scummvm-rg350-8551f08d0d006b0a2be483420e8920be501d1d55.tar.bz2
scummvm-rg350-8551f08d0d006b0a2be483420e8920be501d1d55.zip
TITANIC: Implemented more PET Remote glyph classes
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/pet_control/pet_remote.cpp95
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.cpp148
-rw-r--r--engines/titanic/pet_control/pet_remote_glyphs.h262
3 files changed, 475 insertions, 30 deletions
diff --git a/engines/titanic/pet_control/pet_remote.cpp b/engines/titanic/pet_control/pet_remote.cpp
index 9277f81610..6dc7a1a12f 100644
--- a/engines/titanic/pet_control/pet_remote.cpp
+++ b/engines/titanic/pet_control/pet_remote.cpp
@@ -31,52 +31,63 @@ namespace Titanic {
static const byte REMOTE_DATA[] = {
0x00, 0x02,
- GLYPH_SUMMON_ELEVATOR, 0x10,
+ GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY,
0x01, 0x02,
- GLYPH_SUMMON_PELLERATOR, 0x10,
+ GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY,
0x02, 0x03,
- GLYPH_TELEVISION_CONTROL, GLYPH_OPERATE_LIGHTS, 0x10,
+ GLYPH_TELEVISION_CONTROL, GLYPH_OPERATE_LIGHTS, GLYPH_SUCCUBUS_DELIVERY,
0x03, 0x02,
- GLYPH_SUMMON_ELEVATOR, 0x10,
+ GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY,
0x04, 0x02,
- GLYPH_TELEVISION_CONTROL, 0x10,
+ GLYPH_TELEVISION_CONTROL, GLYPH_SUCCUBUS_DELIVERY,
0x05, 0x02,
- GLYPH_SUMMON_PELLERATOR, 0x10,
+ GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY,
0x06, 0x02,
- GLYPH_SUMMON_PELLERATOR, 0x10,
+ GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY,
0x07, 0x03,
- GLYPH_TELEVISION_CONTROL, GLYPH_SUMMON_PELLERATOR, 0x10,
- 0x08, 0x01, 0x10,
- 0x09, 0x01, 0x10,
- 0x0A, 0x02, GLYPH_SUMMON_ELEVATOR, 0x10,
+ GLYPH_TELEVISION_CONTROL, GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY,
+ 0x08, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
+ 0x09, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
+ 0x0A, 0x02, GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY,
0x0B, 0x01, 0x11,
- 0x0C, 0x01, 0x10,
- 0x0D, 0x01, 0x10,
+ 0x0C, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
+ 0x0D, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
0x0E, 0x00,
0x0F, 0x01,
GLYPH_TELEVISION_CONTROL,
0x10, 0x03, 0x12, 0x14, 0x13,
- 0x11, 0x01, 0x10,
+ 0x11, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
0x12, 0x00,
0x13, 0x02,
- GLYPH_SUMMON_PELLERATOR, 0x10,
+ GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY,
0x14, 0x00,
0x15, 0x02,
0x10, GLYPH_TELEVISION_CONTROL,
0x16, 0x00,
0x17, 0x02,
- GLYPH_SUMMON_PELLERATOR, 0x10,
- 0x18, 0x01, 0x10,
+ GLYPH_SUMMON_PELLERATOR, GLYPH_SUCCUBUS_DELIVERY,
+ 0x18, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
0x19, 0x00,
0x1A, 0x00,
0x1B, 0x00,
0x1C, 0x00,
- 0x1D, 0x02, GLYPH_SUMMON_ELEVATOR, 0x10,
+ 0x1D, 0x02,
+ GLYPH_SUMMON_ELEVATOR, GLYPH_SUCCUBUS_DELIVERY,
0x1E, 0x0C,
- GLYPH_DEPLOY_FLORAL, GLYPH_DEPLOY_RELAXATION, GLYPH_DEPLOY_COMFORT,
- 0x08,
- GLYPH_ENTERTAINMENT_DEVICE, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
- 0x1F, 0x01, 0x10,
+ GLYPH_DEPLOY_FLORAL, GLYPH_DEPLOY_FULLY_RELAXATION, GLYPH_DEPLOY_COMFORT,
+ GLYPH_DEPLOY_MINOR_STORAGE, GLYPH_ENTERTAINMENT_DEVICE,
+ GLYPH_DEPLOY_MAJOR_RELAXATION, GLYPH_INFLATE_RELAXATION,
+ GLYPH_DEPLOY_MAINTENANCE, GLYPH_DEPLOY_WORK_SURFACE,
+ GLYPH_DEPLOY_MINOR_RELAXATION, GLYPH_DEPLOY_SINK,
+ GLYPH_DEPLOY_MAJOR_STORAGE,
+ 0x1F, 0x01,
+ GLYPH_SUCCUBUS_DELIVERY,
0x20, 0x02,
GLYPH_SUMMON_ELEVATOR, GLYPH_SUMMON_PELLERATOR,
0x21, 0x00
@@ -335,14 +346,50 @@ bool CPetRemote::loadGlyph(int glyphIndex) {
glyph = new CDeployFloralGlyph();
break;
- case GLYPH_DEPLOY_RELAXATION:
- glyph = new CDeployRelaxationGlyph();
+ case GLYPH_DEPLOY_FULLY_RELAXATION:
+ glyph = new CDeployFullyRelaxationGlyph();
break;
case GLYPH_DEPLOY_COMFORT:
glyph = new CDeployComfortGlyph();
break;
+ case GLYPH_DEPLOY_MINOR_STORAGE:
+ glyph = new CDeployMinorStorageGlyph();
+ break;
+
+ case GLYPH_DEPLOY_MAJOR_RELAXATION:
+ glyph = new CDeployMajorRelaxationGlyph();
+ break;
+
+ case GLYPH_INFLATE_RELAXATION:
+ glyph = new CInflateRelaxationGlyph();
+ break;
+
+ case GLYPH_DEPLOY_MAINTENANCE:
+ glyph = new CDeployMaintenanceGlyph();
+ break;
+
+ case GLYPH_DEPLOY_WORK_SURFACE:
+ glyph = new CDeployWorkSurfaceGlyph();
+ break;
+
+ case GLYPH_DEPLOY_MINOR_RELAXATION:
+ glyph = new CDeployMinorRelaxationGlyph();
+ break;
+
+ case GLYPH_DEPLOY_SINK:
+ glyph = new CDeploySinkGlyph();
+ break;
+
+ case GLYPH_DEPLOY_MAJOR_STORAGE:
+ glyph = new CDeployMajorStorageGlyph();
+ break;
+
+ case GLYPH_SUCCUBUS_DELIVERY:
+ glyph = new CSuccubusDeliveryGlyph();
+ break;
+
default:
break;
}
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp
index 9ca69869fb..460907a99c 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp
@@ -305,13 +305,13 @@ void CDeployFloralGlyph::getTooltip(CPetText *text) {
/*------------------------------------------------------------------------*/
-bool CDeployRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+bool CDeployFullyRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
CToggleRemoteGlyph::setup(petControl, owner);
setDefaults("3PetBedfoot", petControl);
return true;
}
-void CDeployRelaxationGlyph::getTooltip(CPetText *text) {
+void CDeployFullyRelaxationGlyph::getTooltip(CPetText *text) {
text->setText("Deploy fully recumbent relaxation device");
}
@@ -327,4 +327,148 @@ void CDeployComfortGlyph::getTooltip(CPetText *text) {
text->setText("Deploy comfort workstation");
}
+/*------------------------------------------------------------------------*/
+
+bool CDeployMinorStorageGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetDraw", petControl);
+ return true;
+}
+
+void CDeployMinorStorageGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy minor horizontally mobile storage compartment");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CDeployMajorRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetArmChair", petControl);
+ return true;
+}
+
+void CDeployMajorRelaxationGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy major semi-recumbent relaxation device");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CInflateRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetBedhead", petControl);
+ return true;
+}
+
+void CInflateRelaxationGlyph::getTooltip(CPetText *text) {
+ text->setText("Inflate fully recumbent relaxation device ");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CDeployMaintenanceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetWashstand", petControl);
+ return true;
+}
+
+void CDeployMaintenanceGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy personal maintenance hub");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CDeployWorkSurfaceGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetTable", petControl);
+ return true;
+}
+
+void CDeployWorkSurfaceGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy executive horizontal worksurface");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CDeployMinorRelaxationGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetDeskchair", petControl);
+ return true;
+}
+
+void CDeployMinorRelaxationGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy minor semi-recumbent relaxation device");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CDeploySinkGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetDeskchair", petControl);
+ return true;
+}
+
+void CDeploySinkGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy aqueous cleansing receptacle");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CDeployMajorStorageGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CToggleRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetChest", petControl);
+ return true;
+}
+
+void CDeployMajorStorageGlyph::getTooltip(CPetText *text) {
+ text->setText("Deploy major horizontally mobile storage compartment");
+}
+
+/*------------------------------------------------------------------------*/
+
+bool CSuccubusDeliveryGlyph::setup(CPetControl *petControl, CPetGlyphs *owner) {
+ CPetRemoteGlyph::setup(petControl, owner);
+ setDefaults("3PetSuccubus", petControl);
+
+ if (owner) {
+ _gfxElement1 = getElement(16);
+ _gfxElement2 = getElement(17);
+ }
+
+ return true;
+}
+
+void CSuccubusDeliveryGlyph::draw2(CScreenManager *screenManager) {
+ _gfxElement1->draw(screenManager);
+ _gfxElement2->draw(screenManager);
+}
+
+bool CSuccubusDeliveryGlyph::MouseButtonDownMsg(const Point &pt) {
+ return _gfxElement1->MouseButtonDownMsg(pt)
+ || _gfxElement2->MouseButtonDownMsg(pt);
+}
+
+bool CSuccubusDeliveryGlyph::MouseButtonUpMsg(const Point &pt) {
+ CTreeItem *target = getPetControl()->_remoteTarget;
+
+ if (_gfxElement1 && _gfxElement1->MouseButtonUpMsg(pt)) {
+ if (target) {
+ CPETDeliverMsg msg;
+ msg.execute(target);
+ }
+ } else if (_gfxElement2 && _gfxElement2->MouseButtonUpMsg(pt)) {
+ if (target) {
+ CPETReceiveMsg msg;
+ msg.execute(target);
+ }
+ } else {
+ return false;
+ }
+
+ return true;
+}
+
+void CSuccubusDeliveryGlyph::getTooltip(CPetText *text) {
+ text->setText("Succ-U-Bus delivery system control");
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/pet_control/pet_remote_glyphs.h b/engines/titanic/pet_control/pet_remote_glyphs.h
index eb235bc957..0043ea97d8 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.h
+++ b/engines/titanic/pet_control/pet_remote_glyphs.h
@@ -32,7 +32,12 @@ enum RemoteGlyph {
GLYPH_SUMMON_ELEVATOR = 0, GLYPH_SUMMON_PELLERATOR = 1,
GLYPH_TELEVISION_CONTROL = 2, GLYPH_ENTERTAINMENT_DEVICE = 3,
GLYPH_OPERATE_LIGHTS = 4, GLYPH_DEPLOY_FLORAL = 5,
- GLYPH_DEPLOY_RELAXATION = 6, GLYPH_DEPLOY_COMFORT = 7
+ GLYPH_DEPLOY_FULLY_RELAXATION = 6, GLYPH_DEPLOY_COMFORT = 7,
+ GLYPH_DEPLOY_MINOR_STORAGE = 8, GLYPH_DEPLOY_MAJOR_RELAXATION = 9,
+ GLYPH_INFLATE_RELAXATION = 10, GLYPH_DEPLOY_MAINTENANCE = 11,
+ GLYPH_DEPLOY_WORK_SURFACE = 12, GLYPH_DEPLOY_MINOR_RELAXATION = 13,
+ GLYPH_DEPLOY_SINK = 14, GLYPH_DEPLOY_MAJOR_STORAGE = 15,
+ GLYPH_SUCCUBUS_DELIVERY = 16
};
enum RemoteMessage {
@@ -279,7 +284,7 @@ public:
virtual void getTooltip(CPetText *text);
};
-class CDeployRelaxationGlyph : public CToggleRemoteGlyph {
+class CDeployFullyRelaxationGlyph : public CToggleRemoteGlyph {
public:
/**
* Setup the glyph
@@ -309,6 +314,114 @@ public:
class CDeployComfortGlyph : public CToggleRemoteGlyph {
public:
/**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 2);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 2);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CDeployMinorStorageGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 3);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 3);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CDeployMajorRelaxationGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 5);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 5);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CInflateRelaxationGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 6);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 6);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CDeployMaintenanceGlyph : public CToggleRemoteGlyph {
+public:
+ /**
* Setup the glyph
*/
virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
@@ -317,14 +430,14 @@ public:
* Called for mouse button down messages
*/
virtual bool MouseButtonDownMsg(const Point &pt) {
- return elementMouseButtonDownMsg(pt, 2);
+ return elementMouseButtonDownMsg(pt, 7);
}
/**
* Handles mouse button up messages
*/
virtual bool MouseButtonUpMsg(const Point &pt) {
- return elementMouseButtonUpMsg(pt, 2);
+ return elementMouseButtonUpMsg(pt, 7);
}
/**
@@ -333,6 +446,147 @@ public:
virtual void getTooltip(CPetText *text);
};
+class CDeployWorkSurfaceGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 8);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 8);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CDeployMinorRelaxationGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 9);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 9);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CDeploySinkGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 10);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 10);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CDeployMajorStorageGlyph : public CToggleRemoteGlyph {
+public:
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt) {
+ return elementMouseButtonDownMsg(pt, 11);
+ }
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt) {
+ return elementMouseButtonUpMsg(pt, 11);
+ }
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
+class CSuccubusDeliveryGlyph : public CPetRemoteGlyph {
+private:
+ CPetGfxElement *_gfxElement1, *_gfxElement2;
+public:
+ CSuccubusDeliveryGlyph() : CPetRemoteGlyph(),
+ _gfxElement1(nullptr), _gfxElement2(nullptr) {}
+
+ /**
+ * Setup the glyph
+ */
+ virtual bool setup(CPetControl *petControl, CPetGlyphs *owner);
+
+ /**
+ * Handles any secondary drawing of the glyph
+ */
+ virtual void draw2(CScreenManager *screenManager);
+
+ /**
+ * Called for mouse button down messages
+ */
+ virtual bool MouseButtonDownMsg(const Point &pt);
+
+ /**
+ * Handles mouse button up messages
+ */
+ virtual bool MouseButtonUpMsg(const Point &pt);
+
+ /**
+ * Returns the tooltip text for when the glyph is selected
+ */
+ virtual void getTooltip(CPetText *text);
+};
+
} // End of namespace Titanic
#endif /* TITANIC_PET_REMOTE_GLYPHS_H */