BAGEL: Remove const qualifier for parameters in function declarations

This commit is contained in:
Strangerke 2024-06-05 22:36:05 +01:00
parent d4f52b8a61
commit 87de02d782
10 changed files with 24 additions and 24 deletions

View File

@ -178,7 +178,7 @@ public:
virtual CBagStorageDev *onNewStorageDev(int type) = 0;
virtual void onNewFilter(CBagStorageDev *, const CBofString &typeStr) = 0;
virtual void onNewFilter(CBagStorageDev *sdev, const int type) = 0;
virtual void onNewFilter(CBagStorageDev *sdev, int type) = 0;
virtual ErrorCode onHelp(const CBofString &helpFile, bool saveBkgFl = true, CBofWindow *parent = nullptr);

View File

@ -68,9 +68,9 @@ public:
return _bPanorama;
}
ErrorCode paint(CBofBitmap *pBmp, const CBofPoint xDstOffset = CBofPoint(0, 0));
ErrorCode paint(CBofBitmap *pBmp, CBofPoint xDstOffset = CBofPoint(0, 0));
ErrorCode paintUncorrected(CBofBitmap *pBmp, CBofRect &dstRect);
ErrorCode paintWarped(CBofBitmap *pBmp, const CBofRect &dstRect, const CBofRect &srcRect, const int offset = 0, CBofBitmap *pSrcBmp = nullptr, const CBofRect &preSrcRect = CBofRect());
ErrorCode paintWarped(CBofBitmap *pBmp, const CBofRect &dstRect, const CBofRect &srcRect, int offset = 0, CBofBitmap *pSrcBmp = nullptr, const CBofRect &preSrcRect = CBofRect());
CBofRect getWarpSrcRect();
CBofPoint warpedPoint(CBofPoint &xPoint);

View File

