From 3919bd2aed36cf31ca33da26aac186e76efc7610 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 29 Jun 2009 18:49:28 +0000 Subject: Fix palette regression caused by r41949. svn-id: r41961 --- engines/kyra/kyra_mr.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index a9f8ac9975..871edd578d 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -899,9 +899,9 @@ void KyraEngine_MR::updateCharPal(int unk1) { for (int i = 144; i < 168; ++i) { for (int j = 0; j < 3; ++j) { uint8 col = dst[i * 3 + j]; - uint8 subCol = src[(i - 144) * 3 + j] + sceneDatPal[j]; - subCol = CLIP(subCol, 0, 63); - subCol = (col - subCol) >> 1; + int subCol = src[(i - 144) * 3 + j] + sceneDatPal[j]; + subCol = CLIP(subCol, 0, 63); + subCol = (col - subCol) / 2; dst[i * 3 + j] -= subCol; } } @@ -914,8 +914,8 @@ void KyraEngine_MR::updateCharPal(int unk1) { for (int i = 144; i < 168; ++i) { for (int j = 0; j < 3; ++j) { - uint8 col = dst[i * 3 + j] + sceneDatPal[j]; - dst[i * 3 + j] = CLIP(col, 0, 63); + int col = dst[i * 3 + j] + sceneDatPal[j]; + dst[i * 3 + j] = CLIP(col, 0, 63); } } -- cgit v1.2.3