From 25485af0a401084283134d37b1bc70578ef26ab0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 5 Apr 2017 21:33:13 -0400 Subject: TITANIC: Fix some incorrect type casts --- engines/titanic/star_control/star_control_sub23.h | 2 +- engines/titanic/star_control/star_control_sub27.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/titanic/star_control/star_control_sub23.h b/engines/titanic/star_control/star_control_sub23.h index fa3656328e..082c18dd53 100644 --- a/engines/titanic/star_control/star_control_sub23.h +++ b/engines/titanic/star_control/star_control_sub23.h @@ -39,7 +39,7 @@ protected: FVector _row3; int _field34; double _field38; - int _field3C; + double _field3C; int _field40; int _field44; int _field48; diff --git a/engines/titanic/star_control/star_control_sub27.cpp b/engines/titanic/star_control/star_control_sub27.cpp index 98c237c7fd..cdd2dbbce8 100644 --- a/engines/titanic/star_control/star_control_sub27.cpp +++ b/engines/titanic/star_control/star_control_sub27.cpp @@ -28,7 +28,7 @@ namespace Titanic { void CStarControlSub27::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2) { CStarControlSub23::proc2(v1, v2, m1, m2); - int v24 = _field24; + double factor = _field24; if (_field24 > 0.0) { _field8 = 1; _field34 = 1; @@ -43,7 +43,7 @@ void CStarControlSub27::proc2(FVector &v1, FVector &v2, FMatrix &m1, FMatrix &m2 _field60 = 0.1; _field8 = 1; } else { - _field60 = 1.0 / (double)v24; + _field60 = 1.0 / factor; _field8 = 1; } } -- cgit v1.2.3