From 16d21cd0ff7fa200664fb75b915da015cccc8a48 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 25 Feb 2017 15:03:16 -0500 Subject: TITANIC: Fix CStarPoints2 initialization --- engines/titanic/star_control/star_points2.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engines/titanic/star_control/star_points2.cpp') diff --git a/engines/titanic/star_control/star_points2.cpp b/engines/titanic/star_control/star_points2.cpp index 97047181fd..287a46eaa7 100644 --- a/engines/titanic/star_control/star_points2.cpp +++ b/engines/titanic/star_control/star_points2.cpp @@ -42,14 +42,15 @@ bool CStarPoints2::initialize() { RootEntry &rootEntry = _data[rootCtr]; rootEntry.resize(count * 2); for (int idx = 0; idx < count * 2; ++idx) { - DataEntry &entry = rootEntry[idx]; + FVector &entry = rootEntry[idx]; v1 = stream->readSint32LE(); v2 = stream->readSint32LE(); v1 *= 0.015 * FACTOR; v2 *= 0.0099999998 * FACTOR; - entry._v1 = static_cast(cos(v1) * 3000000.0 * cos(v2)); - entry._v2 = static_cast(sin(v1) * 3000000.0 * cos(v2)); - entry._v3 = static_cast(sin(v2) * 3000000.0); + + entry._x = cos(v1) * 3000000.0 * cos(v2); + entry._y = sin(v1) * 3000000.0 * cos(v2); + entry._z = sin(v2) * 3000000.0; } } -- cgit v1.2.3