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

dreammaster dreammaster at scummvm.org
Sun Apr 16 17:35:47 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:
b57fd696ba TITANIC: Renamed CStarControlSub20 to CCameraMover


Commit: b57fd696ba5290397096c05334c3bedb4b0c87d2
    https://github.com/scummvm/scummvm/commit/b57fd696ba5290397096c05334c3bedb4b0c87d2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-16T11:35:32-04:00

Commit Message:
TITANIC: Renamed CStarControlSub20 to CCameraMover

Changed paths:
  A engines/titanic/star_control/camera_mover.cpp
  A engines/titanic/star_control/camera_mover.h
  R engines/titanic/star_control/star_control_sub20.cpp
  R engines/titanic/star_control/star_control_sub20.h
    engines/titanic/module.mk
    engines/titanic/star_control/star_camera.cpp
    engines/titanic/star_control/star_camera.h
    engines/titanic/star_control/star_control_sub21.cpp
    engines/titanic/star_control/star_control_sub21.h
    engines/titanic/star_control/star_control_sub22.cpp
    engines/titanic/star_control/star_control_sub22.h
    engines/titanic/star_control/star_view.cpp


diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk
index 9eeaa18..305c341 100644
--- a/engines/titanic/module.mk
+++ b/engines/titanic/module.mk
@@ -432,6 +432,7 @@ MODULE_OBJS := \
 	sound/wave_file.o \
 	star_control/star_control.o \
 	star_control/base_stars.o \
+	star_control/camera_mover.o \
 	star_control/dmatrix.o \
 	star_control/dvector.o \
 	star_control/fmatrix.o \
@@ -446,7 +447,6 @@ MODULE_OBJS := \
 	star_control/star_control_sub7.o \
 	star_control/star_control_sub8.o \
 	star_control/star_control_sub13.o \
-	star_control/star_control_sub20.o \
 	star_control/star_control_sub21.o \
 	star_control/star_control_sub22.o \
 	star_control/star_control_sub23.o \
