[Scummvm-git-logs] scummvm master -> 895069be9a28bf7476491d2ab2ff4947be2261ea

Strangerke noreply at scummvm.org
Fri May 31 22:06:32 UTC 2024


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2ea60691ad  BAGEL: Fix some more XML doc
895069be9a BAGEL: some more cleanup (useless include, useless check before free, useless initialization, ...)


Commit: 2ea60691ad25c79ba652e73fd0aed225a4a0200c
    https://github.com/scummvm/scummvm/commit/2ea60691ad25c79ba652e73fd0aed225a4a0200c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-31T23:06:18+01:00

Commit Message:
 BAGEL: Fix some more XML doc

Changed paths:
    engines/bagel/boflib/gfx/text.h
    engines/bagel/boflib/llist.h
    engines/bagel/boflib/options.h


diff --git a/engines/bagel/boflib/gfx/text.h b/engines/bagel/boflib/gfx/text.h
index 4042402be89..e35fe5e68de 100644
--- a/engines/bagel/boflib/gfx/text.h
+++ b/engines/bagel/boflib/gfx/text.h
@@ -234,11 +234,14 @@ public:
 	 * @param nWeight		Weighting of the font (FW_ identifier)
 	 * @param cColor		Color that the text will be
 	 * @param cShadow		Color that the text's shadow will be
