aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-03-26 18:14:26 -0400
committerPaul Gilbert2017-03-26 18:14:26 -0400
commitf311aa38c1a264625209ba3a9c53d8477906b3fd (patch)
tree27aabd6bd002d36e20ec773968c18b65701afb78
parent2ba3ebb15bd5f08559f904b06b2ccf6052b174ca (diff)
downloadscummvm-rg350-f311aa38c1a264625209ba3a9c53d8477906b3fd.tar.gz
scummvm-rg350-f311aa38c1a264625209ba3a9c53d8477906b3fd.tar.bz2
scummvm-rg350-f311aa38c1a264625209ba3a9c53d8477906b3fd.zip
TITANIC: Added CBaseStar draw2 method
-rw-r--r--engines/titanic/star_control/base_star.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/titanic/star_control/base_star.cpp b/engines/titanic/star_control/base_star.cpp
index 11885b7fd2..8a7803712c 100644
--- a/engines/titanic/star_control/base_star.cpp
+++ b/engines/titanic/star_control/base_star.cpp
@@ -223,7 +223,7 @@ void CBaseStar::draw1(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12, CStar
int r = (int)(red - 0.5) & 0xfff8;
int g = (int)(green - 0.5) & 0xfff8;
int b = (int)(blue - 0.5) & 0xfff8;
- int rgb = (g | (r << 5)) << 2 | ((b >> 3) & 0xfff8);
+ int rgb = ((g | (r << 5)) << 2) | ((b >> 3) & 0xfff8);
uint16 *pixelP = (uint16 *)(surfaceArea->_pixelsPtr + surfaceArea->_pitch * yStart + xStart * 2);
switch (entry._thickness) {
@@ -306,10 +306,11 @@ void CBaseStar::draw2(CSurfaceArea *surfaceArea, CStarControlSub12 *sub12, CStar
if (skipCtr == 3)
continue;
- int r = (int)(red - 0.5) & 0xfff8;
- int g = (int)(green - 0.5) & 0xfff8;
+ int r = (int)(red - 0.5) & 0xf8;
+ int g = (int)(green - 0.5) & 0xfc;
int b = (int)(blue - 0.5) & 0xfff8;
- int rgb = (g | (r << 5)) << 2 | ((b >> 3) & 0xfff8);
+
+ int rgb = ((g | (r << 5)) << 3) | (b >> 3);
uint16 *pixelP = (uint16 *)(surfaceArea->_pixelsPtr + surfaceArea->_pitch * yStart + xStart * 2);
switch (entry._thickness) {