[Scummvm-git-logs] scummvm master -> a14bc53ba534cca2e956de4bd950923d093d7c50
dreammaster
dreammaster at scummvm.org
Sun Aug 6 20:40:54 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:
a14bc53ba5 TITANIC: Fix arrow key movement in front of Parrot cage
Commit: a14bc53ba534cca2e956de4bd950923d093d7c50
https://github.com/scummvm/scummvm/commit/a14bc53ba534cca2e956de4bd950923d093d7c50
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-06T14:40:44-04:00
Commit Message:
TITANIC: Fix arrow key movement in front of Parrot cage
Changed paths:
engines/titanic/core/game_object.h
engines/titanic/moves/move_player_in_parrot_room.cpp
engines/titanic/moves/move_player_in_parrot_room.h
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index 1c3cbf3..9a7d426 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -609,11 +609,12 @@ public:
bool checkPoint(const Point &pt, bool ignoreSurface = false, bool visibleOnly = false);
/**
- * Returns a point that falls within the object
+ * Returns a point that falls within the object. Used for simulating
+ * mouse clicks for movement when arrow keys are pressed
* @param pt Return point
* @returns True if a point was found
*/
- bool findPoint(Point &pt);
+ virtual bool findPoint(Point &pt);
/**
* Set the position of the object
diff --git a/engines/titanic/moves/move_player_in_parrot_room.cpp b/engines/titanic/moves/move_player_in_parrot_room.cpp
index 1ef2e96..186e448 100644
--- a/engines/titanic/moves/move_player_in_parrot_room.cpp
+++ b/engines/titanic/moves/move_player_in_parrot_room.cpp
@@ -58,4 +58,13 @@ bool CMovePlayerInParrotRoom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
return true;
}
+bool CMovePlayerInParrotRoom::findPoint(Point &pt) {
+ if (_destination == "ParrotLobby.Node 1.E") {
+ pt = Point(600, 180);
+ return true;
+ } else {
+ return CMovePlayerTo::findPoint(pt);
+ }
+}
+
} // End of namespace Titanic
diff --git a/engines/titanic/moves/move_player_in_parrot_room.h b/engines/titanic/moves/move_player_in_parrot_room.h
index 54dc2eb..50a0b2a 100644
--- a/engines/titanic/moves/move_player_in_parrot_room.h
+++ b/engines/titanic/moves/move_player_in_parrot_room.h
@@ -44,6 +44,14 @@ public:
* Load the data for the class from file
*/
virtual void load(SimpleFile *file);
+
+ /**
+ * Returns a point that falls within the object. Used for simulating
+ * mouse clicks for movement when arrow keys are pressed
+ * @param pt Return point
+ * @returns True if a point was found
+ */
+ virtual bool findPoint(Point &pt);
};
} // End of namespace Titanic
More information about the Scummvm-git-logs
mailing list