aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-09-29 17:40:12 +0200
committerEugene Sandulenko2019-09-29 17:40:12 +0200
commit25159714fb529b2d6c0785a545d569cb61e31390 (patch)
tree77db5dfecdfbadab0437a6132c395d39d98dbf5a
parentf7262a4e43dc8b6fde2afe7272053260a7aaa2a3 (diff)
downloadscummvm-rg350-25159714fb529b2d6c0785a545d569cb61e31390.tar.gz
scummvm-rg350-25159714fb529b2d6c0785a545d569cb61e31390.tar.bz2
scummvm-rg350-25159714fb529b2d6c0785a545d569cb61e31390.zip
GRAPHICS: Allow 256-byte palettes to 9-patch
-rw-r--r--graphics/nine_patch.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/nine_patch.cpp b/graphics/nine_patch.cpp
index ece1ff188f..fc1999dee8 100644
--- a/graphics/nine_patch.cpp
+++ b/graphics/nine_patch.cpp
@@ -356,7 +356,7 @@ byte NinePatchBitmap::closestGrayscale(uint32 color, byte* palette, int paletteL
byte target = grayscale(color);
byte bestNdx = 0;
byte bestColor = grayscale(palette[0], palette[1], palette[2]);
- for (byte i = 1; i < paletteLength; ++i) {
+ for (int i = 1; i < paletteLength; ++i) {
byte current = grayscale(palette[i * 3], palette[(i * 3) + 1], palette[(i * 3) + 2]);
if (dist(target, bestColor) >= dist(target, current)) {
bestColor = current;