[Scummvm-git-logs] scummvm master -> 8075db3c2c117766581c98ac2175d5dce4aa6537
digitall
547637+digitall at users.noreply.github.com
Tue Aug 24 15:18:59 UTC 2021
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:
8075db3c2c DIRECTOR: Simplify convertPixelIntoSurface method in BIT Decoder
Commit: 8075db3c2c117766581c98ac2175d5dce4aa6537
https://github.com/scummvm/scummvm/commit/8075db3c2c117766581c98ac2175d5dce4aa6537
Author: D G Turner (digitall at scummvm.org)
Date: 2021-08-24T16:17:52+01:00
Commit Message:
DIRECTOR: Simplify convertPixelIntoSurface method in BIT Decoder
This had identical code paths after the recent changes.
CID 1461549
Changed paths:
engines/director/images.cpp
diff --git a/engines/director/images.cpp b/engines/director/images.cpp
index 779016f03c..d9ab5de3a2 100644
--- a/engines/director/images.cpp
+++ b/engines/director/images.cpp
@@ -144,30 +144,19 @@ void BITDDecoder::loadPalette(Common::SeekableReadStream &stream) {
}
void BITDDecoder::convertPixelIntoSurface(void* surfacePointer, uint fromBpp, uint toBpp, int red, int green, int blue) {
- if (_version < kFileVer400) {
- switch (toBpp) {
- case 1:
- *((byte*)surfacePointer) = g_director->_wm->findBestColor(red, green, blue);
- return;
-
- case 4:
- *((uint32 *)surfacePointer) = g_director->_wm->findBestColor(red, green, blue);
- return;
-
- }
- } else {
- switch (toBpp) {
- case 1:
- *((byte*)surfacePointer) = g_director->_wm->findBestColor(red, green, blue);
- return;
-
- case 4:
- *((uint32 *)surfacePointer) = g_director->_wm->findBestColor(red, green, blue);
- return;
-
- }
+ switch (toBpp) {
+ case 1:
+ *((byte*)surfacePointer) = g_director->_wm->findBestColor(red, green, blue);
+ break;
+
+ case 4:
+ *((uint32 *)surfacePointer) = g_director->_wm->findBestColor(red, green, blue);
+ break;
+
+ default:
+ warning("BITDDecoder::convertPixelIntoSurface(): conversion from %d to %d not implemented", fromBpp, toBpp);
+ break;
}
- warning("BITDDecoder::convertPixelIntoSurface(): conversion from %d to %d not implemented", fromBpp, toBpp);
}
bool BITDDecoder::loadStream(Common::SeekableReadStream &stream) {
More information about the Scummvm-git-logs
mailing list