[Scummvm-git-logs] scummvm master -> ebf42b4ceb2e6e21a8f40cd1fa1aecd5afd0f0e6
Strangerke
noreply at scummvm.org
Fri May 31 21:44:38 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:
ebf42b4ceb BAGEL: in CBofText, remove unused functions and fix XML doc
Commit: ebf42b4ceb2e6e21a8f40cd1fa1aecd5afd0f0e6
https://github.com/scummvm/scummvm/commit/ebf42b4ceb2e6e21a8f40cd1fa1aecd5afd0f0e6
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-31T22:44:29+01:00
Commit Message:
BAGEL: in CBofText, remove unused functions and fix XML doc
Changed paths:
engines/bagel/boflib/gfx/text.cpp
engines/bagel/boflib/gfx/text.h
diff --git a/engines/bagel/boflib/gfx/text.cpp b/engines/bagel/boflib/gfx/text.cpp
index bf79bee6d52..4b05189ce86 100644
--- a/engines/bagel/boflib/gfx/text.cpp
+++ b/engines/bagel/boflib/gfx/text.cpp
@@ -218,18 +218,6 @@ ErrorCode CBofText::displayShadowed(CBofWindow *pWnd, const char *pszText, const
return displayText(pWnd, pszText, &_cRect, nSize, nWeight, true, nFont);
}
-ErrorCode CBofText::displayShadowed(CBofBitmap *pBmp, const char *pszText, const int nSize, const int nWeight, const RGBCOLOR cColor, const RGBCOLOR cShadow, const int nDX, const int nDY, int nFont) {
- // Can't access null pointers
- assert(pBmp != nullptr);
-
- _cTextColor = cColor;
- _cShadowColor = cShadow;
- _nShadow_DX = nDX;
- _nShadow_DY = nDY;
-
- return displayText(pBmp, pszText, &_cRect, nSize, nWeight, true, nFont);
-}
-
ErrorCode CBofText::displayText(CBofWindow *pWnd, const char *pszText, CBofRect *pRect, const int nSize, const int nWeight, const bool bShadowed, int nFont) {
assert(isValidObject(this));
assert(pWnd != nullptr);
@@ -446,14 +434,6 @@ ErrorCode paintText(CBofBitmap *pBmp, CBofRect *pRect, const char *pszString, co
return cText.displayTextEx(pBmp, pszString, pRect, nSize, nWeight, false, nFont);
}
-ErrorCode paintShadowedText(CBofWindow *pWnd, CBofRect *pRect, const char *pszString, const int nSize, const int nWeight, const RGBCOLOR cColor, int nJustify, uint32 nFormatFlags, int /*nFont*/) {
- assert(pWnd != nullptr);
- assert(pRect != nullptr);
-
- CBofText cText(pRect, nJustify, nFormatFlags);
- return cText.displayShadowed(pWnd, pszString, nSize, nWeight, cColor);
-}
-
ErrorCode paintShadowedText(CBofBitmap *pBmp, CBofRect *pRect, const char *pszString, const int nSize, const int nWeight, const RGBCOLOR cColor, int nJustify, uint32 nFormatFlags, int nFont) {
assert(pBmp != nullptr);
assert(pRect != nullptr);
diff --git a/engines/bagel/boflib/gfx/text.h b/engines/bagel/boflib/gfx/text.h
index ce94a2d8618..4042402be89 100644
--- a/engines/bagel/boflib/gfx/text.h
+++ b/engines/bagel/boflib/gfx/text.h
@@ -135,6 +135,7 @@ public:
* the caller to ensure that the text fits (excess is cropped).
* @param pRect Rectangular area encompassed by the text object
* @param nJustify Alignment of text in the rectangle
+ * @param nFormatFlags Format flag
*/
ErrorCode setupText(const CBofRect *pRect, int nJustify = JUSTIFY_CENTER, uint32 nFormatFlags = FORMAT_DEFAULT);
ErrorCode setupTextOpt(const CBofRect *pRect, int nJustify = JUSTIFY_CENTER, uint32 nFormatFlags = FORMAT_DEFAULT);
@@ -208,6 +209,7 @@ public:
* @param nSize Point size of the text to be used
* @param nWeight Weighting of the font (FW_ identifier)
* @param cColor Color that the text will be
+ * @param nFont Font used (default or mono)
* @return Error return Code
*/
ErrorCode display(CBofWindow *pWnd, const char *pszText, int nSize, int nWeight, RGBCOLOR cColor = CTEXT_COLOR, int nFont = FONT_DEFAULT);
@@ -219,6 +221,7 @@ public:
* @param nSize Point size of the text to be used
* @param nWeight Weighting of the font (FW_ identifier)
* @param cColor Color that the text will be
+ * @param nFont Font used (default or mono)
* @return Error return Code
*/
ErrorCode display(CBofBitmap *pBmp, const char *pszText, int nSize, int nWeight, RGBCOLOR cColor = CTEXT_COLOR, int nFont = FONT_DEFAULT);
@@ -237,18 +240,7 @@ public:
int nWeight, RGBCOLOR cColor, RGBCOLOR cShadow = CTEXT_SHADOW_COLOR,
int nDX = CTEXT_SHADOW_DX, int nDY = CTEXT_SHADOW_DY, int n = FONT_DEFAULT);
- /**
- * Display a shadowed text string into the current text area
- * @param pBmp Bitmap to paint into
- * @param pszText Point to text string to be displayed
- * @param nSize Point size of the text to be used
- * @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
- * @return Error return Code
- */
- ErrorCode displayShadowed(CBofBitmap *, const char *, const int, const int, const RGBCOLOR cColor, const RGBCOLOR cShadow = CTEXT_SHADOW_COLOR, const int nDX = CTEXT_SHADOW_DX, const int nDY = CTEXT_SHADOW_DY, int n = FONT_DEFAULT);
-
+
void flushBackground() {
_bSaved = false;
}
@@ -264,6 +256,7 @@ public:
* @param nSize Point size of the text to be used
* @param nWeight Weighting of the font (FW_ identifier)
* @param bShadowed Whether the text is shadowed
+ * @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);
@@ -284,6 +277,7 @@ private:
* @param nSize Point size of the text to be used
* @param nWeight Weighting of the font (FW_ identifier)
* @param bShadowed Whether the text is shadowed
+ * @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);
@@ -308,8 +302,8 @@ protected:
int _nJustify; // positioning within the rectangle
int _nShadow_DX; // horizontal offset for shadow
int _nShadow_DY; // vertical offset for shadow
- uint32 _nFormatFlags; // multi line formatting flags
- bool _bMultiLine; // mutli vs single line formatting
+ uint32 _nFormatFlags; // multi line formatting flags
+ bool _bMultiLine; // multi vs single line formatting
bool _bSaved;
static Graphics::Font *_defaultFonts[NUM_POINT_SIZES];
@@ -326,7 +320,6 @@ protected:
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 paintShadowedText(CBofWindow *, 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 *, const int nSize, const int nWeight, const RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 n = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
/**
More information about the Scummvm-git-logs
mailing list