aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-04-12 20:48:47 -0400
committerPaul Gilbert2017-04-12 20:48:47 -0400
commit5741ee3103ec9a7a1802b020dad243c21e71572e (patch)
treeeada9da64e8c7b5a48b5433ac2c6f6f944bdc189
parent887adf17232047915c0135d776d770d5ac187471 (diff)
downloadscummvm-rg350-5741ee3103ec9a7a1802b020dad243c21e71572e.tar.gz
scummvm-rg350-5741ee3103ec9a7a1802b020dad243c21e71572e.tar.bz2
scummvm-rg350-5741ee3103ec9a7a1802b020dad243c21e71572e.zip
TITANIC: Fix centroid calculations in star drawing methods
-rw-r--r--engines/titanic/star_control/base_stars.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/star_control/base_stars.cpp b/engines/titanic/star_control/base_stars.cpp
index a88c86fc34..1af456d260 100644
--- a/engines/titanic/star_control/base_stars.cpp
+++ b/engines/titanic/star_control/base_stars.cpp
@@ -163,7 +163,7 @@ void CBaseStars::draw1(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
camera->proc36(&_value1, &_value2, &_value3, &_value4);
const double MAX_VAL = 1.0e9 * 1.0e9;
- FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
+ FPoint centroid = surfaceArea->_centroid + FPoint(0.5, 0.5);
double threshold = camera->getThreshold();
double minVal = threshold - 9216.0;
int width1 = surfaceArea->_width - 1;
@@ -248,7 +248,7 @@ void CBaseStars::draw2(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
camera->proc36(&_value1, &_value2, &_value3, &_value4);
const double MAX_VAL = 1.0e9 * 1.0e9;
- FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
+ FPoint centroid = surfaceArea->_centroid + FPoint(0.5, 0.5);
double threshold = camera->getThreshold();
double minVal = threshold - 9216.0;
int width1 = surfaceArea->_width - 1;
@@ -334,7 +334,7 @@ void CBaseStars::draw3(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
camera->proc36(&_value1, &_value2, &_value3, &_value4);
const double MAX_VAL = 1.0e9 * 1.0e9;
- FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
+ FPoint centroid = surfaceArea->_centroid + FPoint(0.5, 0.5);
double threshold = camera->getThreshold();
double minVal = threshold - 9216.0;
int width1 = surfaceArea->_width - 1;
@@ -447,7 +447,7 @@ void CBaseStars::draw4(CSurfaceArea *surfaceArea, CStarCamera *camera, CStarClos
pose._vector = FVector(28068592.0, 5345916.50, -116580624.0);
const double MAX_VAL = 1.0e9 * 1.0e9;
- FPoint centroid = surfaceArea->_centroid - FPoint(0.5, 0.5);
+ FPoint centroid = surfaceArea->_centroid + FPoint(0.5, 0.5);
double threshold = camera->getThreshold();
double minVal = threshold - 9216.0;
int width1 = surfaceArea->_width - 1;