From c4c9f4acbe7fb3c35caf27ae26b96b7fa0fa736d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 14 Aug 2021 09:49:03 +0200 Subject: [PATCH] - call ColorMatcher.Pick instead of BestColor when remapping a voxel. This was the only place in the engine using BestColor directly with the game palette. --- source/common/models/voxels.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/models/voxels.cpp b/source/common/models/voxels.cpp index 75acb8dda..12c070b0d 100644 --- a/source/common/models/voxels.cpp +++ b/source/common/models/voxels.cpp @@ -74,7 +74,7 @@ static uint8_t *GetVoxelRemap(const uint8_t *pal) { // The voxel palette uses VGA colors, so we have to expand it // from 6 to 8 bits per component. - remap[i] = BestColor((uint32_t *)GPalette.BaseColors, + remap[i] = ColorMatcher.Pick( (oldpal[i*3 + 0] << 2) | (oldpal[i*3 + 0] >> 4), (oldpal[i*3 + 1] << 2) | (oldpal[i*3 + 1] >> 4), (oldpal[i*3 + 2] << 2) | (oldpal[i*3 + 2] >> 4));