[Scummvm-git-logs] scummvm master -> 3e92d4384556bbbf83fe8511caa688c79f1e9c5a

Strangerke noreply at scummvm.org
Sat May 11 22:09:02 UTC 2024


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:
3e92d43845 BAGEL: Remove another unused member in bitmap, some cleanup


Commit: 3e92d4384556bbbf83fe8511caa688c79f1e9c5a
    https://github.com/scummvm/scummvm/commit/3e92d4384556bbbf83fe8511caa688c79f1e9c5a
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-11T23:08:54+01:00

Commit Message:
BAGEL: Remove another unused member in bitmap, some cleanup

Changed paths:
    engines/bagel/boflib/gfx/bitmap.cpp
    engines/bagel/boflib/gfx/bitmap.h


diff --git a/engines/bagel/boflib/gfx/bitmap.cpp b/engines/bagel/boflib/gfx/bitmap.cpp
index 6a577332822..0c814b8219e 100644
--- a/engines/bagel/boflib/gfx/bitmap.cpp
+++ b/engines/bagel/boflib/gfx/bitmap.cpp
@@ -28,7 +28,6 @@
 #include "bagel/boflib/app.h"
 #include "bagel/boflib/file.h"
 #include "bagel/boflib/file_functions.h"
-#include "bagel/boflib/log.h"
 #include "bagel/boflib/misc.h"
 
 namespace Bagel {
@@ -66,17 +65,14 @@ CBofBitmap::CBofBitmap(int dx, int dy, CBofPalette *pPalette, bool bOwnPalette,
 	_bInitialized = true;
 
 	// Allow privatization of the bitmap (used only on mac from displayTextEx).;
+	_pBits = pPrivateBuff;
 	if (pPrivateBuff != nullptr) {
-		_pBits = pPrivateBuff;
-
 		_bitmap.w = dx;
 		_bitmap.h = dy;
 		_bitmap.pitch = _nScanDX;
 		_bitmap.format = Graphics::PixelFormat::createFormatCLUT8();
 		_bitmap.setPixels(pPrivateBuff);
 
-	} else {
-		_pBits = nullptr;
 	}
 
 	_pPalette = pPalette;
@@ -127,7 +123,6 @@ ErrorCode CBofBitmap::buildBitmap(CBofPalette *pPalette) {
 	assert(pPalette != nullptr);
 
 	if (_errCode == ERR_NONE) {
-
 		_bitmap.create(_nDX, _nDY, Graphics::PixelFormat::createFormatCLUT8());
 		_pBits = (byte *)_bitmap.getBasePtr(0, 0);
 		_nScanDX = _bitmap.pitch;
diff --git a/engines/bagel/boflib/gfx/bitmap.h b/engines/bagel/boflib/gfx/bitmap.h
index cf314a4febb..67cd9370f36 100644
--- a/engines/bagel/boflib/gfx/bitmap.h
+++ b/engines/bagel/boflib/gfx/bitmap.h
@@ -141,7 +141,7 @@ public:
 
 	/**
 	 * Assigns specified palette to this bitmap
-	 * @param pBofPalette   Pointer to CBofPalette to be assigned
+	 * @param pPalette      Pointer to CBofPalette to be assigned
 	 * @param bOwnPalette   true if bitmap is to own this palette
 	 */
 	void setPalette(CBofPalette *pPalette, bool bOwnPalette = false);
@@ -150,10 +150,6 @@ public:
 		return _pPalette;
 	}
 
-	bool isOwnPalette() {
-		return _bOwnPalette;
-	}
-
 	void setIsOwnPalette(bool own) {
 		_bOwnPalette = own;
 	}




More information about the Scummvm-git-logs mailing list