aboutsummaryrefslogtreecommitdiff
path: root/engines/cine/pal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cine/pal.cpp')
-rw-r--r--engines/cine/pal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp
index 55f9576590..b2cb9b3451 100644
--- a/engines/cine/pal.cpp
+++ b/engines/cine/pal.cpp
@@ -207,9 +207,9 @@ Palette &Palette::loadCineHighPal(const byte *colors, const uint numColors) {
Palette &Palette::load(const byte *colors, const Graphics::PixelFormat format, const uint numColors) {
assert(format.aLoss == 8); // No alpha
- assert(format.rShift % 8 == ((format.rShift + (8 - format.rLoss - 1)) % 8)); // R must be inside one byte
- assert(format.gShift % 8 == ((format.gShift + (8 - format.gLoss - 1)) % 8)); // G must be inside one byte
- assert(format.bShift % 8 == ((format.bShift + (8 - format.bLoss - 1)) % 8)); // B must be inside one byte
+ assert(format.rShift / 8 == (format.rShift + MAX<int>(0, 8 - format.rLoss - 1)) / 8); // R must be inside one byte
+ assert(format.gShift / 8 == (format.gShift + MAX<int>(0, 8 - format.gLoss - 1)) / 8); // G must be inside one byte
+ assert(format.bShift / 8 == (format.bShift + MAX<int>(0, 8 - format.bLoss - 1)) / 8); // B must be inside one byte
_rBits = (8 - format.rLoss);
_gBits = (8 - format.gLoss);