From 8f479522c4bf53616c785099d516d350f8fad94c Mon Sep 17 00:00:00 2001 From: David Fioramonti Date: Mon, 28 Aug 2017 19:28:15 -0700 Subject: TITANIC: CCameraMover and related classes Refactor 1. Removed updatePosition function defintions since UnmarkedCameraMover and MarkedCameraMover, derived classes, are overriddening it. I.e., CCameraMover::updatePosition doesn't get used. This also allowed some header files to removed. 2. Renaming of some functions. --- engines/titanic/star_control/camera_mover.h | 36 ++++++++++++++++++----------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'engines/titanic/star_control/camera_mover.h') diff --git a/engines/titanic/star_control/camera_mover.h b/engines/titanic/star_control/camera_mover.h index 9bd9d48700..3d72e01c8c 100644 --- a/engines/titanic/star_control/camera_mover.h +++ b/engines/titanic/star_control/camera_mover.h @@ -23,10 +23,6 @@ #ifndef TITANIC_CAMERA_MOVER_H #define TITANIC_CAMERA_MOVER_H -//#include "titanic/support/simple_file.h" -//#include "titanic/star_control/error_code.h" -//#include "titanic/star_control/fmatrix.h" // class FVector - namespace Titanic { class CErrorCode; @@ -57,6 +53,19 @@ public: virtual void copyFrom(const CNavigationInfo *src); virtual void copyTo(CNavigationInfo *dest); + /** + * delete _starVector + */ + virtual void clear(); + /** + * Set default values for CNavigationInfo + */ + virtual void reset(); + + /** + * Sets this CStarVector + */ + virtual void setVector(CStarVector *sv); /** * Increases movement speed in forward direction */ @@ -77,7 +86,11 @@ public: */ virtual void stop(); - virtual void proc8(const FVector &oldPos, const FVector &newPos, + /** + * Move the mover from an old position and orientation to a new + * position and orientation + */ + virtual void transitionBetweenPosOrients(const FVector &oldPos, const FVector &newPos, const FMatrix &oldOrientation, const FMatrix &newOrientation) {} /** @@ -85,19 +98,16 @@ public: */ virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &orientation) {} - virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {} - /** - * Update the passed position and orientation matrix + * First two vectors are used to form a new orientation that gets transitioned to from the old + * orientation m. */ - virtual void updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation); - - virtual void setVector(CStarVector *sv); + virtual void transitionBetweenOrientations(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {} /** - * Clear the class + * Update the passed position and orientation matrix */ - virtual void clear(); + virtual void updatePosition(CErrorCode &errorCode, FVector &pos, FMatrix &orientation) {} /** * Load the class -- cgit v1.2.3