[Scummvm-git-logs] scummvm master -> 4d0b82d942f4bae8a38f01c686110164c73cfcce

Strangerke noreply at scummvm.org
Tue Jun 4 21:12:29 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:
4d0b82d942 BAGEL: Change function definitions when it doesn't match the one in declqrqtion


Commit: 4d0b82d942f4bae8a38f01c686110164c73cfcce
    https://github.com/scummvm/scummvm/commit/4d0b82d942f4bae8a38f01c686110164c73cfcce
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-06-04T22:12:17+01:00

Commit Message:
BAGEL: Change function definitions when it doesn't match the one in declqrqtion

Changed paths:
    engines/bagel/baglib/storage_dev_win.cpp
    engines/bagel/baglib/storage_dev_win.h
    engines/bagel/boflib/dat_file.h
    engines/bagel/boflib/gfx/sprite.h
    engines/bagel/boflib/gui/list_box.cpp
    engines/bagel/boflib/gui/list_box.h
    engines/bagel/boflib/gui/window.h
    engines/bagel/boflib/point.h
    engines/bagel/dialogs/next_cd_dialog.h
    engines/bagel/dialogs/save_dialog.h
    engines/bagel/dialogs/start_dialog.cpp
    engines/bagel/dialogs/start_dialog.h


diff --git a/engines/bagel/baglib/storage_dev_win.cpp b/engines/bagel/baglib/storage_dev_win.cpp
index c997729e225..8dc373451cc 100644
--- a/engines/bagel/baglib/storage_dev_win.cpp
+++ b/engines/bagel/baglib/storage_dev_win.cpp
@@ -1062,18 +1062,17 @@ CBagObject *CBagStorageDev::onNewVariableObject(const CBofString &) {
 }
 
 
