[Scummvm-git-logs] scummvm master -> 12fa59697ecc0ca4c26ed458122b5818e56b40bd

dreammaster dreammaster at scummvm.org
Sun Apr 16 00:28:37 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:
12fa59697e TITANIC: Renaming and fixes for movers active flag


Commit: 12fa59697ecc0ca4c26ed458122b5818e56b40bd
    https://github.com/scummvm/scummvm/commit/12fa59697ecc0ca4c26ed458122b5818e56b40bd
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-04-15T18:28:26-04:00

Commit Message:
TITANIC: Renaming and fixes for movers active flag

Changed paths:
    engines/titanic/star_control/star_control_sub21.cpp
    engines/titanic/star_control/star_control_sub22.cpp
    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_sub21.cpp b/engines/titanic/star_control/star_control_sub21.cpp
index f1a9565..c96e29c 100644
--- a/engines/titanic/star_control/star_control_sub21.cpp
+++ b/engines/titanic/star_control/star_control_sub21.cpp
@@ -53,7 +53,7 @@ void CStarControlSub21::proc10(const FVector &v1, const FVector &v2, const FVect
 }
 
 void CStarControlSub21::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
-	if (_sub24.get8()) {
+	if (_sub24.isActive()) {
 		decLockCount();
 		int val = _sub24.proc5(errorCode, v, m);
 		if (val == 1)
diff --git a/engines/titanic/star_control/star_control_sub22.cpp b/engines/titanic/star_control/star_control_sub22.cpp
index 68681c0..574cf73 100644
--- a/engines/titanic/star_control/star_control_sub22.cpp
+++ b/engines/titanic/star_control/star_control_sub22.cpp
@@ -38,7 +38,7 @@ void CStarControlSub22::proc8(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 }
 
 void CStarControlSub22::proc11(CErrorCode &errorCode, FVector &v, FMatrix &m) {
-	if (_sub27.get8()) {
+	if (_sub27.isActive()) {
 		decLockCount();
 		int val = _sub27.proc5(errorCode, v, m);
 		if (val == 1)
diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp
index ad4cb65..f2a195d 100644
--- a/engines/titanic/star_control/star_control_sub23.cpp
+++ b/engines/titanic/star_control/star_control_sub23.cpp
@@ -27,7 +27,7 @@ namespace Titanic {
 
 CStarControlSub23::CStarControlSub23() : _row1(0.0, 1000000.0, 0.0) {
 	_field4 = 0;
-	_field8 = 0;
+	_active = false;
 	_field24 = 0.0;
 	_field34 = 0;
 	_field38 = 0;
@@ -48,7 +48,7 @@ void CStarControlSub23::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 	_field24 = _row3.normalize();
 
 	_field58 = 0;
-	_field8 = 0;
+	_active = false;
 	_field34 = 0;
 	_field58 = 1.0;
 	_field40 = -1;
@@ -62,7 +62,7 @@ void CStarControlSub23::proc3(const FMatrix &m1, const FMatrix &m2) {
 	_row2.clear();
 	_field58 = 1.0;
 	_field24 = 0.0;
-	_field8 = 0;
+	_active = false;
 	_field34 = 0;
 }
 
@@ -73,7 +73,7 @@ void CStarControlSub23::proc4(FVector &v1, FVector &v2, FMatrix &m) {
 	_row3 = vector;
 	_field24 = _row3.normalize();
 
-	_field8 = 0;
+	_active = false;
 	_field34 = 0;
 	_field40 = -1;
 	_field44 = -1;
diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h
index 082c18d..240bd82 100644
--- a/engines/titanic/star_control/star_control_sub23.h
+++ b/engines/titanic/star_control/star_control_sub23.h
@@ -33,7 +33,7 @@ namespace Titanic {
 class CStarControlSub23 {
 protected:
 	int _field4;
-	int _field8;
+	bool _active;
 	FVector _row1, _row2;
 	double _field24;
 	FVector _row3;
@@ -59,7 +59,7 @@ public:
 	virtual int proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) { return 2; }
 	virtual void proc6(int val1, int val2, float val);
 
-	int get8() const { return _field8; }
+	bool isActive() const { return _active; }
 };
 
 } // End of namespace Titanic
diff --git a/engines/titanic/star_control/star_control_sub24.cpp b/engines/titanic/star_control/star_control_sub24.cpp
index 28b69f7..2c7a663 100644
--- a/engines/titanic/star_control/star_control_sub24.cpp
+++ b/engines/titanic/star_control/star_control_sub24.cpp
@@ -31,14 +31,14 @@ void CStarControlSub24::proc3(const FMatrix &m1, const FMatrix &m2) {
 	_field60 = 0.1;
 	_field58 = 0.0;
 	_field40 = _field44 = _field48 = -1;
-	_field8 = 1;
+	_active = true;
 }
 
 void CStarControlSub24::proc4(FVector &v1, FVector &v2, FMatrix &m) {
 	CStarControlSub23::proc4(v1, v2, m);
 
 	if (_field24 > 8000.0) {
-		_field8 = 1;
+		_active = true;
 		_field34 = 1;
 		proc6(120, 4, _field24 - 8000.0);
 	}
@@ -75,7 +75,7 @@ void CStarControlSub24::proc4(FVector &v1, FVector &v2, FMatrix &m) {
 
 		_field58 = 0.0;
 		_field60 = 0.1;
-		_field8 = 1;
+		_active = true;
 	}
 }
 
@@ -83,7 +83,7 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
 	FVector v1, v2, v3, v4;
 	const FVector *tv;
 
-	if (_field8)
+	if (!_active)
 		return 0;
 
 	if (_field58 < 1.0) {
@@ -93,7 +93,7 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
 	}
 
 	if (!_field34) {
-		_field8 = 0;
+		_active = false;
 		return 2;
 	}
 
@@ -160,7 +160,7 @@ int CStarControlSub24::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
 		return 1;
 	}
 
-	_field8 = 0;
+	_active = false;
 	return 2;
 }
 
diff --git a/engines/titanic/star_control/star_control_sub27.cpp b/engines/titanic/star_control/star_control_sub27.cpp
index cdd2dbb..1edf9e1 100644
--- a/engines/titanic/star_control/star_control_sub27.cpp
+++ b/engines/titanic/star_control/star_control_sub27.cpp
@@ -30,7 +30,7 @@ void CStarControlSub27::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 
 	double factor = _field24;
 	if (_field24 > 0.0) {
-		_field8 = 1;
+		_active = true;
 		_field34 = 1;
 		proc6(120, 4, _field24);
 	}
@@ -41,16 +41,16 @@ void CStarControlSub27::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2
 
 		if (_field4C == 0) {
 			_field60 = 0.1;
-			_field8 = 1;
+			_active = true;
 		} else {
 			_field60 = 1.0 / factor;
-			_field8 = 1;
+			_active = true;
 		}
 	}
 }
 
 int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
-	if (!_field8)
+	if (!_active)
 		return 0;
 
 	_field58 += _field60;
@@ -82,7 +82,7 @@ int CStarControlSub27::proc5(CErrorCode &errorCode, FVector &v, FMatrix &m) {
 		errorCode.set();
 		return 1;
 	} else {
-		_field8 = 0;
+		_active = false;
 		return 2;
 	}
 }





More information about the Scummvm-git-logs mailing list