aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-08-28 19:10:29 -0400
committerPaul Gilbert2016-08-28 19:10:29 -0400
commitf114f9e8c5c9e663ef1eea268dbc2d2287c6b646 (patch)
tree646d785a37d0f5ef5f4f39539c240e8035c0c752 /engines/titanic
parent01327b540de39eb99c854dd4a61080935c6ba77f (diff)
downloadscummvm-rg350-f114f9e8c5c9e663ef1eea268dbc2d2287c6b646.tar.gz
scummvm-rg350-f114f9e8c5c9e663ef1eea268dbc2d2287c6b646.tar.bz2
scummvm-rg350-f114f9e8c5c9e663ef1eea268dbc2d2287c6b646.zip
TITANIC: Implemented some stubbed methods
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/carry/carry.h2
-rw-r--r--engines/titanic/npcs/bellbot.cpp3
-rw-r--r--engines/titanic/pet_control/pet_control.cpp3
-rw-r--r--engines/titanic/pet_control/pet_load_save.h10
-rw-r--r--engines/titanic/pet_control/pet_save.cpp20
5 files changed, 26 insertions, 12 deletions
diff --git a/engines/titanic/carry/carry.h b/engines/titanic/carry/carry.h
index fb5519e290..06e446a1b5 100644
--- a/engines/titanic/carry/carry.h
+++ b/engines/titanic/carry/carry.h
@@ -44,7 +44,6 @@ class CCarry : public CGameObject {
bool EnterViewMsg(CEnterViewMsg *msg);
bool PassOnDragStartMsg(CPassOnDragStartMsg *msg);
protected:
- CString _string1;
int _fieldDC;
CString _string3;
CString _string4;
@@ -59,6 +58,7 @@ protected:
bool _enterFrameSet;
int _visibleFrame;
public:
+ CString _string1;
int _fieldE0;
Point _origPos;
CString _fullViewName;
diff --git a/engines/titanic/npcs/bellbot.cpp b/engines/titanic/npcs/bellbot.cpp
index ac6881a45c..0170491270 100644
--- a/engines/titanic/npcs/bellbot.cpp
+++ b/engines/titanic/npcs/bellbot.cpp
@@ -135,8 +135,7 @@ bool CBellBot::MovieEndMsg(CMovieEndMsg *msg) {
}
bool CBellBot::Use(CUse *msg) {
- error("TODO: Figure out what msg->_item points to");
- // msg->_item = "Bellbot";
+ dynamic_cast<CCarry *>(msg->_item)->_string1 = "Bellbot";
return true;
}
diff --git a/engines/titanic/pet_control/pet_control.cpp b/engines/titanic/pet_control/pet_control.cpp
index d7016da02e..a0f8fab267 100644
--- a/engines/titanic/pet_control/pet_control.cpp
+++ b/engines/titanic/pet_control/pet_control.cpp
@@ -359,7 +359,8 @@ bool CPetControl::VirtualKeyCharMsg(CVirtualKeyCharMsg *msg) {
}
bool CPetControl::TimerMsg(CTimerMsg *msg) {
- warning("TODO: CPetControl::CTimerMsg");
+ if (_timers[msg->_actionVal]._target)
+ _timers[msg->_actionVal]._target->timerExpired(msg->_actionVal);
return true;
}
diff --git a/engines/titanic/pet_control/pet_load_save.h b/engines/titanic/pet_control/pet_load_save.h
index dd1c907ef1..26ddec0ff9 100644
--- a/engines/titanic/pet_control/pet_load_save.h
+++ b/engines/titanic/pet_control/pet_load_save.h
@@ -38,11 +38,6 @@ private:
Rect getSlotBounds(int index);
/**
- * Highlight one of the slots
- */
- void highlightSlot(int index);
-
- /**
* Called when savegame slot highlight changes or the view is reset
*/
void highlightChange();
@@ -67,6 +62,11 @@ protected:
* Reset the slot names list
*/
void resetSlots();
+
+ /**
+ * Highlight one of the slots
+ */
+ void highlightSlot(int index);
public:
/**
* Setup the glyph
diff --git a/engines/titanic/pet_control/pet_save.cpp b/engines/titanic/pet_control/pet_save.cpp
index b5e16736bc..9305759117 100644
--- a/engines/titanic/pet_control/pet_save.cpp
+++ b/engines/titanic/pet_control/pet_save.cpp
@@ -22,6 +22,7 @@
#include "titanic/pet_control/pet_save.h"
#include "titanic/pet_control/pet_control.h"
+#include "titanic/core/project_item.h"
namespace Titanic {
@@ -58,15 +59,28 @@ void CPetSave::getTooltip(CPetText *text) {
}
void CPetSave::highlightSave(int index) {
- warning("TODO: CPetSave::highlightSave");
+ if (index >= 0)
+ _slotNames[index].showCursor(-2);
}
void CPetSave::unhighlightSave(int index) {
- warning("TODO: CPetSave::unhighlightSave");
+ if (index >= 0)
+ _slotNames[index].hideCursor();
}
void CPetSave::execute() {
- warning("TODO: CPetSave::execute");
+ CPetControl *pet = getPetControl();
+ if (_savegameSlotNum >= 0) {
+ highlightSlot(-1);
+ CProjectItem *project = pet ? pet->getRoot() : nullptr;
+
+ if (project) {
+ project->saveGame(_savegameSlotNum, _slotNames[_savegameSlotNum].getText());
+ pet->displayMessage("");
+ }
+ } else if (pet) {
+ pet->displayMessage("You must select a game to save first.");
+ }
}
} // End of namespace Titanic