diff options
author | Eugene Sandulenko | 2019-09-29 16:39:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-29 16:40:06 +0200 |
commit | 2da99ab0dc8f71d00f89f0a45e4149844a17f037 (patch) | |
tree | 58c6b63863337d42fcb7a81763059ae072b9f6fa /graphics/nine_patch.cpp | |
parent | 6f20f676cdd3c998d8dda5f609f30c5e5184f54d (diff) | |
download | scummvm-rg350-2da99ab0dc8f71d00f89f0a45e4149844a17f037.tar.gz scummvm-rg350-2da99ab0dc8f71d00f89f0a45e4149844a17f037.tar.bz2 scummvm-rg350-2da99ab0dc8f71d00f89f0a45e4149844a17f037.zip |
GRAPHICS: Fix NinePatch palette length.
Byte did not allow to have 256 color palettes.
Diffstat (limited to 'graphics/nine_patch.cpp')
-rw-r--r-- | graphics/nine_patch.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/nine_patch.cpp b/graphics/nine_patch.cpp index ddaf9abf68..454575013f 100644 --- a/graphics/nine_patch.cpp +++ b/graphics/nine_patch.cpp @@ -203,7 +203,7 @@ bad_bitmap: } } -void NinePatchBitmap::blit(Graphics::Surface &target, int dx, int dy, int dw, int dh, byte *palette, byte numColors) { +void NinePatchBitmap::blit(Graphics::Surface &target, int dx, int dy, int dw, int dh, byte *palette, int numColors) { /* don't draw bitmaps that are smaller than the fixed area */ if (dw < _h._fix || dh < _v._fix) return; @@ -347,7 +347,7 @@ static inline uint32 dist(uint32 a, uint32 b) { return b - a; } -byte NinePatchBitmap::closestGrayscale(uint32 color, byte* palette, byte paletteLength) { +byte NinePatchBitmap::closestGrayscale(uint32 color, byte* palette, int paletteLength) { if (!_cached_colors.contains(color)) { byte target = grayscale(color); byte bestNdx = 0; |