[Scummvm-git-logs] scummvm master -> f114f9e8c5c9e663ef1eea268dbc2d2287c6b646

dreammaster dreammaster at scummvm.org
Mon Aug 29 01:10:36 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
f114f9e8c5 TITANIC: Implemented some stubbed methods


Commit: f114f9e8c5c9e663ef1eea268dbc2d2287c6b646
    https://github.com/scummvm/scummvm/commit/f114f9e8c5c9e663ef1eea268dbc2d2287c6b646
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-28T19:10:29-04:00

Commit Message:
TITANIC: Implemented some stubbed methods

Changed paths:
    engines/titanic/carry/carry.h
    engines/titanic/npcs/bellbot.cpp
    engines/titanic/pet_control/pet_control.cpp
    engines/titanic/pet_control/pet_load_save.h
    engines/titanic/pet_control/pet_save.cpp



diff --git a/engines/titanic/carry/carry.h b/engines/titanic/carry/carry.h
index fb5519e..06e446a 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 ac6881a..0170491 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 d7016da..a0f8fab 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 dd1c907..26ddec0 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 b5e1673..9305759 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





More information about the Scummvm-git-logs mailing list