@ -69,7 +69,7 @@ public:
};
// Filter function function prototype.
typedef bool (*FilterFunction)(const uint16 nFilterId, CBofBitmap *, CBofRect *);
typedef bool (*FilterFunction)(uint16 nFilterId, CBofBitmap *, CBofRect *);
/**
* CBagPanWindow is a window that contains a slide bitmap object. It has specialize

View File

@ -55,24 +55,24 @@ public:
bool loadSprite(const char *pszPathName, int nCels = 1);
bool loadSprite(CBofBitmap *pBitmap, int nCels = 1);
bool paintSprite(CBofBitmap *pBmp, const int x, const int y);
bool paintSprite(CBofBitmap *pBmp, int x, int y);
bool paintSprite(CBofBitmap *pBmp, CBofPoint point) {
return paintSprite(pBmp, point.x, point.y);
}
bool paintSprite(CBofWindow *pWnd, const int x, const int y);
bool paintSprite(CBofWindow *pWnd, int x, int y);
bool paintSprite(CBofWindow *pWnd, CBofPoint point) {
return paintSprite(pWnd, point.x, point.y);
}
bool paintCel(CBofWindow *pWnd, int nCelId, const int x, const int y);
bool paintCel(CBofBitmap *pBmp, int nCelId, const int x, const int y);
bool paintCel(CBofWindow *pWnd, int nCelId, int x, int y);
bool paintCel(CBofBitmap *pBmp, int nCelId, int x, int y);
void batchPaint(const int, const int y);
void batchPaint(int, int y);
void batchErase();
bool setupCels(const int nCels);
void setCel(const int nCelID);
bool setupCels(int nCels);
void setCel(int nCelID);
void nextCel();
void prevCel();

View File

@ -262,7 +262,7 @@ public:
* @param nFont Font used (default or mono)
* @return Error return Code
*/
ErrorCode displayTextEx(CBofBitmap *pBmp, const char *pszText, CBofRect *pRect, const int nSize, const int nWeight, const bool bShadowed, int nFont = FONT_DEFAULT);
ErrorCode displayTextEx(CBofBitmap *pBmp, const char *pszText, CBofRect *pRect, int nSize, int nWeight, bool bShadowed, int nFont = FONT_DEFAULT);
static Graphics::Font *getFont(int nFont, int nSize, int nWeight);
@ -283,8 +283,8 @@ private:
* @param nFont Font used (default or mono)
* @return Error return Code
*/
ErrorCode displayText(CBofWindow *pWnd, const char *pszText, CBofRect *pRect, const int nSize, const int nWeight, const bool bShadowed, int nFont = FONT_DEFAULT);
ErrorCode displayText(CBofBitmap *pBmp, const char *pszText, CBofRect *pRect, const int nSize, const int nWeight, const bool bShadowed, int nFont = FONT_DEFAULT);
ErrorCode displayText(CBofWindow *pWnd, const char *pszText, CBofRect *pRect, int nSize, int nWeight, bool bShadowed, int nFont = FONT_DEFAULT);
ErrorCode displayText(CBofBitmap *pBmp, const char *pszText, CBofRect *pRect, int nSize, int nWeight, bool bShadowed, int nFont = FONT_DEFAULT);
void displayLine(Graphics::Font *font, Graphics::ManagedSurface &surface, const Common::U32String &line,
int left, int top, int width, int color, Graphics::TextAlign align);
@ -320,10 +320,10 @@ protected:
// Global text functions
//
ErrorCode paintText(CBofWindow *pWnd, CBofRect *pRect, const char *, const int nSize, const int nWeight, const RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 nFormat = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
ErrorCode paintText(CBofBitmap *pBmp, CBofRect *pRect, const char *, const int nSize, const int nWeight, const RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 nFormat = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
ErrorCode paintText(CBofWindow *pWnd, CBofRect *pRect, const char *, int nSize, int nWeight, RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 nFormat = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
ErrorCode paintText(CBofBitmap *pBmp, CBofRect *pRect, const char *, int nSize, int nWeight, RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 nFormat = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
ErrorCode paintShadowedText(CBofBitmap *, CBofRect *pRect, const char *, const int nSize, const int nWeight, const RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 n = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
ErrorCode paintShadowedText(CBofBitmap *, CBofRect *pRect, const char *, int nSize, int nWeight, RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 n = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
/**
* Utility routine that will calculate the rectangle that a text string

View File

@ -94,12 +94,12 @@ public:
return scrollDown(_nPageSize);
}
ErrorCode scrollUp(const int nLines);
ErrorCode scrollUp(int nLines);
ErrorCode scrollDown(const int nLines) {
return scrollUp(-nLines);
}
ErrorCode scrollTo(const int nLine);
ErrorCode scrollTo(int nLine);
ErrorCode display();
ErrorCode erase();

View File

@ -74,7 +74,7 @@ class CBofSound : public CBofError, public CBofObject, public CLList {
public:
friend class MusicPlayer;
CBofSound(CBofWindow *pWnd, const char *pszPathName, uint16 wFlags, const int nLoops = 1);
CBofSound(CBofWindow *pWnd, const char *pszPathName, uint16 wFlags, int nLoops = 1);
virtual ~CBofSound();
bool midiLoopPlaySegment(uint32 LoopBegin, uint32 LoopEnd = 0L, uint32 FirstPassBegin = 0L, uint32 TimeFmt = FMT_MILLISEC);

View File

@ -35,14 +35,14 @@ const uint16 kVildroidFilter = (uint16)4;
const uint16 kZzazzlFilter = (uint16)8;
const uint16 kLightningFilter = (uint16)16;
typedef bool(*FilterFxn)(const uint16, CBofBitmap *, CBofRect *);
typedef bool(*FilterFxn)(uint16, CBofBitmap *, CBofRect *);
void vilInitFilters(CBofBitmap *pBmp);
void triInitFilters(CBofBitmap *pBmp);
void lightningInitFilters();
void destroyFilters();
bool doFilters(const uint16 nFilterId, CBofBitmap *pBmp, CBofRect *pRect);
bool doFilters(uint16 nFilterId, CBofBitmap *pBmp, CBofRect *pRect);
} // namespace SpaceBar
} // namespace Bagel

View File

@ -103,7 +103,7 @@ public:
_nGameMode = mode;
}
ErrorCode setloadFilePos(const CBofPoint dstLoc);
ErrorCode setloadFilePos(CBofPoint dstLoc);
CBagObject *onNewLinkObject(const CBofString &sInit);

View File

@ -42,7 +42,7 @@ public:
virtual void onKeyHit(uint32 lKey, uint32 lRepCount);
void onNewFilter(CBagStorageDev *pSDev, const CBofString &typestr);
void onNewFilter(CBagStorageDev *pSDev, const int nType);
void onNewFilter(CBagStorageDev *pSDev, int nType);
};
} // namespace SpaceBar