+	 * @param nDX           Shadow DX
+	 * @param nDY           Shadow DY
+	 * @param nFont         Font used (default or mono)
 	 * @return				Error return Code
 	 */
 	ErrorCode displayShadowed(CBofWindow *pWnd, const char *pszText, int nSize,
-		int nWeight, RGBCOLOR cColor, RGBCOLOR cShadow = CTEXT_SHADOW_COLOR,
-		int nDX = CTEXT_SHADOW_DX, int nDY = CTEXT_SHADOW_DY, int n = FONT_DEFAULT);
+							  int nWeight, RGBCOLOR cColor, RGBCOLOR cShadow = CTEXT_SHADOW_COLOR,
+							  int nDX = CTEXT_SHADOW_DX, int nDY = CTEXT_SHADOW_DY, int nFont = FONT_DEFAULT);
 
 	
 	void flushBackground()       {
diff --git a/engines/bagel/boflib/llist.h b/engines/bagel/boflib/llist.h
index dd39efd50f9..c0229c86116 100644
--- a/engines/bagel/boflib/llist.h
+++ b/engines/bagel/boflib/llist.h
@@ -55,7 +55,7 @@ public:
 	 * @remarks         This will link a new list into the current right after the current node
 	 * @param pNewList  Pointer to list to be inserted
 	 */
-	void Insert(CLList *);
+	void Insert(CLList *pNewList);
 
 	/**
 	 * Deletes current node
@@ -68,7 +68,7 @@ public:
 	 *                  tail of one list to the head of another
 	 * @param pNewList  New list to link to head of current list
 	 */
-	void addToHead(CLList *);
+	void addToHead(CLList *pNewList);
 
 	/**
 	 * Links specified node to tail of current list
@@ -76,7 +76,7 @@ public:
 	 *                  head of one list to the tail of another
 	 * @param pNewList  Pointer to new list
 	 */
-	void addToTail(CLList *);
+	void addToTail(CLList *pNewList);
 
 	/**
 	 * Moves this item to the head of the linked list
@@ -112,6 +112,7 @@ public:
 	CLList *getPrev() const {
 		return _pPrev;
 	}
+	
 	CLList *getNext() const {
 		return _pNext;
 	}
@@ -119,6 +120,7 @@ public:
 	void *getData() const {
 		return _pData;
 	}
+	
 	void PutData(void *pObj) {
 		_pData = pObj;
 	}
diff --git a/engines/bagel/boflib/options.h b/engines/bagel/boflib/options.h
index 3ea5b39fe85..e2f0ad72f3b 100644
--- a/engines/bagel/boflib/options.h
+++ b/engines/bagel/boflib/options.h
@@ -114,7 +114,7 @@ public:
 	 * Adds or modifies 1 option in list
 	 * @param pszSection        Section in .INI file
 	 * @param pszOption         Option to update
-	 * @param pszValue          New value
+	 * @param nValue            New value
 	 * @return                  Error return code
 	 */
 	ErrorCode writeSetting(const char *pszSection, const char *pszOption, int nValue);
@@ -123,10 +123,10 @@ public:
 	 * Reads value for the specified option
 	 * @param section        Section in .INI file
 	 * @param option         Option to update
-	 * @param stringValue          destination buffer for read value
-	 * @param defaultValue        Default value if not exists
-	 * @param nSize             Max length of stringValue buffer
-	 * @return                  Error return code
+	 * @param stringValue    Destination buffer for read value
+	 * @param defaultValue   Default value if not exists
+	 * @param nSize          Max length of stringValue buffer
+	 * @return               Error return code
 	 */
 	ErrorCode readSetting(const char *section, const char *option, char *stringValue, const char *defaultValue, uint32 nSize);
 


Commit: 895069be9a28bf7476491d2ab2ff4947be2261ea
    https://github.com/scummvm/scummvm/commit/895069be9a28bf7476491d2ab2ff4947be2261ea
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-31T23:06:18+01:00

Commit Message:
BAGEL: some more cleanup (useless include, useless check before free, useless initialization, ...)

Changed paths:
    engines/bagel/boflib/gui/movie.cpp
    engines/bagel/boflib/gui/scroll_bar.cpp
    engines/bagel/boflib/gui/window.h
    engines/bagel/boflib/sound.cpp
    engines/bagel/boflib/vhash_table.h


diff --git a/engines/bagel/boflib/gui/movie.cpp b/engines/bagel/boflib/gui/movie.cpp
index 3c745fab478..ac568e684fa 100644
--- a/engines/bagel/boflib/gui/movie.cpp
+++ b/engines/bagel/boflib/gui/movie.cpp
@@ -244,12 +244,10 @@ bool CBofMovie::play() {
 }
 
 bool CBofMovie::reverse(bool bLoop,  bool bEscCanStop) {
-	bool bSuccess = true;
-
 	_bEscCanStop   = bEscCanStop;
 	_bLoop = bLoop;
 
-	bSuccess = reverse();
+	bool bSuccess = reverse();
 
 	getParent()->disable();
 	getParent()->flushAllMessages();
diff --git a/engines/bagel/boflib/gui/scroll_bar.cpp b/engines/bagel/boflib/gui/scroll_bar.cpp
index 39304664684..51dde7b8c29 100644
--- a/engines/bagel/boflib/gui/scroll_bar.cpp
+++ b/engines/bagel/boflib/gui/scroll_bar.cpp
@@ -273,11 +273,6 @@ ErrorCode CBofScrollBar::paint(CBofRect *pDirtyRect) {
 	if (!errorOccurred()) {
 		CBofRect cRect(0, 0, _cRect.width() - 1, _cRect.height() - 1);
 		CBofPoint cPoint(0, 0);
-
-		if (pDirtyRect == nullptr) {
-			pDirtyRect = &cRect;
-		}
-
 		CBofPalette *pPalette = CBofApp::getApp()->getPalette();
 
 		//
diff --git a/engines/bagel/boflib/gui/window.h b/engines/bagel/boflib/gui/window.h
index 8a0aa48ed80..84bd2a04edf 100644
--- a/engines/bagel/boflib/gui/window.h
+++ b/engines/bagel/boflib/gui/window.h
@@ -78,7 +78,7 @@ public:
 	 * @param x         X position
 	 * @param y         Y position
 	 * @param nWidth    Width of window to create (optional)
-	 * @paramnHeight    Height of window to create (optional)
+	 * @param nHeight   Height of window to create (optional)
 	 * @param pParent   Parent of this window (optional)
 	 */
 	CBofWindow(const char *pszName, int x = 0, int y = 0, int nWidth = USE_DEFAULT, int nHeight = USE_DEFAULT, CBofWindow *pParent = nullptr);
@@ -103,14 +103,14 @@ public:
 	 * @param nControlID    User defined ID of this window
 	 * @return              Error return code
 	 */
-	ErrorCode create(const char *pszName, int x = 0, int y = 0, int nWidth = USE_DEFAULT, int nHeight = USE_DEFAULT, CBofWindow *pParent = nullptr, uint32 nControlID = 0);
+	virtual ErrorCode create(const char *pszName, int x = 0, int y = 0, int nWidth = USE_DEFAULT, int nHeight = USE_DEFAULT, CBofWindow *pParent = nullptr, uint32 nControlID = 0);
 
 	/**
 	 * Creates a window
 	 * @param pszName       Name of window
 	 * @param pRect         Rectangle for window placement
 	 * @param pParent       Parent of this window (optional)
-	 * @paramnControlID     User defined ID of this window
+	 * @param nControlID    User defined ID of this window
 	 * @return              Error return code
 	 */
 	ErrorCode create(const char *pszName, const CBofRect *pRect = nullptr, CBofWindow *pParent = nullptr, uint32 nControlID = 0);
diff --git a/engines/bagel/boflib/sound.cpp b/engines/bagel/boflib/sound.cpp
index 6506bbe9353..db674e9ca9c 100644
--- a/engines/bagel/boflib/sound.cpp
+++ b/engines/bagel/boflib/sound.cpp
@@ -626,7 +626,7 @@ bool CBofSound::bofSleep(uint32 wait) {
 
 bool BofPlaySound(const char *pszSoundFile, uint32 nFlags, int iQSlot) {
 	// Assume failure
-	bool bSuccess = false;
+	bool bSuccess;
 
 	if (pszSoundFile != nullptr) {
 		nFlags |= SOUND_AUTODELETE;
@@ -702,10 +702,7 @@ bool CBofSound::loadSound() {
 	assert(isValidObject(this));
 	assert(_szFileName[0] != '\0');
 
-	// Assume failure
-	bool bSuccess = false;
-
-	bSuccess = true;
+	bool bSuccess = true;
 	if (_pFileBuf == nullptr) {
 		bSuccess = false;
 
@@ -728,10 +725,8 @@ bool CBofSound::loadSound() {
 bool CBofSound::releaseSound() {
 	assert(isValidObject(this));
 
-	if (_pFileBuf != nullptr) {
-		free(_pFileBuf);
-		_pFileBuf = nullptr;
-	}
+	free(_pFileBuf);
+	_pFileBuf = nullptr;
 
 	return true;
 }
diff --git a/engines/bagel/boflib/vhash_table.h b/engines/bagel/boflib/vhash_table.h
index 3fad0c4fc68..b03be0526e5 100644
--- a/engines/bagel/boflib/vhash_table.h
+++ b/engines/bagel/boflib/vhash_table.h
@@ -23,7 +23,6 @@
 #ifndef BAGEL_BOFLIB_VHASH_TABLE_H
 #define BAGEL_BOFLIB_VHASH_TABLE_H
 
-#include "bagel/boflib/stdinc.h"
 #include "bagel/boflib/list.h"
 
 namespace Bagel {




More information about the Scummvm-git-logs mailing list