-CBagObject *CBagStorageDev::onNewUserObject(const CBofString &str) {
+CBagObject *CBagStorageDev::onNewUserObject(const CBofString &sInit) {
 	char szLocalBuff[256];
 	CBofString s(szLocalBuff, 256);
 
-	s = str;
-
+	s = sInit;
 	bofMessageBox(s.getBuffer(), "Could not find object type");
 
 	return nullptr;
 }
 
-void CBagStorageDev::onSetFilter(bool (*filterFunction)(uint16 nFilterid, CBofBitmap *, CBofRect *)) {
+void CBagStorageDev::onSetFilter(bool (*filterFunction)(uint16 nFilterId, CBofBitmap *, CBofRect *)) {
 	_pBitmapFilter = filterFunction;
 }
 
diff --git a/engines/bagel/baglib/storage_dev_win.h b/engines/bagel/baglib/storage_dev_win.h
index 39ed35930b1..d1313f77441 100644
--- a/engines/bagel/baglib/storage_dev_win.h
+++ b/engines/bagel/baglib/storage_dev_win.h
@@ -179,7 +179,7 @@ public:
 	CBagObject *getObject(int nRefId, bool bActiveOnly = false);
 	CBagObject *getObject(const CBofPoint &xPoint, bool bActiveOnly = false);
 	CBagObject *getObject(const CBofString &sName, bool bActiveOnly = false);
-	CBagObject *getObjectByType(const CBofString &sName, bool bActiveOnly = false);
+	CBagObject *getObjectByType(const CBofString &sType, bool bActiveOnly = false);
 
 	static CBofPoint &getLastCursorLocation() {
 		return *_xCursorLocation;
@@ -187,7 +187,7 @@ public:
 	CBofList<CBagObject *> *getObjectList() const {
 		return _pObjectList;
 	}
-	void setObjectList(CBofList<CBagObject *> *pList, CBofList<CBagExpression *> *pEList = nullptr);
+	void setObjectList(CBofList<CBagObject *> *pOList, CBofList<CBagExpression *> *pEList = nullptr);
 
 	bool contains(CBagObject *pObj, bool bActive = true);
 
@@ -211,7 +211,7 @@ public:
 	virtual ErrorCode activateLocalObject(const CBofString &sName);
 	virtual ErrorCode attachActiveObjects();
 
-	virtual ErrorCode removeObject(CBagObject *pObj);
+	virtual ErrorCode removeObject(CBagObject *pRObj);
 	virtual ErrorCode deactivateLocalObject(CBagObject *pObj);
 	virtual ErrorCode deactivateLocalObject(const CBofString &sName);
 	virtual ErrorCode detachActiveObjects();
@@ -316,7 +316,7 @@ public:
 		return xPoint;
 	}
 
-	virtual ErrorCode loadFile(const CBofString &sFile);
+	virtual ErrorCode loadFile(const CBofString &sWldName);
 	virtual ErrorCode loadFileFromStream(CBagIfstream &fpInput, const CBofString &sWldName, bool bAttach = true);
 
 	virtual void onMouseMove(uint32 /*nFlags*/, CBofPoint * /*xPoint*/, void * = nullptr);
@@ -358,7 +358,7 @@ public:
 
 	// Correctly set the filter function for the storage device.
 	//
-	void onSetFilter(bool (*FilterFxn)(uint16 nFilterId, CBofBitmap *, CBofRect *));
+	void onSetFilter(bool (*filterFunction)(uint16 nFilterId, CBofBitmap *, CBofRect *));
 
 	// Get a pointer to the filter function
 	//
@@ -424,7 +424,7 @@ public:
 
 	ErrorCode close() override;
 	virtual ErrorCode runModal(CBagObject *pObj);
-	void onTimer(uint32 nTimerId) override;
+	void onTimer(uint32 nEventID) override;
 
 	void setOnUpdate(bool bVal = true) {
 		_bOnUpdate = bVal;
@@ -511,7 +511,7 @@ public:
 		return getBackdrop();
 	}
 
-	ErrorCode loadFile(const CBofString &sWldFile) override;
+	ErrorCode loadFile(const CBofString &sFile) override;
 
 	ErrorCode create(const char *pszName, CBofRect *pRect, CBofWindow *pParent, uint32 nControlID = 0) override;
 
diff --git a/engines/bagel/boflib/dat_file.h b/engines/bagel/boflib/dat_file.h
index 4b6ea207930..70d1062bb6f 100644
--- a/engines/bagel/boflib/dat_file.h
+++ b/engines/bagel/boflib/dat_file.h
@@ -168,12 +168,12 @@ public:
 	 * Writes specified to data-file.
 	 * @param lRecNum           Record number to read
 	 * @param pBuf              Buffer to write data from
-	 * @param lRecSize          Size of buffer
+	 * @param lSize             Size of buffer
 	 * @param bUpdateHeader     True if header is to be committed to disk
 	 * @param lKey              Hash key
 	 * @return                  Error return code
 	 */
-	ErrorCode writeRecord(int32 lRecNum, void *pBuf, int32 lRecSize = -1, bool bUpdateHeader = false, uint32 lKey = 0xFFFFFFFF);
+	ErrorCode writeRecord(int32 lRecNum, void *pBuf, int32 lSize = -1, bool bUpdateHeader = false, uint32 lKey = 0xFFFFFFFF);
 
 	/**
 	 * Verifies specified record in data-file.
@@ -191,12 +191,12 @@ public:
 	/**
 	 * Adds a new record to the data-file.
 	 * @param pBuf              Buffer to write data from
-	 * @param lRecSize          Size of buffer
+	 * @param lLength           Size of buffer
 	 * @param bUpdateHeader     true if header is to be committed to disk
 	 * @param lKey              hash Key
 	 * @return                  Error return code
 	 */
-	ErrorCode addRecord(void *pBuf, int32 lRecSize, bool bUpdateHeader = false, uint32 lKey = 0xFFFFFFFF);
+	ErrorCode addRecord(void *pBuf, int32 lLength, bool bUpdateHeader = false, uint32 lKey = 0xFFFFFFFF);
 
 	/**
 	 * Finds record by it's key.
diff --git a/engines/bagel/boflib/gfx/sprite.h b/engines/bagel/boflib/gfx/sprite.h
index 6702ae3ba18..1e75ddf91f8 100644
--- a/engines/bagel/boflib/gfx/sprite.h
+++ b/engines/bagel/boflib/gfx/sprite.h
@@ -91,7 +91,7 @@ public:
 	// sprites no longer retain their background, so there would be no way
 	// to restore the background, and that's all eraseSprite does.
 
-	CBofSprite *interception(CBofRect *newRect, CBofSprite *pSprite);
+	CBofSprite *interception(CBofRect *newRect, CBofSprite *pTestSprite);
 	CBofSprite *interception(CBofSprite *pTestSprite);
 
 	CBofSprite *interception() {
@@ -102,7 +102,7 @@ public:
 		return interception(newRect, _pSpriteChain);
 	}
 
-	bool testInterception(CBofSprite *pSprite, CBofPoint *pPoint = nullptr);
+	bool testInterception(CBofSprite *pTestSprite, CBofPoint *pPoint = nullptr);
 
 	void setPosition(int x, int y);
 
@@ -170,8 +170,8 @@ public:
 		return _pSpriteChain;
 	}
 
-	static bool updateDirtyRect(CBofWindow *pWnd, CBofSprite *pSprite = nullptr);
-	static bool updateDirtyRect(CBofBitmap *pBmp, CBofSprite *pSprite = nullptr);
+	static bool updateDirtyRect(CBofWindow *pWnd, CBofSprite *pPrimarySprite = nullptr);
+	static bool updateDirtyRect(CBofBitmap *pBmp, CBofSprite *pPrimarySprite = nullptr);
 	static void addToDirtyRect(CBofRect *pRect);
 	static void clearDirtyRect() {
 		_cDirtyRect->setRectEmpty();
diff --git a/engines/bagel/boflib/gui/list_box.cpp b/engines/bagel/boflib/gui/list_box.cpp
index fd7af32359f..36d67e30ce1 100644
--- a/engines/bagel/boflib/gui/list_box.cpp
+++ b/engines/bagel/boflib/gui/list_box.cpp
@@ -29,8 +29,6 @@ namespace Bagel {
 
 #define TEXT_ITEM_HEIGHT 24
 
-#define COLOR_USE_DEFAULT 0xFFFFFFFF
-
 
 CBofListBox::CBofListBox() {
 	_cTextColor = CTEXT_COLOR;
diff --git a/engines/bagel/boflib/gui/list_box.h b/engines/bagel/boflib/gui/list_box.h
index 571a3de45ae..7d289d27c8a 100644
--- a/engines/bagel/boflib/gui/list_box.h
+++ b/engines/bagel/boflib/gui/list_box.h
@@ -32,9 +32,16 @@ namespace Bagel {
 #define LISTBOX_NORMAL 0
 #define LISTBOX_SELECT 1
 #define LISTBOX_USENOW 2
+#define COLOR_USE_DEFAULT 0xFFFFFFFF
 
 class ListBoxItem {
 public:
+	ListBoxItem() {
+		_pTextStr = nullptr;
+		_nTextLineColor = COLOR_USE_DEFAULT;
+	}
+	
+	
 	CBofString *_pTextStr;
 	RGBCOLOR _nTextLineColor;
 };
diff --git a/engines/bagel/boflib/gui/window.h b/engines/bagel/boflib/gui/window.h
index f79b9fa71d3..cc49c5fa43f 100644
--- a/engines/bagel/boflib/gui/window.h
+++ b/engines/bagel/boflib/gui/window.h
@@ -172,7 +172,7 @@ public:
 	/**
 	 * Posts a user defined message
 	 */
-	void postUserMessage(uint32 nMessage, uint32 lExtraInfo);
+	void postUserMessage(uint32 lMessage, uint32 lExtraInfo);
 
 	/**
 	 * Sets a timer which calls specified callback (or onTimer)
@@ -184,9 +184,9 @@ public:
 
 	/**
 	 * Stops specified timer
-	 * @param nTimerID       ID of timer to stop
+	 * @param nID       ID of timer to stop
 	 */
-	void killTimer(uint32 nTimerID);
+	void killTimer(uint32 nID);
 
 	/**
 	 * Stops all timers associated with current window
@@ -244,19 +244,19 @@ public:
 
 	/**
 	 * Associates a new background bitmap to this window
-	 * @param pBitmap       New background bitmap
+	 * @param pNewBitmap       New background bitmap
 	 * @param bRefresh      true if should repaint now
 	 * @return              Error return code
 	 */
-	ErrorCode setBackdrop(CBofBitmap *pBitmap, bool bRefresh = false);
+	ErrorCode setBackdrop(CBofBitmap *pNewBitmap, bool bRefresh = false);
 
 	/**
 	 * Associates a new background bitmap to this window
-	 * @param pszBmpFile    new background bitmap from file
+	 * @param pszFileName   new background bitmap from file
 	 * @param bRefresh      true if should repaint now
 	 * @return              Error return code
 	 */
-	ErrorCode setBackdrop(const char *pszBmpFile, bool bRefresh = false);
+	ErrorCode setBackdrop(const char *pszFileName, bool bRefresh = false);
 
 	void clearBackdrop() {
 		_pBackdrop = nullptr;
@@ -363,7 +363,7 @@ public:
 	virtual void onSoundNotify(CBofObject *pObject, uint32 lParam2);
 	virtual void onMovieNotify(uint32 lParam1, uint32 lParam2);
 
-	virtual void onMCINotify(uint32 lParam1, uint32 lParam2);
+	virtual void onMCINotify(uint32 wParam, uint32 lParam);
 
 	virtual void onTimer(uint32 nTimerId);
 
diff --git a/engines/bagel/boflib/point.h b/engines/bagel/boflib/point.h
index b913208d58b..a754292af20 100644
--- a/engines/bagel/boflib/point.h
+++ b/engines/bagel/boflib/point.h
@@ -38,7 +38,7 @@ public:
 	CBofPoint(int initX, int initY);
 	CBofPoint(StPoint stPoint);
 	CBofPoint(const CBofPoint &cPoint);
-	CBofPoint(const StSize &cSize);
+	CBofPoint(const StSize &stSize);
 
 	CBofPoint(const POINT &stPoint) {
 		setWinPoint(&stPoint);
diff --git a/engines/bagel/dialogs/next_cd_dialog.h b/engines/bagel/dialogs/next_cd_dialog.h
index c932047708f..f14db310318 100644
--- a/engines/bagel/dialogs/next_cd_dialog.h
+++ b/engines/bagel/dialogs/next_cd_dialog.h
@@ -57,9 +57,9 @@ public:
 protected:
 	void onPaint(CBofRect *pRect) override;
 	void onClose() override;
-	void onBofButton(CBofObject *pObject, int nState) override;
+	void onBofButton(CBofObject *, int nFlags) override;
 
-	void onKeyHit(uint32 lKey, uint32 lRepCount) override;
+	void onKeyHit(uint32 lKey, uint32 nRepCount) override;
 
 	// Data
 	CBofBmpButton *_pButton;
diff --git a/engines/bagel/dialogs/save_dialog.h b/engines/bagel/dialogs/save_dialog.h
index f6e5a3ce9ee..43bc128889b 100644
--- a/engines/bagel/dialogs/save_dialog.h
+++ b/engines/bagel/dialogs/save_dialog.h
@@ -54,9 +54,9 @@ public:
 
 protected:
 	void onPaint(CBofRect *pRect) override;
-	void onBofButton(CBofObject *pObject, int nState) override;
+	void onBofButton(CBofObject *pObject, int nFlags) override;
 	void onBofListBox(CBofObject *pObject, int nItemIndex) override;
-	void onKeyHit(uint32 lKey, uint32 lRepCount) override;
+	void onKeyHit(uint32 lKey, uint32 nRepCount) override;
 
 	void saveAndClose();
 
diff --git a/engines/bagel/dialogs/start_dialog.cpp b/engines/bagel/dialogs/start_dialog.cpp
index 4bede05f569..005d1342aa6 100644
--- a/engines/bagel/dialogs/start_dialog.cpp
+++ b/engines/bagel/dialogs/start_dialog.cpp
@@ -126,15 +126,11 @@ void CBagStartDialog::onPaint(CBofRect *pRect) {
 void CBagStartDialog::onKeyHit(uint32 lKey, uint32 nRepCount) {
 	assert(isValidObject(this));
 
-	switch (lKey) {
-	case BKEY_ESC:
+	if (lKey == BKEY_ESC) {
 		setReturnValue(QUIT_BTN);
 		close();
-		break;
-
-	default:
+	} else {
 		CBofDialog::onKeyHit(lKey, nRepCount);
-		break;
 	}
 }
 
diff --git a/engines/bagel/dialogs/start_dialog.h b/engines/bagel/dialogs/start_dialog.h
index b42c1878a25..6b08649c782 100644
--- a/engines/bagel/dialogs/start_dialog.h
+++ b/engines/bagel/dialogs/start_dialog.h
@@ -40,9 +40,9 @@ private:
 protected:
 	void onPaint(CBofRect *pRect) override;
 	void onClose() override;
-	void onBofButton(CBofObject *pObject, int nState) override;
+	void onBofButton(CBofObject *pObject, int nFlags) override;
 
-	void onKeyHit(uint32 lKey, uint32 lRepCount) override;
+	void onKeyHit(uint32 lKey, uint32 nRepCount) override;
 
 public:
 	CBagStartDialog(const char *pszFileName, CBofWindow *pWin);




More information about the Scummvm-git-logs mailing list