aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/gfx/graphicengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/gfx/graphicengine.cpp')
-rw-r--r--engines/sword25/gfx/graphicengine.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 5fefcec420..502d2d3b2a 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -206,6 +206,7 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
for (int i = rect.top; i < rect.bottom; i++) {
out = outo;
for (int j = rect.left; j < rect.right; j++) {
+#if defined(SCUMM_LITTLE_ENDIAN)
*out += (byte)(((cb - *out) * ca) >> 8);
out++;
*out += (byte)(((cg - *out) * ca) >> 8);
@@ -214,6 +215,16 @@ bool GraphicEngine::fill(const Common::Rect *fillRectPtr, uint color) {
out++;
*out = 255;
out++;
+#else
+ *out = 255;
+ out++;
+ *out += (byte)(((cr - *out) * ca) >> 8);
+ out++;
+ *out += (byte)(((cg - *out) * ca) >> 8);
+ out++;
+ *out += (byte)(((cb - *out) * ca) >> 8);
+ out++;
+#endif
}
outo += _backSurface.pitch;