aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/star_control/photo_crosshairs.cpp4
-rw-r--r--engines/titanic/star_control/surface_area.cpp32
-rw-r--r--engines/titanic/star_control/surface_area.h2
3 files changed, 5 insertions, 33 deletions
diff --git a/engines/titanic/star_control/photo_crosshairs.cpp b/engines/titanic/star_control/photo_crosshairs.cpp
index 94bb7c5c4b..bc5b4eaa8a 100644
--- a/engines/titanic/star_control/photo_crosshairs.cpp
+++ b/engines/titanic/star_control/photo_crosshairs.cpp
@@ -233,11 +233,11 @@ void CPhotoCrosshairs::drawAt(const FPoint &pt, CSurfaceArea *surfaceArea) {
uint savedPixel = surfaceArea->_pixel;
surfaceArea->_pixel = 255;
surfaceArea->setColorFromPixel();
- SurfaceAreaMode savedMode = surfaceArea->setMode(SA_MODE3);
+ SurfaceAreaMode savedMode = surfaceArea->setMode(SA_XOR);
surfaceArea->fillRect(FRect(pt._x - 8.0, pt._y, pt._x - 4.0, pt._y));
- surfaceArea->fillRect(FRect(pt._x - -4.0, pt._y, pt._x + 8.0, pt._y));
+ surfaceArea->fillRect(FRect(pt._x + 4.0, pt._y, pt._x + 8.0, pt._y));
surfaceArea->fillRect(FRect(pt._x, pt._y - 8.0, pt._x, pt._y - 4.0));
surfaceArea->fillRect(FRect(pt._x, pt._y + 4.0, pt._x, pt._y + 8.0));
diff --git a/engines/titanic/star_control/surface_area.cpp b/engines/titanic/star_control/surface_area.cpp
index 762d28cbe3..d0881fd304 100644
--- a/engines/titanic/star_control/surface_area.cpp
+++ b/engines/titanic/star_control/surface_area.cpp
@@ -60,7 +60,7 @@ void CSurfaceArea::setColor(uint rgb) {
_color = rgb;
_colorMask = ~rgb;
break;
- case SA_MODE3:
+ case SA_XOR:
_color = rgb;
_colorMask = 0xFFFFFFFF;
break;
@@ -76,7 +76,7 @@ void CSurfaceArea::setColor(uint rgb) {
SurfaceAreaMode CSurfaceArea::setMode(SurfaceAreaMode mode) {
SurfaceAreaMode oldMode = _mode;
_mode = mode;
- setColor(_color);
+ setColor(_rgb);
return oldMode;
}
@@ -199,35 +199,7 @@ double CSurfaceArea::fillRect(const FRect &rect) {
} else {
colorRect(s, rr, _colorMask, _color);
}
-/*
- int yInc = 1;
- byte *lineStartP = (byte *)_pixelsPtr + rr.top * _pitch;
- int width2 = rr.width() / 2;
- int height2 = rr.height() / 2;
- int xInc = _pitch;
-
- if (xInc < 0) {
- --xInc;
- yInc = -1;
- }
-
- // rr: left=esi, edi=top, ebx=right, edx=bottom
- // ecx=lineStartP; ebp=width2, edx=height2
-
- if (_mode == SA_NONE) {
- switch (_bpp) {
- default:
- break;
- }
- } else {
- switch (_bpp) {
- default:
- break;
- }
- }
- // Lots more functionality
-*/
return r.top;
}
diff --git a/engines/titanic/star_control/surface_area.h b/engines/titanic/star_control/surface_area.h
index dcdbf594a2..4794a1514d 100644
--- a/engines/titanic/star_control/surface_area.h
+++ b/engines/titanic/star_control/surface_area.h
@@ -31,7 +31,7 @@
namespace Titanic {
enum SurfaceAreaMode {
- SA_NONE = 0, SA_MODE1 = 1, SA_MODE2 = 2, SA_MODE3 = 3, SA_MODE4 = 4
+ SA_NONE = 0, SA_MODE1 = 1, SA_MODE2 = 2, SA_XOR = 3, SA_MODE4 = 4
};
class CSurfaceArea {