aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control/star_control_sub21.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/star_control/star_control_sub21.cpp')
-rw-r--r--engines/titanic/star_control/star_control_sub21.cpp42
1 files changed, 39 insertions, 3 deletions
diff --git a/engines/titanic/star_control/star_control_sub21.cpp b/engines/titanic/star_control/star_control_sub21.cpp
index 41d24d55c0..1e676b7703 100644
--- a/engines/titanic/star_control/star_control_sub21.cpp
+++ b/engines/titanic/star_control/star_control_sub21.cpp
@@ -21,15 +21,51 @@
*/
#include "titanic/star_control/star_control_sub21.h"
+#include "titanic/star_control/dmatrix.h"
+#include "titanic/star_control/dvector.h"
#include "common/textconsole.h"
namespace Titanic {
CStarControlSub21::CStarControlSub21(const CStar20Data *src) :
CStarControlSub20(src) {
-#if 0
- _sub24()
-#endif
+}
+
+void CStarControlSub21::proc9(FVector &v1, FVector &v2, FMatrix &matrix) {
+ if (isLocked())
+ decLockCount();
+
+ _sub24.proc4(v1, v2, matrix);
+}
+
+void CStarControlSub21::proc10(const FVector &v1, const FVector &v2, const FVector &v3, const FMatrix &m) {
+ if (isLocked())
+ decLockCount();
+
+ DVector vector1 = v1;
+ DVector vector2 = v2;
+ DMatrix matrix1, matrix2 = m, matrix3;
+ vector2.fn4(vector1, matrix1);
+ const DMatrix *matrixP = matrix1.fn4(matrix3, matrix1, matrix2);
+
+ FMatrix matrix4 = *matrixP;
+ _sub24.proc3(m, matrix4);
+ incLockCount();
+}
+
+void CStarControlSub21::proc11(CErrorCode &errorCode, FVector &v, const FMatrix &m) {
+ if (_sub24.get8()) {
+ int val = _sub24.proc5(errorCode, v, m);
+ if (val == 1)
+ incLockCount();
+ if (val == 2) {
+ proc7();
+ error("TODO: _dataP");
+ }
+ } else if (_size != 0.0) {
+ // TODO
+ error("TODO");
+ }
}
} // End of namespace Titanic