[Scummvm-git-logs] scummvm master -> 2be3f87a49bc3f59af285f91227fe0e0022d7743

ysj1173886760 42030331+ysj1173886760 at users.noreply.github.com
Thu Aug 5 11:04:14 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:
2be3f87a49 DIRECTOR: change _isQT to _flip in BimapRawDecoder


Commit: 2be3f87a49bc3f59af285f91227fe0e0022d7743
    https://github.com/scummvm/scummvm/commit/2be3f87a49bc3f59af285f91227fe0e0022d7743
Author: ysj1173886760 (1173886760 at qq.com)
Date: 2021-08-05T19:03:58+08:00

Commit Message:
DIRECTOR: change _isQT to _flip in BimapRawDecoder

Changed paths:
    image/codecs/bmp_raw.cpp
    image/codecs/bmp_raw.h


diff --git a/image/codecs/bmp_raw.cpp b/image/codecs/bmp_raw.cpp
index fa04c91e65..7c769f7183 100644
--- a/image/codecs/bmp_raw.cpp
+++ b/image/codecs/bmp_raw.cpp
@@ -28,8 +28,8 @@
 
 namespace Image {
 
-BitmapRawDecoder::BitmapRawDecoder(int width, int height, int bitsPerPixel, bool isQT) : Codec(),
-		_width(width), _height(height), _bitsPerPixel(bitsPerPixel), _isQT(isQT) {
+BitmapRawDecoder::BitmapRawDecoder(int width, int height, int bitsPerPixel, bool flip) : Codec(),
+		_width(width), _height(height), _bitsPerPixel(bitsPerPixel), _flip(flip) {
 	_surface.create(_width, _height, getPixelFormat());
 }
 
@@ -86,7 +86,7 @@ const Graphics::Surface *BitmapRawDecoder::decodeFrame(Common::SeekableReadStrea
 		byte *dst = (byte *)_surface.getPixels();
 
 		for (int i = 0; i < _height; i++) {
-			stream.read(dst + (_isQT ? i : _height - i - 1) * _width, _width);
+			stream.read(dst + (_flip ? i : _height - i - 1) * _width, _width);
 			stream.skip(extraDataLength);
 		}
 	} else if (_bitsPerPixel == 24) {
diff --git a/image/codecs/bmp_raw.h b/image/codecs/bmp_raw.h
index 808fc35f11..f4eb856b81 100644
--- a/image/codecs/bmp_raw.h
+++ b/image/codecs/bmp_raw.h
@@ -34,7 +34,7 @@ namespace Image {
  */
 class BitmapRawDecoder : public Codec {
 public:
-	BitmapRawDecoder(int width, int height, int bitsPerPixel, bool isQT = false);
+	BitmapRawDecoder(int width, int height, int bitsPerPixel, bool _flip = false);
 	~BitmapRawDecoder();
 
 	const Graphics::Surface *decodeFrame(Common::SeekableReadStream &stream);
@@ -47,7 +47,7 @@ private:
 
 	// this flag indicates whether bitmapRawDecoder is created to decode QTvideo or raw images.
 	// because we need to flip the image when we are dealing with QTvideo
-	bool _isQT;
+	bool _flip;
 };
 
 } // End of namespace Image




More information about the Scummvm-git-logs mailing list