[Scummvm-git-logs] scummvm branch-2-7 -> 21ef4972eda26fc53e3f2c94f8480740d0b333cc
sev-
noreply at scummvm.org
Thu Feb 2 18:33:46 UTC 2023
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:
21ef4972ed GRAPHICS: Implemented PixelFormat::isCLUT8()
Commit: 21ef4972eda26fc53e3f2c94f8480740d0b333cc
https://github.com/scummvm/scummvm/commit/21ef4972eda26fc53e3f2c94f8480740d0b333cc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-02-02T19:33:32+01:00
Commit Message:
GRAPHICS: Implemented PixelFormat::isCLUT8()
Changed paths:
graphics/pixelformat.h
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index c1c7d05a0db..5973dd18bab 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -372,6 +372,12 @@ struct PixelFormat {
}
/** Return string representation. */
Common::String toString() const;
+
+ /** Shortcut method for checking if the current format is CLUT8 or not */
+ bool isCLUT8() const {
+ // We do not really need to check masks when all shifts equal zeroes
+ return bytesPerPixel == 1 && rShift == 0 && gShift == 0 && bShift == 0 && aShift == 0;
+ }
};
template<>
More information about the Scummvm-git-logs
mailing list