diff --git a/engines/titanic/star_control/camera_mover.cpp b/engines/titanic/star_control/camera_mover.cpp
new file mode 100644
index 0000000..198e21a
--- /dev/null
+++ b/engines/titanic/star_control/camera_mover.cpp
@@ -0,0 +1,148 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "titanic/star_control/camera_mover.h"
+#include "common/textconsole.h"
+
+namespace Titanic {
+
+CCameraMover::CCameraMover(const CNavigationInfo *src) {
+	_lockCounter = 0;
+	_starVector = nullptr;
+
+	if (src) {
+		copyFrom(src);
+	} else {
+		_size = 0.0;
+		_field4 = 0.0;
+		_field8 = 20.0;
+		_fieldC = 0.0;
+		_field10 = 50000.0;
+		_field14 = 1.0;
+		_field18 = 1.0;
+		_field1C = 0.0;
+	}
+}
+
+CCameraMover::~CCameraMover() {
+	clear();
+}
+
+void CCameraMover::copyFrom(const CNavigationInfo *src) {
+	*((CNavigationInfo *)this) = *src;
+}
+
+void CCameraMover::copyTo(CNavigationInfo *dest) {
+	*dest = *((CNavigationInfo *)this);
+}
+
+void CCameraMover::proc4() {
+	if (!isLocked() && _size < _field10) {
+		_field4 += _size;
+		if (_field8 == _field4)
+			_size -= _field4;
+		else
+			_size += _field4;
+	}
+}
+
+void CCameraMover::proc5() {
+	if (!isLocked()) {
+		_field4 -= _field8;
+		if (_field4 == _size)
+			_size += _field4;
+		else
+			_size -= _field4;
+
+		if (_field4 < 0.0)
+			_field4 = 0.0;
+	}
+}
+
+void CCameraMover::proc6() {
+	if (!isLocked())
+		_size = _field10;
+}
+
+void CCameraMover::proc7() {
+	if (!isLocked()) {
+		_size = 0.0;
+		_field4 = 0.0;
+	}
+}
+
+void CCameraMover::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
+	if (_size > 0.0) {
+		v._x += m._row3._x * _size;
+		v._y += m._row3._y * _size;
+		v._z += m._row3._z * _size;
+
+		errorCode.set();
+	}
+}
+
+void CCameraMover::setVector(CStarVector *sv) {
+	clear();
+	_starVector = sv;
+}
+
+void CCameraMover::clear() {
+	if (_starVector) {
+		delete _starVector;
+		_starVector = nullptr;
+	}
+}
+
+void CCameraMover::load(SimpleFile *file, int val) {
+	if (!val) {
+		_size = file->readFloat();
+		_field4 = file->readFloat();
+		_field8 = file->readFloat();
+		_fieldC = file->readFloat();
+		_field10 = file->readFloat();
+		_field14 = file->readFloat();
+		_field18 = file->readFloat();
+		_field1C = file->readFloat();
+	}
+}
+
+void CCameraMover::save(SimpleFile *file, int indent) {
+	file->writeFloatLine(_size, indent);
+	file->writeFloatLine(_field4, indent);
+	file->writeFloatLine(_field8, indent);
+	file->writeFloatLine(_fieldC, indent);
+	file->writeFloatLine(_field10, indent);
+	file->writeFloatLine(_field14, indent);
+	file->writeFloatLine(_field18, indent);
+	file->writeFloatLine(_field1C, indent);
+}
+
+void CCameraMover::incLockCount() {
+	++_lockCounter;
+}
+
+void CCameraMover::decLockCount() {
+	if (_lockCounter > 0)
+		--_lockCounter;
+}
+
+} // End of namespace Titanic
diff --git a/engines/titanic/star_control/camera_mover.h b/engines/titanic/star_control/camera_mover.h
new file mode 100644
index 0000000..bd1f6b1
--- /dev/null
+++ b/engines/titanic/star_control/camera_mover.h
@@ -0,0 +1,102 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef TITANIC_CAMERA_MOVER_H
+#define TITANIC_CAMERA_MOVER_H
+
+#include "titanic/support/simple_file.h"
+#include "titanic/star_control/base_stars.h"
+#include "titanic/star_control/error_code.h"
+#include "titanic/star_control/fmatrix.h"
+
+namespace Titanic {
+
+struct CNavigationInfo {
+	double _size;
+	double _field4;
+	double _field8;
+	double _fieldC;
+	double _field10;
+	double _field14;
+	double _field18;
+	double _field1C;
+};
+
+class CCameraMover : public CNavigationInfo {
+public:
+	int _lockCounter;
+	CStarVector *_starVector;
+public:
+	CCameraMover(const CNavigationInfo *src);
+	virtual ~CCameraMover();
+
+	virtual void copyFrom(const CNavigationInfo *src);
+	virtual void copyTo(CNavigationInfo *dest);
+	virtual void proc4();
+	virtual void proc5();
+	virtual void proc6();
+	virtual void proc7();
+	virtual void proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2) {}
+
+	/**
+	 * Start a movement to a given specified destination
+	 */
+	virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {}
+
+	virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {}
+	virtual void proc11(CErrorCode &errorCode, FVector &v, FMatrix &m);
+	virtual void setVector(CStarVector *sv);
+
+	/**
+	 * Clear the class
+	 */
+	virtual void clear();
+
+	/**
+	 * Load the class
+	 */
+	virtual void load(SimpleFile *file, int val = 0);
+
+	/**
+	 * Save the class
+	 */
+	virtual void save(SimpleFile *file, int indent);
+
+	/**
+	 * Increment tthe lock counter
+	 */
+	void incLockCount();
+
+	/**
+	 * Decrement the lock counter
+	 */
+	void decLockCount();
+
+	/**
+	 * Returns true if the lock counter is non-zero
+	 */
+	bool isLocked() const { return _lockCounter > 0; }
+};
+
+} // End of namespace Titanic
+
+#endif /* TITANIC_CAMERA_MOVER_H */
diff --git a/engines/titanic/star_control/star_camera.cpp b/engines/titanic/star_control/star_camera.cpp
index 8f09182..071448a 100644
--- a/engines/titanic/star_control/star_camera.cpp
+++ b/engines/titanic/star_control/star_camera.cpp
@@ -32,13 +32,13 @@ namespace Titanic {
 FMatrix *CStarCamera::_matrix1;
 FMatrix *CStarCamera::_matrix2;
 
-CStarCamera::CStarCamera(const CStar20Data *data) :
-		_matrixRow(-1), _handlerP(nullptr), _field108(0) {
+CStarCamera::CStarCamera(const CNavigationInfo *data) :
+		_matrixRow(-1), _mover(nullptr), _field108(0) {
 	setupHandler(data);
 }
 
 CStarCamera::CStarCamera(CStarControlSub13 *src) :
-		_matrixRow(-1), _handlerP(nullptr), _field108(0), _sub13(src) {
+		_matrixRow(-1), _mover(nullptr), _field108(0), _sub13(src) {
 }
 
 void CStarCamera::init() {
@@ -61,8 +61,8 @@ void CStarCamera::proc2(const CStarControlSub13 *src) {
 	_sub13.copyFrom(src);
 }
 
-void CStarCamera::proc3(const CStar20Data *src) {
-	_handlerP->copyFrom(src);
+void CStarCamera::proc3(const CNavigationInfo *src) {
+	_mover->copyFrom(src);
 }
 
 void CStarCamera::setPosition(const FVector &v) {
@@ -120,7 +120,7 @@ void CStarCamera::setDestination(const FVector &v) {
 	FMatrix matrix = _sub13.getMatrix();
 	FVector vector = _sub13._position;
 
-	_handlerP->moveTo(vector, v, matrix);
+	_mover->moveTo(vector, v, matrix);
 }
 
 void CStarCamera::proc15(CErrorCode *errorCode) {
@@ -134,7 +134,7 @@ void CStarCamera::proc15(CErrorCode *errorCode) {
 
 	FVector v1 = _sub13._position;
 	FVector v2 = _sub13._position;
-	_handlerP->proc11(*errorCode, v2, *_matrix2);
+	_mover->proc11(*errorCode, v2, *_matrix2);
 
 	if (v1 != v2) {
 		_sub13.setPosition(v2);
@@ -147,19 +147,19 @@ void CStarCamera::proc15(CErrorCode *errorCode) {
 }
 
 void CStarCamera::proc16() {
-	_handlerP->proc4();
+	_mover->proc4();
 }
 
 void CStarCamera::proc17() {
-	_handlerP->proc5();
+	_mover->proc5();
 }
 
 void CStarCamera::proc18() {
-	_handlerP->proc6();
+	_mover->proc6();
 }
 
 void CStarCamera::proc19() {
-	_handlerP->proc7();
+	_mover->proc7();
 }
 
 void CStarCamera::proc20(double factor) {
@@ -395,8 +395,8 @@ bool CStarCamera::addMatrixRow(const FVector &v) {
 	if (_matrixRow >= 2)
 		return false;
 
-	CStar20Data data;
-	_handlerP->copyTo(&data);
+	CNavigationInfo data;
+	_mover->copyTo(&data);
 	deleteHandler();
 
 	FVector &row = _matrix[++_matrixRow];
@@ -409,8 +409,8 @@ bool CStarCamera::removeMatrixRow() {
 	if (_matrixRow == -1)
 		return false;
 
-	CStar20Data data;
-	_handlerP->copyTo(&data);
+	CNavigationInfo data;
+	_mover->copyTo(&data);
 	deleteHandler();
 
 	--_matrixRow;
@@ -430,27 +430,27 @@ void CStarCamera::save(SimpleFile *file, int indent) {
 	_sub13.save(file, indent);
 }
 
-bool CStarCamera::setupHandler(const CStar20Data *src) {
-	CStarControlSub20 *handler = nullptr;
+bool CStarCamera::setupHandler(const CNavigationInfo *src) {
+	CCameraMover *mover = nullptr;
 
 	switch (_matrixRow) {
 	case -1:
-		handler = new CStarControlSub21(src);
+		mover = new CStarControlSub21(src);
 		break;
 
 	case 0:
 	case 1:
 	case 2:
-		handler = new CStarControlSub22(src);
+		mover = new CStarControlSub22(src);
 		break;
 
 	default:
 		break;
 	}
 
-	if (handler) {
-		assert(!_handlerP);
-		_handlerP = handler;
+	if (mover) {
+		assert(!_mover);
+		_mover = mover;
 		return true;
 	} else {
 		return false;
@@ -458,9 +458,9 @@ bool CStarCamera::setupHandler(const CStar20Data *src) {
 }
 
 void CStarCamera::deleteHandler() {
-	if (_handlerP) {
-		delete _handlerP;
-		_handlerP = nullptr;
+	if (_mover) {
+		delete _mover;
+		_mover = nullptr;
 	}
 }
 
@@ -471,9 +471,9 @@ void CStarCamera::fn1(CStarControlSub13 *sub13, const FVector &v) {
 		FVector v1 = sub13->_position;
 		FVector v2 = _sub13._position;
 
-		_handlerP->proc8(v2, v1, m2, m1);
+		_mover->proc8(v2, v1, m2, m1);
 		CStarVector *sv = new CStarVector(this, v);
-		_handlerP->setVector(sv);
+		_mover->setVector(sv);
 	}
 }
 
@@ -493,10 +493,10 @@ void CStarCamera::fn2(FVector v1, FVector v2, FVector v3) {
 
 		FMatrix matrix = _sub13.getMatrix();
 		const FVector &pos = _sub13._position;
-		_handlerP->proc10(v3, tempV, pos, matrix);
+		_mover->proc10(v3, tempV, pos, matrix);
 
 		CStarVector *sv = new CStarVector(this, v2);
-		_handlerP->setVector(sv);
+		_mover->setVector(sv);
 	}
 }
 
@@ -596,10 +596,10 @@ void CStarCamera::fn3(CStarControlSub13 *sub13, const FVector &v) {
 
 	FVector tempV6 = m4._row1;
 	FMatrix m6 = _sub13.getMatrix();
-	_handlerP->proc8(_sub13._position, tempV6, m6, m5);
+	_mover->proc8(_sub13._position, tempV6, m6, m5);
 
 	CStarVector *sv = new CStarVector(this, v);
-	_handlerP->setVector(sv);
+	_mover->setVector(sv);
 }
 
 } // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_camera.h b/engines/titanic/star_control/star_camera.h
index 194079a..4363606 100644
--- a/engines/titanic/star_control/star_camera.h
+++ b/engines/titanic/star_control/star_camera.h
@@ -28,7 +28,7 @@
 #include "titanic/star_control/fpoint.h"
 #include "titanic/star_control/base_stars.h"
 #include "titanic/star_control/star_control_sub13.h"
-#include "titanic/star_control/star_control_sub20.h"
+#include "titanic/star_control/camera_mover.h"
 #include "titanic/star_control/error_code.h"
 
 namespace Titanic {
@@ -40,14 +40,14 @@ private:
 private:
 	int _matrixRow;
 	FMatrix _matrix;
-	CStarControlSub20 *_handlerP;
+	CCameraMover *_mover;
 	CStarControlSub13 _sub13;
 	int _field108;
 private:
 	/**
 	 * Set up a handler
 	 */
-	bool setupHandler(const CStar20Data *src);
+	bool setupHandler(const CNavigationInfo *src);
 
 	/**
 	 * Deletes any previous handler
@@ -57,17 +57,17 @@ private:
 	/**
 	 * Return whether the handler is locked
 	 */
-	bool isLocked() { return _handlerP->isLocked(); }
+	bool isLocked() { return _mover->isLocked(); }
 public:
 	static void init();
 	static void deinit();
 public:
-	CStarCamera(const CStar20Data *data);
+	CStarCamera(const CNavigationInfo *data);
 	CStarCamera(CStarControlSub13 *src);
 	virtual ~CStarCamera();
 
 	virtual void proc2(const CStarControlSub13 *src);
-	virtual void proc3(const CStar20Data *src);
+	virtual void proc3(const CNavigationInfo *src);
 	virtual void setPosition(const FVector &v);
 	virtual void proc5(const FVector &v);
 	virtual void proc6(int v);
diff --git a/engines/titanic/star_control/star_control_sub20.cpp b/engines/titanic/star_control/star_control_sub20.cpp
deleted file mode 100644
index fd12573..0000000
--- a/engines/titanic/star_control/star_control_sub20.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#include "titanic/star_control/star_control_sub20.h"
-#include "common/textconsole.h"
-
-namespace Titanic {
-
-CStarControlSub20::CStarControlSub20(const CStar20Data *src) {
-	_lockCounter = 0;
-	_starVector = nullptr;
-
-	if (src) {
-		copyFrom(src);
-	} else {
-		_size = 0.0;
-		_field4 = 0.0;
-		_field8 = 20.0;
-		_fieldC = 0.0;
-		_field10 = 50000.0;
-		_field14 = 1.0;
-		_field18 = 1.0;
-		_field1C = 0.0;
-	}
-}
-
-CStarControlSub20::~CStarControlSub20() {
-	clear();
-}
-
-void CStarControlSub20::copyFrom(const CStar20Data *src) {
-	*((CStar20Data *)this) = *src;
-}
-
-void CStarControlSub20::copyTo(CStar20Data *dest) {
-	*dest = *((CStar20Data *)this);
-}
-
-void CStarControlSub20::proc4() {
-	if (!isLocked() && _size < _field10) {
-		_field4 += _size;
-		if (_field8 == _field4)
-			_size -= _field4;
-		else
-			_size += _field4;
-	}
-}
-
-void CStarControlSub20::proc5() {
-	if (!isLocked()) {
-		_field4 -= _field8;
-		if (_field4 == _size)
-			_size += _field4;
-		else
-			_size -= _field4;
-
-		if (_field4 < 0.0)
-			_field4 = 0.0;
-	}
-}
-
-void CStarControlSub20::proc6() {
-	if (!isLocked())
-		_size = _field10;
-}
-
-void CStarControlSub20::proc7() {
-	if (!isLocked()) {
-		_size = 0.0;
-		_field4 = 0.0;
-	}
-}
-
-void CStarControlSub20::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
-	if (_size > 0.0) {
-		v._x += m._row3._x * _size;
-		v._y += m._row3._y * _size;
-		v._z += m._row3._z * _size;
-
-		errorCode.set();
-	}
-}
-
-void CStarControlSub20::setVector(CStarVector *sv) {
-	clear();
-	_starVector = sv;
-}
-
-void CStarControlSub20::clear() {
-	if (_starVector) {
-		delete _starVector;
-		_starVector = nullptr;
-	}
-}
-
-void CStarControlSub20::load(SimpleFile *file, int val) {
-	if (!val) {
-		_size = file->readFloat();
-		_field4 = file->readFloat();
-		_field8 = file->readFloat();
-		_fieldC = file->readFloat();
-		_field10 = file->readFloat();
-		_field14 = file->readFloat();
-		_field18 = file->readFloat();
-		_field1C = file->readFloat();
-	}
-}
-
-void CStarControlSub20::save(SimpleFile *file, int indent) {
-	file->writeFloatLine(_size, indent);
-	file->writeFloatLine(_field4, indent);
-	file->writeFloatLine(_field8, indent);
-	file->writeFloatLine(_fieldC, indent);
-	file->writeFloatLine(_field10, indent);
-	file->writeFloatLine(_field14, indent);
-	file->writeFloatLine(_field18, indent);
-	file->writeFloatLine(_field1C, indent);
-}
-
-void CStarControlSub20::incLockCount() {
-	++_lockCounter;
-}
-
-void CStarControlSub20::decLockCount() {
-	if (_lockCounter > 0)
-		--_lockCounter;
-}
-
-} // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub20.h b/engines/titanic/star_control/star_control_sub20.h
deleted file mode 100644
index 102773f..0000000
--- a/engines/titanic/star_control/star_control_sub20.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef TITANIC_STAR_CONTROL_SUB20_H
-#define TITANIC_STAR_CONTROL_SUB20_H
-
-#include "titanic/support/simple_file.h"
-#include "titanic/star_control/base_stars.h"
-#include "titanic/star_control/error_code.h"
-#include "titanic/star_control/fmatrix.h"
-
-namespace Titanic {
-
-struct CStar20Data {
-	double _size;
-	double _field4;
-	double _field8;
-	double _fieldC;
-	double _field10;
-	double _field14;
-	double _field18;
-	double _field1C;
-};
-
-class CStarControlSub20 : public CStar20Data {
-public:
-	int _lockCounter;
-	CStarVector *_starVector;
-public:
-	CStarControlSub20(const CStar20Data *src);
-	virtual ~CStarControlSub20();
-
-	virtual void copyFrom(const CStar20Data *src);
-	virtual void copyTo(CStar20Data *dest);
-	virtual void proc4();
-	virtual void proc5();
-	virtual void proc6();
-	virtual void proc7();
-	virtual void proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2) {}
-
-	/**
-	 * Start a movement to a given specified destination
-	 */
-	virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {}
-
-	virtual void proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {}
-	virtual void proc11(CErrorCode &errorCode, FVector &v, FMatrix &m);
-	virtual void setVector(CStarVector *sv);
-
-	/**
-	 * Clear the class
-	 */
-	virtual void clear();
-
-	/**
-	 * Load the class
-	 */
-	virtual void load(SimpleFile *file, int val = 0);
-
-	/**
-	 * Save the class
-	 */
-	virtual void save(SimpleFile *file, int indent);
-
-	/**
-	 * Increment tthe lock counter
-	 */
-	void incLockCount();
-
-	/**
-	 * Decrement the lock counter
-	 */
-	void decLockCount();
-
-	/**
-	 * Returns true if the lock counter is non-zero
-	 */
-	bool isLocked() const { return _lockCounter > 0; }
-};
-
-} // End of namespace Titanic
-
-#endif /* TITANIC_STAR_CONTROL_SUB20_H */
diff --git a/engines/titanic/star_control/star_control_sub21.cpp b/engines/titanic/star_control/star_control_sub21.cpp
index 6c5608e..4f95ad2 100644
--- a/engines/titanic/star_control/star_control_sub21.cpp
+++ b/engines/titanic/star_control/star_control_sub21.cpp
@@ -27,8 +27,8 @@
 
 namespace Titanic {
 
-CStarControlSub21::CStarControlSub21(const CStar20Data *src) :
-		CStarControlSub20(src) {
+CStarControlSub21::CStarControlSub21(const CNavigationInfo *src) :
+		CCameraMover(src) {
 }
 
 void CStarControlSub21::moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM) {
diff --git a/engines/titanic/star_control/star_control_sub21.h b/engines/titanic/star_control/star_control_sub21.h
index 3776121..4ebf823 100644
--- a/engines/titanic/star_control/star_control_sub21.h
+++ b/engines/titanic/star_control/star_control_sub21.h
@@ -23,16 +23,16 @@
 #ifndef TITANIC_STAR_CONTROL_SUB21_H
 #define TITANIC_STAR_CONTROL_SUB21_H
 
-#include "titanic/star_control/star_control_sub20.h"
+#include "titanic/star_control/camera_mover.h"
 #include "titanic/star_control/star_control_sub24.h"
 
 namespace Titanic {
 
-class CStarControlSub21 : public CStarControlSub20 {
+class CStarControlSub21 : public CCameraMover {
 private:
 	CStarControlSub24 _sub24;
 public:
-	CStarControlSub21(const CStar20Data *src);
+	CStarControlSub21(const CNavigationInfo *src);
 	virtual ~CStarControlSub21() {}
 
 	virtual void moveTo(const FVector &srcV, const FVector &destV, const FMatrix &srcM);
diff --git a/engines/titanic/star_control/star_control_sub22.cpp b/engines/titanic/star_control/star_control_sub22.cpp
index 574cf73..8c3c7fa 100644
--- a/engines/titanic/star_control/star_control_sub22.cpp
+++ b/engines/titanic/star_control/star_control_sub22.cpp
@@ -25,8 +25,8 @@
 
 namespace Titanic {
 
-CStarControlSub22::CStarControlSub22(const CStar20Data *src) :
-		CStarControlSub20(src) {
+CStarControlSub22::CStarControlSub22(const CNavigationInfo *src) :
+		CCameraMover(src) {
 }
 
 void CStarControlSub22::proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2) {
diff --git a/engines/titanic/star_control/star_control_sub22.h b/engines/titanic/star_control/star_control_sub22.h
index 704cfa7..5a597ef 100644
--- a/engines/titanic/star_control/star_control_sub22.h
+++ b/engines/titanic/star_control/star_control_sub22.h
@@ -23,16 +23,16 @@
 #ifndef TITANIC_STAR_CONTROL_SUB22_H
 #define TITANIC_STAR_CONTROL_SUB22_H
 
-#include "titanic/star_control/star_control_sub20.h"
+#include "titanic/star_control/camera_mover.h"
 #include "titanic/star_control/star_control_sub27.h"
 
 namespace Titanic {
 
-class CStarControlSub22 : public CStarControlSub20 {
+class CStarControlSub22 : public CCameraMover {
 private:
 	CStarControlSub27 _sub27;
 public:
-	CStarControlSub22(const CStar20Data *src);
+	CStarControlSub22(const CNavigationInfo *src);
 	virtual ~CStarControlSub22() {}
 
 	virtual void proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2);
diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp
index 9f869c8..95c6a38 100644
--- a/engines/titanic/star_control/star_view.cpp
+++ b/engines/titanic/star_control/star_view.cpp
@@ -30,11 +30,11 @@
 
 namespace Titanic {
 
-CStarView::CStarView() : _camera((const CStar20Data *)nullptr), _owner(nullptr),
+CStarView::CStarView() : _camera((const CNavigationInfo *)nullptr), _owner(nullptr),
 		_starField(nullptr), _videoSurface(nullptr), _hasReference(0),
 		_videoSurface2(nullptr), _homePhotoMask(nullptr),
 		_field218(false), _showingPhoto(false) {
-	CStar20Data data = { 0, 0, 100000.0, 0, 20.0, 1.0, 1.0, 1.0 };
+	CNavigationInfo data = { 0, 0, 100000.0, 0, 20.0, 1.0, 1.0, 1.0 };
 
 	_camera.proc3(&data);
 }





More information about the Scummvm-git-logs mailing list