aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control/star_control_sub7.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/star_control/star_control_sub7.cpp')
-rw-r--r--engines/titanic/star_control/star_control_sub7.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/titanic/star_control/star_control_sub7.cpp b/engines/titanic/star_control/star_control_sub7.cpp
index 3e1f718053..3324711160 100644
--- a/engines/titanic/star_control/star_control_sub7.cpp
+++ b/engines/titanic/star_control/star_control_sub7.cpp
@@ -29,7 +29,7 @@ void CStarControlSub7::draw(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12,
if (_data.empty())
return;
- CStarControlSub6 sub6 = sub12->proc23();
+ FPose pose = sub12->proc23();
double threshold = sub12->proc25();
FPoint center((double)surfaceArea->_width * 0.5,
surfaceArea->_height * 0.5);
@@ -42,16 +42,15 @@ void CStarControlSub7::draw(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12,
for (uint idx = 0; idx < _data.size(); ++idx) {
const CBaseStarEntry &star = _data[idx];
- newV._x = sub6._row1._x * star._position._x + sub6._row3._x * star._position._z
- + sub6._row2._x * star._position._y + sub6._vector._x;
- newV._y = sub6._row1._y * star._position._x + sub6._row3._y * star._position._z
- + sub6._row2._y * star._position._x + sub6._vector._y;
- newV._z = sub6._row1._z * star._position._x + sub6._row3._z * star._position._z
- + sub6._row2._z * star._position._y + sub6._vector._z;
+ newV._x = pose._row1._x * star._position._x + pose._row3._x * star._position._z
+ + pose._row2._x * star._position._y + pose._vector._x;
+ newV._y = pose._row1._y * star._position._x + pose._row3._y * star._position._z
+ + pose._row2._y * star._position._x + pose._vector._y;
+ newV._z = pose._row1._z * star._position._x + pose._row3._z * star._position._z
+ + pose._row2._z * star._position._y + pose._vector._z;
if (newV._z > threshold) {
- FVector vTemp;
- sub12->proc28(2, newV, vTemp);
+ FVector vTemp = sub12->proc28(2, newV);
FRect r1(center._x + vTemp._x, center._y + vTemp._y,
center._x + vTemp._x + 4.0, center._y + vTemp._y + 4.0);