[Scummvm-git-logs] scummvm master -> 09da42129374f215301d6295cd6b092d1b3e6fee

dreammaster dreammaster at scummvm.org
Thu Mar 30 04:25:41 CEST 2017


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:
09da421293 TITANIC: Further code for new skip nav button to work correctly


Commit: 09da42129374f215301d6295cd6b092d1b3e6fee
    https://github.com/scummvm/scummvm/commit/09da42129374f215301d6295cd6b092d1b3e6fee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-03-29T22:25:33-04:00

Commit Message:
TITANIC: Further code for new skip nav button to work correctly

Changed paths:
    engines/titanic/pet_control/pet_remote_glyphs.cpp
    engines/titanic/star_control/star_control.cpp
    engines/titanic/star_control/star_control.h


diff --git a/engines/titanic/pet_control/pet_remote_glyphs.cpp b/engines/titanic/pet_control/pet_remote_glyphs.cpp
index e9b2094..b56c2f6 100644
--- a/engines/titanic/pet_control/pet_remote_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_remote_glyphs.cpp
@@ -24,6 +24,7 @@
 #include "titanic/pet_control/pet_remote.h"
 #include "titanic/pet_control/pet_control.h"
 #include "titanic/messages/pet_messages.h"
+#include "titanic/star_control/star_control.h"
 #include "titanic/support/strings.h"
 #include "titanic/titanic.h"
 
@@ -643,6 +644,10 @@ bool CSkipNavigationGlyph::MouseButtonDownMsg(const Point &pt) {
 
 bool CSkipNavigationGlyph::MouseButtonUpMsg(const Point &pt) {
 	if (_button && _button->MouseButtonUpMsg(pt)) {
+		CPetRemote *remote = static_cast<CPetRemote *>(_owner->getOwner());
+		CStarControl *starControl = remote->getPetControl()->getStarControl();
+		starControl->forceSolved();
+
 		CActMsg actMsg("SetDestin");
 		actMsg.execute("CaptainsWheel");
 		return true;
diff --git a/engines/titanic/star_control/star_control.cpp b/engines/titanic/star_control/star_control.cpp
index dbe8b01..881de58 100644
--- a/engines/titanic/star_control/star_control.cpp
+++ b/engines/titanic/star_control/star_control.cpp
@@ -260,6 +260,11 @@ bool CStarControl::isSolved() const {
 	return _starField.isSolved();
 }
 
+void CStarControl::forceSolved() {
+	while (!_starField.isSolved())
+		_starField.fn7();
+}
+
 bool CStarControl::canSetStarDestination() const {
 	return _view.canSetStarDestination();
 }
diff --git a/engines/titanic/star_control/star_control.h b/engines/titanic/star_control/star_control.h
index 11e6053..2c314a6 100644
--- a/engines/titanic/star_control/star_control.h
+++ b/engines/titanic/star_control/star_control.h
@@ -78,6 +78,11 @@ public:
 	bool isSolved() const;
 
 	/**
+	 * Forces the starfield to be solved
+	 */
+	void forceSolved();
+
+	/**
 	 * Returns true if a star destination can be set
 	 */
 	bool canSetStarDestination() const;





More information about the Scummvm-git-logs mailing list