[Scummvm-git-logs] scummvm master -> 920461372e7d0d324bae76472eeded348ff88479
mduggan
mgithub at guarana.org
Mon Sep 21 07:50:07 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
920461372e ULTIMA8: Add explicit casts to palette matrix
Commit: 920461372e7d0d324bae76472eeded348ff88479
https://github.com/scummvm/scummvm/commit/920461372e7d0d324bae76472eeded348ff88479
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2020-09-21T16:49:54+09:00
Commit Message:
ULTIMA8: Add explicit casts to palette matrix
Changed paths:
engines/ultima/ultima8/graphics/palette_fader_process.cpp
diff --git a/engines/ultima/ultima8/graphics/palette_fader_process.cpp b/engines/ultima/ultima8/graphics/palette_fader_process.cpp
index ef1f4fd91e..2ef44d484f 100644
--- a/engines/ultima/ultima8/graphics/palette_fader_process.cpp
+++ b/engines/ultima/ultima8/graphics/palette_fader_process.cpp
@@ -296,9 +296,13 @@ uint32 PaletteFaderProcess::I_jumpToAllGivenColor(const uint8 *args,
ARG_UINT8(g);
ARG_UINT8(b);
- const int16 color_matrix[] = {0, 0, 0, r << 4,
- 0, 0, 0, g << 4,
- 0, 0, 0, b << 4
+ const int16 r16 = static_cast<int16>(r) << 4;
+ const int16 g16 = static_cast<int16>(g) << 4;
+ const int16 b16 = static_cast<int16>(b) << 4;
+
+ const int16 color_matrix[] = {0, 0, 0, r16,
+ 0, 0, 0, g16,
+ 0, 0, 0, b16
};
PaletteManager::get_instance()->transformPalette(PaletteManager::Pal_Game,
More information about the Scummvm-git-logs
mailing list