[Scummvm-git-logs] scummvm master -> 074e466f914022901e26a12988b5e9c24e9a74c8

dreammaster dreammaster at scummvm.org
Sun Apr 16 03:35:13 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:
074e466f91 TITANIC: Renaming movement counter fields


Commit: 074e466f914022901e26a12988b5e9c24e9a74c8
    https://github.com/scummvm/scummvm/commit/074e466f914022901e26a12988b5e9c24e9a74c8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-15T21:35:04-04:00

Commit Message:
TITANIC: Renaming movement counter fields

Changed paths:
    engines/titanic/star_control/star_control_sub23.cpp
    engines/titanic/star_control/star_control_sub23.h
    engines/titanic/star_control/star_control_sub24.cpp
    engines/titanic/star_control/star_control_sub27.cpp


diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp
index f2a195d..7b329e7 100644
--- a/engines/titanic/star_control/star_control_sub23.cpp
+++ b/engines/titanic/star_control/star_control_sub23.cpp
@@ -37,8 +37,8 @@ CStarControlSub23::CStarControlSub23() : _row1(0.0, 1000000.0, 0.0) {
 	_field48 = 0;
 	_field4C = 0;
 	_field54 = 0;
-	_field58 = 0.0;
-	_field60 = 0.0;
+	_moveDelayCtr = 0.0;
+	_moveDelayInc = 0.0;
 }
 
 void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2) {
@@ -47,10 +47,9 @@ void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 	_row3 = _row2 - _row1;
 	_field24 = _row3.normalize();
 
-	_field58 = 0;
 	_active = false;
 	_field34 = 0;
-	_field58 = 1.0;
+	_moveDelayCtr = 1.0;
 	_field40 = -1;
 	_field44 = -1;
 	_field48 = -1;
@@ -60,7 +59,7 @@ void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 void CStarControlSub23::proc3(const FMatrix &m1, const FMatrix &m2) {
 	_row1.clear();
 	_row2.clear();
-	_field58 = 1.0;
+	_moveDelayCtr = 1.0;
 	_field24 = 0.0;
 	_active = false;
 	_field34 = 0;
@@ -79,7 +78,7 @@ void CStarControlSub23::proc4(FVector &v1, FVector &v2, FMatrix &m) {
 	_field44 = -1;
 	_field48 = -1;
 	_field4C = -1;
-	_field58 = 1.0;
+	_moveDelayCtr = 1.0;
 }
 
 void CStarControlSub23::proc6(int val1, int val2, float val) {
diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h
index 240bd82..ee8cd2f 100644
--- a/engines/titanic/star_control/star_control_sub23.h
+++ b/engines/titanic/star_control/star_control_sub23.h
@@ -46,8 +46,8 @@ protected:
 	int _field4C;
 	Common::Array<double> _powers;
 	int _field54;
-	double _field58;
-	double _field60;
+	double _moveDelayCtr;
+	double _moveDelayInc;
 	CStarControlSub25 _sub25;
 public:
 	CStarControlSub23();
diff --git a/engines/titanic/star_control/star_control_sub24.cpp b/engines/titanic/star_control/star_control_sub24.cpp
index dc6e79c..4367040 100644
--- a/engines/titanic/star_control/star_control_sub24.cpp
+++ b/engines/titanic/star_control/star_control_sub24.cpp
@@ -28,8 +28,8 @@ namespace Titanic {
 void CStarControlSub24::proc3(const FMatrix &m1, const FMatrix &m2) {
 	CStarControlSub23::proc3(m1, m2);
 	_sub25.fn1(m1, m2);
-	_field60 = 0.1;
-	_field58 = 0.0;
+	_moveDelayInc = 0.1;
+	_moveDelayCtr = 0.0;
 	_field40 = _field44 = _field48 = -1;
 	_active = true;
 }
@@ -45,7 +45,7 @@ void CStarControlSub24::proc4(FVector &v1, FVector &v2, FMatrix &m) {
 
 	FVector row3 = m._row3;
 	double mult = _row3._x * row3._x + _row3._y * row3._y+ _row3._z * row3._z;
-	_field58 = 1.0;
+	_moveDelayCtr = 1.0;
 
 	bool flag = false;
 	if (mult < 1.0) {
@@ -73,8 +73,8 @@ void CStarControlSub24::proc4(FVector &v1, FVector &v2, FMatrix &m) {
 		m1.fn1(tempV1);
 		_sub25.fn1(m, m1);
 
-		_field58 = 0.0;
-		_field60 = 0.1;
+		_moveDelayCtr = 0.0;
+		_moveDelayInc = 0.1;
 		_active = true;
 	}
 }
@@ -86,9 +86,9 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
 	if (!_active)
 		return 0;
 
-	if (_field58 < 1.0) {
-		_field58 += _field60;
-		_sub25.fn2(_field58, m);
+	if (_moveDelayCtr < 1.0) {
+		_moveDelayCtr += _moveDelayInc;
+		_sub25.fn2(_moveDelayCtr, m);
 		errorCode.set();
 		return 1;
 	}
diff --git a/engines/titanic/star_control/star_control_sub27.cpp b/engines/titanic/star_control/star_control_sub27.cpp
index 783f6a3..a300b51 100644
--- a/engines/titanic/star_control/star_control_sub27.cpp
+++ b/engines/titanic/star_control/star_control_sub27.cpp
@@ -37,13 +37,13 @@ void CStarControlSub27::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 
 	if (m1 != m2) {
 		_sub25.fn1(m1, m2);
-		_field58 = 0.0;
+		_moveDelayCtr = 0.0;
 
 		if (_field4C == 0) {
-			_field60 = 0.1;
+			_moveDelayInc = 0.1;
 			_active = true;
 		} else {
-			_field60 = 1.0 / factor;
+			_moveDelayInc = 1.0 / factor;
 			_active = true;
 		}
 	}
@@ -53,8 +53,8 @@ int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
 	if (!_active)
 		return 0;
 
-	_field58 += _field60;
-	_sub25.fn2(_field58, m);
+	_moveDelayCtr += _moveDelayInc;
+	_sub25.fn2(_moveDelayCtr, m);
 	errorCode.set();
 
 	if (_field40 >= 0) {





More information about the Scummvm-git-logs mailing list