[Scummvm-git-logs] scummvm master -> f717664059efe133384c22ccc6035daaaea9c477
bluegr
noreply at scummvm.org
Sat Sep 6 22:14:18 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
f717664059 BAGEL: LPCSTR/LPCTSTR -> const char *, LPSTR/NPSTR -> char *
Commit: f717664059efe133384c22ccc6035daaaea9c477
https://github.com/scummvm/scummvm/commit/f717664059efe133384c22ccc6035daaaea9c477
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2025-09-07T01:13:41+03:00
Commit Message:
BAGEL: LPCSTR/LPCTSTR -> const char *, LPSTR/NPSTR -> char *
Changed paths:
engines/bagel/boflib/sound.h
engines/bagel/hodjnpodj/archeroids/main.cpp
engines/bagel/hodjnpodj/archeroids/main.h
engines/bagel/hodjnpodj/dfa/dfa.cpp
engines/bagel/hodjnpodj/dfa/dfa.h
engines/bagel/hodjnpodj/fuge/fuge.cpp
engines/bagel/hodjnpodj/fuge/fuge.h
engines/bagel/hodjnpodj/hnplibs/button.cpp
engines/bagel/hodjnpodj/hnplibs/button.h
engines/bagel/hodjnpodj/hnplibs/dibapi.cpp
engines/bagel/hodjnpodj/hnplibs/dibapi.h
engines/bagel/hodjnpodj/hnplibs/rules.cpp
engines/bagel/hodjnpodj/hnplibs/sprite.cpp
engines/bagel/hodjnpodj/hnplibs/text.cpp
engines/bagel/hodjnpodj/mankala/mnk.cpp
engines/bagel/hodjnpodj/mankala/mnklog.cpp
engines/bagel/hodjnpodj/mankala/mnkui.cpp
engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
engines/bagel/hodjnpodj/metagame/bgen/bdbg.cpp
engines/bagel/hodjnpodj/metagame/bgen/bdbg.h
engines/bagel/hodjnpodj/metagame/bgen/bgen.h
engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
engines/bagel/hodjnpodj/metagame/bgen/item.cpp
engines/bagel/hodjnpodj/metagame/bgen/mgstat.h
engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
engines/bagel/hodjnpodj/metagame/frame/movytmpl.cpp
engines/bagel/hodjnpodj/metagame/frame/movytmpl.h
engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
engines/bagel/hodjnpodj/metagame/gtl/gtl.cpp
engines/bagel/hodjnpodj/metagame/gtl/gtl.h
engines/bagel/hodjnpodj/metagame/gtl/gtlcpl.cpp
engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
engines/bagel/hodjnpodj/metagame/gtl/gtldoc.h
engines/bagel/hodjnpodj/metagame/gtl/gtllex.cpp
engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
engines/bagel/hodjnpodj/metagame/gtl/rules.cpp
engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
engines/bagel/hodjnpodj/novacancy/main.cpp
engines/bagel/hodjnpodj/poker/poker.cpp
engines/bagel/hodjnpodj/wordsearch/wordlist.cpp
engines/bagel/hodjnpodj/wordsearch/wordsearch.cpp
engines/bagel/mfc/afxmsg.h
engines/bagel/mfc/afxstr.h
engines/bagel/mfc/afxwin.h
engines/bagel/mfc/atltime.h
engines/bagel/mfc/button.cpp
engines/bagel/mfc/dc.cpp
engines/bagel/mfc/dialog.cpp
engines/bagel/mfc/document.cpp
engines/bagel/mfc/font.cpp
engines/bagel/mfc/frame_wnd.cpp
engines/bagel/mfc/gfx/cursor.h
engines/bagel/mfc/gfx/dialog_template.cpp
engines/bagel/mfc/gfx/dialog_template.h
engines/bagel/mfc/global_functions.cpp
engines/bagel/mfc/global_functions.h
engines/bagel/mfc/libs/resources.cpp
engines/bagel/mfc/libs/resources.h
engines/bagel/mfc/menu.cpp
engines/bagel/mfc/minwindef.h
engines/bagel/mfc/single_doc_template.cpp
engines/bagel/mfc/win_app.cpp
engines/bagel/mfc/wingdi.cpp
engines/bagel/mfc/wingdi.h
engines/bagel/mfc/winnt.h
engines/bagel/mfc/wnd.cpp
diff --git a/engines/bagel/boflib/sound.h b/engines/bagel/boflib/sound.h
index b0021cb2ff3..9df74e4b2ab 100644
--- a/engines/bagel/boflib/sound.h
+++ b/engines/bagel/boflib/sound.h
@@ -87,7 +87,7 @@ public:
initialize(nullptr, pszPathName, wFlags);
}
void initialize(void *pWnd, const char *pszPathName, WORD wFlags);
- void setDrivePath(LPCSTR path) {}
+ void setDrivePath(const char *path) {}
bool midiLoopPlaySegment(uint32 LoopBegin, uint32 LoopEnd = 0L, uint32 FirstPassBegin = 0L, uint32 TimeFmt = FMT_MILLISEC);
bool play(uint32 StartOfPlay = 0L, uint32 TimeFmtFlag = FMT_MILLISEC);
bool pause();
diff --git a/engines/bagel/hodjnpodj/archeroids/main.cpp b/engines/bagel/hodjnpodj/archeroids/main.cpp
index a4c608a5577..dbd03662e18 100644
--- a/engines/bagel/hodjnpodj/archeroids/main.cpp
+++ b/engines/bagel/hodjnpodj/archeroids/main.cpp
@@ -819,7 +819,7 @@ ERROR_CODE CMainWindow::LoadMasterSounds(void) {
if ((m_hBadDieRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pBadDieSound = (LPSTR)LockResource((HGLOBAL)m_hBadDieRes)) != nullptr) {
+ if ((m_pBadDieSound = (char *)LockResource((HGLOBAL)m_hBadDieRes)) != nullptr) {
// we have now loaded at least one of the master sounds
@@ -841,7 +841,7 @@ ERROR_CODE CMainWindow::LoadMasterSounds(void) {
if ((m_hBoltRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pBoltSound = (LPSTR)LockResource((HGLOBAL)m_hBoltRes)) == nullptr)
+ if ((m_pBoltSound = (char *)LockResource((HGLOBAL)m_hBoltRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
@@ -859,7 +859,7 @@ ERROR_CODE CMainWindow::LoadMasterSounds(void) {
if ((m_hArrowRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pArrowSound = (LPSTR)LockResource((HGLOBAL)m_hArrowRes)) == nullptr)
+ if ((m_pArrowSound = (char *)LockResource((HGLOBAL)m_hArrowRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
@@ -877,7 +877,7 @@ ERROR_CODE CMainWindow::LoadMasterSounds(void) {
if ((m_hBurnRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pBurnSound = (LPSTR)LockResource((HGLOBAL)m_hBurnRes)) == nullptr)
+ if ((m_pBurnSound = (char *)LockResource((HGLOBAL)m_hBurnRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
@@ -895,7 +895,7 @@ ERROR_CODE CMainWindow::LoadMasterSounds(void) {
if ((m_hExtraLifeRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pExtraLifeSound = (LPSTR)LockResource((HGLOBAL)m_hExtraLifeRes)) == nullptr)
+ if ((m_pExtraLifeSound = (char *)LockResource((HGLOBAL)m_hExtraLifeRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
diff --git a/engines/bagel/hodjnpodj/archeroids/main.h b/engines/bagel/hodjnpodj/archeroids/main.h
index b1088cb87f1..62106094114 100644
--- a/engines/bagel/hodjnpodj/archeroids/main.h
+++ b/engines/bagel/hodjnpodj/archeroids/main.h
@@ -123,11 +123,11 @@ protected:
CLList *m_pFXList;
CSound *m_pSoundTrack;
- LPSTR m_pBadDieSound;
- LPSTR m_pBoltSound;
- LPSTR m_pArrowSound;
- LPSTR m_pBurnSound;
- LPSTR m_pExtraLifeSound;
+ char * m_pBadDieSound;
+ char * m_pBoltSound;
+ char * m_pArrowSound;
+ char * m_pBurnSound;
+ char * m_pExtraLifeSound;
HANDLE m_hBadDieRes;
HANDLE m_hBoltRes;
HANDLE m_hArrowRes;
diff --git a/engines/bagel/hodjnpodj/dfa/dfa.cpp b/engines/bagel/hodjnpodj/dfa/dfa.cpp
index a1b971e06b3..39007927d81 100644
--- a/engines/bagel/hodjnpodj/dfa/dfa.cpp
+++ b/engines/bagel/hodjnpodj/dfa/dfa.cpp
@@ -1223,7 +1223,7 @@ BOOL CMainDFAWindow::LoadBeaverSounds(void) {
//
if ((hResInfo = FindResource(hInst, aHitFile[i], "WAVE")) != nullptr) {
if ((m_hHitRes[i] = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pHitSound[i] = (LPSTR)LockResource((HGLOBAL)m_hHitRes[i])) != nullptr) {
+ if ((m_pHitSound[i] = (char *)LockResource((HGLOBAL)m_hHitRes[i])) != nullptr) {
// we have now loaded at least one of the master sounds
} else bSuccess = FALSE;
} else bSuccess = FALSE;
@@ -1235,7 +1235,7 @@ BOOL CMainDFAWindow::LoadBeaverSounds(void) {
//
if ((hResInfo = FindResource(hInst, aMissFile[i], "WAVE")) != nullptr) {
if ((m_hMissRes[i] = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pMissSound[i] = (LPSTR)LockResource((HGLOBAL)m_hMissRes[i])) != nullptr) {
+ if ((m_pMissSound[i] = (char *)LockResource((HGLOBAL)m_hMissRes[i])) != nullptr) {
// we have now loaded at least one of the master sounds
} else bSuccess = FALSE;
} else bSuccess = FALSE;
diff --git a/engines/bagel/hodjnpodj/dfa/dfa.h b/engines/bagel/hodjnpodj/dfa/dfa.h
index 8153df600f7..b51eb689caa 100644
--- a/engines/bagel/hodjnpodj/dfa/dfa.h
+++ b/engines/bagel/hodjnpodj/dfa/dfa.h
@@ -168,9 +168,9 @@ protected:
//
// Sound as resource dudes:
//
- LPSTR m_pHitSound[NUM_HIT_SOUNDS];
+ char * m_pHitSound[NUM_HIT_SOUNDS];
HANDLE m_hHitRes[NUM_HIT_SOUNDS];
- LPSTR m_pMissSound[NUM_MISS_SOUNDS];
+ char * m_pMissSound[NUM_MISS_SOUNDS];
HANDLE m_hMissRes[NUM_MISS_SOUNDS];
//{{AFX_MSG( CMainPackRatWindow )
diff --git a/engines/bagel/hodjnpodj/fuge/fuge.cpp b/engines/bagel/hodjnpodj/fuge/fuge.cpp
index 3732f028180..7873bc19b5e 100644
--- a/engines/bagel/hodjnpodj/fuge/fuge.cpp
+++ b/engines/bagel/hodjnpodj/fuge/fuge.cpp
@@ -927,7 +927,7 @@ ERROR_CODE CFugeWindow::LoadMasterSounds(void) {
if ((m_hBrickRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pBrickSound = (LPSTR)LockResource((HGLOBAL)m_hBrickRes)) != nullptr) {
+ if ((m_pBrickSound = (char *)LockResource((HGLOBAL)m_hBrickRes)) != nullptr) {
// we have now loaded at least one of the master sounds
@@ -949,7 +949,7 @@ ERROR_CODE CFugeWindow::LoadMasterSounds(void) {
if ((m_hWallRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pWallSound = (LPSTR)LockResource((HGLOBAL)m_hWallRes)) == nullptr)
+ if ((m_pWallSound = (char *)LockResource((HGLOBAL)m_hWallRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
@@ -967,7 +967,7 @@ ERROR_CODE CFugeWindow::LoadMasterSounds(void) {
if ((m_hPaddleRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pPaddleSound = (LPSTR)LockResource((HGLOBAL)m_hPaddleRes)) == nullptr)
+ if ((m_pPaddleSound = (char *)LockResource((HGLOBAL)m_hPaddleRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
@@ -985,7 +985,7 @@ ERROR_CODE CFugeWindow::LoadMasterSounds(void) {
if ((m_hExtraLifeRes = LoadResource(hInst, (HRSRC)hResInfo)) != nullptr) {
- if ((m_pExtraLifeSound = (LPSTR)LockResource((HGLOBAL)m_hExtraLifeRes)) == nullptr)
+ if ((m_pExtraLifeSound = (char *)LockResource((HGLOBAL)m_hExtraLifeRes)) == nullptr)
errCode = ERR_UNKNOWN;
} else {
errCode = ERR_UNKNOWN;
diff --git a/engines/bagel/hodjnpodj/fuge/fuge.h b/engines/bagel/hodjnpodj/fuge/fuge.h
index 74d62055e52..29997c94c64 100644
--- a/engines/bagel/hodjnpodj/fuge/fuge.h
+++ b/engines/bagel/hodjnpodj/fuge/fuge.h
@@ -107,10 +107,10 @@ protected:
CSprite *m_pPaddle;
CSound *m_pSoundTrack;
- LPSTR m_pBrickSound;
- LPSTR m_pWallSound;
- LPSTR m_pPaddleSound;
- LPSTR m_pExtraLifeSound;
+ char * m_pBrickSound;
+ char * m_pWallSound;
+ char * m_pPaddleSound;
+ char * m_pExtraLifeSound;
HANDLE m_hBrickRes;
HANDLE m_hWallRes;
HANDLE m_hPaddleRes;
diff --git a/engines/bagel/hodjnpodj/hnplibs/button.cpp b/engines/bagel/hodjnpodj/hnplibs/button.cpp
index b963257650d..bb0a880ce7f 100644
--- a/engines/bagel/hodjnpodj/hnplibs/button.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/button.cpp
@@ -367,10 +367,10 @@ BOOL CBmpButton::LoadBitmaps(const int nBase, const int nSelected, const int nFo
* LoadBitmaps()
*
* Parameters:
- * LPCSTR lpszBase pointer to resource name string for UP state
- * LPCSTR lpszSelected pointer to resource name string for SELECTED state
- * LPCSTR lpszFocus pointer to resource name string for FOCUS state
- * LPCSTR lpszDisabled pointer to resource name string for DISABLED state
+ * const char *lpszBase pointer to resource name string for UP state
+ * const char *lpszSelected pointer to resource name string for SELECTED state
+ * const char *lpszFocus pointer to resource name string for FOCUS state
+ * const char *lpszDisabled pointer to resource name string for DISABLED state
*
* Return Value:
* BOOL success / failure condition
@@ -379,7 +379,7 @@ BOOL CBmpButton::LoadBitmaps(const int nBase, const int nSelected, const int nFo
*
************************************************************************/
-BOOL CBmpButton::LoadBitmaps(LPCSTR lpszBase, LPCSTR lpszSelected, LPCSTR lpszFocus, LPCSTR lpszDisabled) {
+BOOL CBmpButton::LoadBitmaps(const char *lpszBase, const char *lpszSelected, const char *lpszFocus, const char *lpszDisabled) {
CDC *pDC = nullptr;
CBitmap *pBitmap = nullptr;
HBITMAP hBitmap = nullptr;
@@ -456,10 +456,10 @@ BOOL CBmpButton::LoadBitmaps(LPCSTR lpszBase, LPCSTR lpszSelected, LPCSTR lpszFo
* LoadBmpBitmaps()
*
* Parameters:
- * LPCSTR lpszBase pointer to .BMP path string for UP state
- * LPCSTR lpszSelected pointer to .BMP path string for SELECTED state
- * LPCSTR lpszFocus pointer to .BMP path string for FOCUS state
- * LPCSTR lpszDisabled pointer to .BMP path string for DISABLED state
+ * const char *lpszBase pointer to .BMP path string for UP state
+ * const char *lpszSelected pointer to .BMP path string for SELECTED state
+ * const char *lpszFocus pointer to .BMP path string for FOCUS state
+ * const char *lpszDisabled pointer to .BMP path string for DISABLED state
*
* Return Value:
* BOOL success / failure condition
@@ -468,7 +468,7 @@ BOOL CBmpButton::LoadBitmaps(LPCSTR lpszBase, LPCSTR lpszSelected, LPCSTR lpszFo
*
************************************************************************/
-BOOL CBmpButton::LoadBmpBitmaps(LPCSTR lpszBase, LPCSTR lpszSelected, LPCSTR lpszFocus, LPCSTR lpszDisabled) {
+BOOL CBmpButton::LoadBmpBitmaps(const char *lpszBase, const char *lpszSelected, const char *lpszFocus, const char *lpszDisabled) {
CDC *pDC = nullptr;
CBitmap *pBitmap = nullptr;
HBITMAP hBitmap = nullptr;
@@ -892,7 +892,7 @@ void CColorButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) {
!(*pParentWnd).IsWindowVisible())
return;
- nMyTextLength = GetWindowText((LPSTR) &chMyText, 127);
+ nMyTextLength = GetWindowText((char *) &chMyText, 127);
chMyText[nMyTextLength] = '\0'; // fetch the button label and strip
for (i = 0, j = 0; i <= nMyTextLength; i++) { // ... out any apersand characters
if (chMyText[i] == '&') // ... which are used to force underscoring
@@ -962,15 +962,15 @@ void CColorButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) {
(*pDC).SetBkMode(TRANSPARENT); // make the text overlay transparently
oldTextColor = (*pDC).SetTextColor(myTextColor); // set the color of the text
- (*pDC).TextOut(x, y, (LPCSTR) &chMyText, nMyTextLength);
+ (*pDC).TextOut(x, y, (const char *) &chMyText, nMyTextLength);
if (nUnderscore >= 0) {
underscoreInfo = (*pDC).GetTextExtent(chMyText, nUnderscore);
dx = x + underscoreInfo.cx;
letterInfo = (*pDC).GetTextExtent(&chMyText[nUnderscore], 1);
- underscoreInfo = (*pDC).GetTextExtent((LPCSTR) "_", 1);
+ underscoreInfo = (*pDC).GetTextExtent((const char *) "_", 1);
dx += (letterInfo.cx - underscoreInfo.cx) >> 1;
- (*pDC).TextOut(dx, y, (LPCSTR) "_", 1);
+ (*pDC).TextOut(dx, y, (const char *) "_", 1);
}
(void)(*pDC).SetTextColor(oldTextColor); // set the color of the text
@@ -1180,7 +1180,7 @@ void CCheckButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) {
!(*pParentWnd).IsWindowVisible())
return;
- nMyTextLength = GetWindowText((LPSTR) &chMyText, 127);
+ nMyTextLength = GetWindowText((char *) &chMyText, 127);
chMyText[nMyTextLength] = '\0'; // fetch the button label and strip
for (i = 0, j = 0; i <= nMyTextLength; i++) { // ... out any apersand characters
if (chMyText[i] == '&') // ... which are used to force underscoring
@@ -1254,15 +1254,15 @@ void CCheckButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) {
(*pDC).SetBkMode(TRANSPARENT); // make the text overlay transparently
oldTextColor = (*pDC).SetTextColor(myTextColor); // set the color of the text
- (*pDC).TextOut(x, y, (LPCSTR) &chMyText, nMyTextLength);
+ (*pDC).TextOut(x, y, (const char *) &chMyText, nMyTextLength);
if (nUnderscore >= 0) { // put the underscore where it belongs
underscoreInfo = (*pDC).GetTextExtent(chMyText, nUnderscore);
dx = x + underscoreInfo.cx;
letterInfo = (*pDC).GetTextExtent(&chMyText[nUnderscore], 1);
- underscoreInfo = (*pDC).GetTextExtent((LPCSTR) "_", 1);
+ underscoreInfo = (*pDC).GetTextExtent((const char *) "_", 1);
dx += (letterInfo.cx - underscoreInfo.cx) >> 1;
- (*pDC).TextOut(dx, y, (LPCSTR) "_", 1);
+ (*pDC).TextOut(dx, y, (const char *) "_", 1);
}
(void)(*pDC).SetTextColor(oldTextColor);
@@ -1526,7 +1526,7 @@ void CRadioButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) {
!(*pParentWnd).IsWindowVisible())
return;
- nMyTextLength = GetWindowText((LPSTR) &chMyText, 127);
+ nMyTextLength = GetWindowText((char *) &chMyText, 127);
chMyText[nMyTextLength] = '\0'; // fetch the button label and strip
for (i = 0, j = 0; i <= nMyTextLength; i++) { // ... out any apersand characters
if (chMyText[i] == '&') // ... which are used to force underscoring
@@ -1603,15 +1603,15 @@ void CRadioButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) {
(*pDC).SetBkMode(TRANSPARENT); // make the text overlay transparently
oldTextColor = (*pDC).SetTextColor(myTextColor); // set the color of the text
- (*pDC).TextOut(x, y, (LPCSTR) &chMyText, nMyTextLength);
+ (*pDC).TextOut(x, y, (const char *) &chMyText, nMyTextLength);
if (nUnderscore >= 0) { // put the underscore where it belongs
underscoreInfo = (*pDC).GetTextExtent(chMyText, nUnderscore);
dx = x + underscoreInfo.cx;
letterInfo = (*pDC).GetTextExtent(&chMyText[nUnderscore], 1);
- underscoreInfo = (*pDC).GetTextExtent((LPCSTR) "_", 1);
+ underscoreInfo = (*pDC).GetTextExtent((const char *) "_", 1);
dx += (letterInfo.cx - underscoreInfo.cx) >> 1;
- (*pDC).TextOut(dx, y, (LPCSTR) "_", 1);
+ (*pDC).TextOut(dx, y, (const char *) "_", 1);
}
(void)(*pDC).SetTextColor(oldTextColor);
diff --git a/engines/bagel/hodjnpodj/hnplibs/button.h b/engines/bagel/hodjnpodj/hnplibs/button.h
index 24ae287936a..00af92a0b71 100644
--- a/engines/bagel/hodjnpodj/hnplibs/button.h
+++ b/engines/bagel/hodjnpodj/hnplibs/button.h
@@ -79,9 +79,9 @@ public:
BOOL AutoLoad(UINT nID, CWnd * pParent);
BOOL LoadBitmaps(CPalette *pPalette, CBitmap *pBase, CBitmap *pSelected, CBitmap *pFocus, CBitmap *pDisabled);
- BOOL LoadBitmaps(LPCSTR lpszBase, LPCSTR lpszSelected = nullptr, LPCSTR lpszFocus = nullptr, LPCSTR lpszDisabled = nullptr);
+ BOOL LoadBitmaps(const char *lpszBase, const char *lpszSelected = nullptr, const char *lpszFocus = nullptr, const char *lpszDisabled = nullptr);
BOOL LoadBitmaps(const int nBase, const int nSelected = 0, const int nFocus = 0, const int nDisabled = 0);
- BOOL LoadBmpBitmaps(LPCSTR lpszBase, LPCSTR lpszSelected = nullptr, LPCSTR lpszFocus = nullptr, LPCSTR lpszDisabled = nullptr);
+ BOOL LoadBmpBitmaps(const char *lpszBase, const char *lpszSelected = nullptr, const char *lpszFocus = nullptr, const char *lpszDisabled = nullptr);
private:
CPalette *m_pPalette;
diff --git a/engines/bagel/hodjnpodj/hnplibs/dibapi.cpp b/engines/bagel/hodjnpodj/hnplibs/dibapi.cpp
index 2ef4dff9ccf..6893933e11c 100644
--- a/engines/bagel/hodjnpodj/hnplibs/dibapi.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/dibapi.cpp
@@ -266,8 +266,8 @@ CPalette *DuplicatePalette(CPalette *pOrigPal) {
return pPal;
}
-LPSTR FindDIBBits(HDIB hDIB) {
- return (LPSTR)hDIB->getPixels();
+char *FindDIBBits(HDIB hDIB) {
+ return (char *)hDIB->getPixels();
}
uint32 DIBWidth(HDIB hDIB) {
diff --git a/engines/bagel/hodjnpodj/hnplibs/dibapi.h b/engines/bagel/hodjnpodj/hnplibs/dibapi.h
index d51a6f14cd0..f35717284ce 100644
--- a/engines/bagel/hodjnpodj/hnplibs/dibapi.h
+++ b/engines/bagel/hodjnpodj/hnplibs/dibapi.h
@@ -71,7 +71,7 @@ extern BOOL CreateDIBPalette(HDIB hDIB, CPalette *cPal);
* @param hDIB Pointer to packed-DIB memory block
* @return Pointer to the DIB bits
*/
-extern LPSTR FindDIBBits(HDIB lpbi);
+extern char *FindDIBBits(HDIB lpbi);
/**
* This function gets the width of the bitmap.
diff --git a/engines/bagel/hodjnpodj/hnplibs/rules.cpp b/engines/bagel/hodjnpodj/hnplibs/rules.cpp
index 2cce5428694..69ad285ae34 100644
--- a/engines/bagel/hodjnpodj/hnplibs/rules.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/rules.cpp
@@ -974,8 +974,8 @@ crop_byte:
}
n += 1;
}
-// (*pDC).TextOut(x,y,(LPCSTR) &chInBuf[i],n);
- (*pDC).TabbedTextOut(x, y, (LPCSTR) &chInBuf[i], n, 1, &tabstop, 0);
+// (*pDC).TextOut(x,y,(const char *) &chInBuf[i],n);
+ (*pDC).TabbedTextOut(x, y, (const char *) &chInBuf[i], n, 1, &tabstop, 0);
if (chInBuf[i + n] == '\r')
i += 2;
else if (chInBuf[i + n] == TEXT_NEWLINE)
diff --git a/engines/bagel/hodjnpodj/hnplibs/sprite.cpp b/engines/bagel/hodjnpodj/hnplibs/sprite.cpp
index 69e6135e03f..4c5a97caf61 100644
--- a/engines/bagel/hodjnpodj/hnplibs/sprite.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/sprite.cpp
@@ -446,7 +446,7 @@ BOOL CSprite::DuplicateSprite(CDC *pDC, CSprite *pSprite) {
* CDC *pDC pointer to device context to be used in creating
* a compatible context for the sprite's bitmap
*
- * char * pszPathName pointer to text string with the fully qualified file
+ * char *pszPathName pointer to text string with the fully qualified file
* specification for the DIB bitmap file
*
* Return Value:
@@ -708,7 +708,7 @@ BOOL CSprite::LoadResourceSprite(CDC *pDC, const char *pszName) {
* Parameters:
* CDC *pDC pointer to device context to be used in creating
* a compatible context for the sprite's cel bitmap
- * char * pszPathName pointer to text string with the fully qualified file
+ * char *pszPathName pointer to text string with the fully qualified file
* specification for the DIB bitmap file
* int nCels number of cels in strip
*
diff --git a/engines/bagel/hodjnpodj/hnplibs/text.cpp b/engines/bagel/hodjnpodj/hnplibs/text.cpp
index 7c5b64d7154..0569bd789a1 100644
--- a/engines/bagel/hodjnpodj/hnplibs/text.cpp
+++ b/engines/bagel/hodjnpodj/hnplibs/text.cpp
@@ -403,7 +403,7 @@ BOOL CText::DisplayText(CDC *pDC, const char *pszText, const int nSize, const in
(*m_pWorkDC).TabbedTextOut( // zap the shadow to the work area
m_cPosition.x + m_nShadow_DX,
m_cPosition.y + m_nShadow_DY,
- (LPCSTR)pszText,
+ (const char *)pszText,
strlen(pszText),
1, &m_nTabStop, 0);
}
@@ -412,7 +412,7 @@ BOOL CText::DisplayText(CDC *pDC, const char *pszText, const int nSize, const in
(*m_pWorkDC).TabbedTextOut( // zap the text to the work area
m_cPosition.x,
m_cPosition.y,
- (LPCSTR)pszText,
+ (const char *)pszText,
strlen(pszText),
1, &m_nTabStop, 0);
diff --git a/engines/bagel/hodjnpodj/mankala/mnk.cpp b/engines/bagel/hodjnpodj/mankala/mnk.cpp
index 300c332654f..aee0b6ef67f 100644
--- a/engines/bagel/hodjnpodj/mankala/mnk.cpp
+++ b/engines/bagel/hodjnpodj/mankala/mnk.cpp
@@ -517,7 +517,7 @@ void CMnkWindow::OnMouseMove(UINT nFlags, CPoint point) {
CDC *pDC;
CRect crctPitBounds, crctTxt;
HLOCAL hlocShells;
- NPSTR npszShells;
+ char *npszShells;
CBmpObject *pcBmpObject;
/*
@@ -538,7 +538,7 @@ void CMnkWindow::OnMouseMove(UINT nFlags, CPoint point) {
if ((pDC = GetDC())) {
if ((hlocShells = MFC::LocalAlloc(GHND, 16))) {
- npszShells = (NPSTR)MFC::LocalLock(hlocShells);
+ npszShells = (char *)MFC::LocalLock(hlocShells);
Common::sprintf_s(npszShells, 16, "%2d shell%c", m_cCurrentMove.m_iNumStones[iPlayer][iPit + 2], (m_cCurrentMove.m_iNumStones[iPlayer][iPit + 2] > 1) ? 's' : 0x0);
if (m_pText) {
@@ -901,7 +901,7 @@ void CMnkWindow::OnClose() {
CBrush Brush;
CDC *pDC = nullptr;
CRect rctTmp;
- NPSTR npszTmp;
+ char *npszTmp;
HLOCAL hlocTmp;
int level;
@@ -917,7 +917,7 @@ void CMnkWindow::OnClose() {
}
hlocTmp = MFC::LocalAlloc(LHND, 16);
- npszTmp = (NPSTR)MFC::LocalLock(hlocTmp);
+ npszTmp = (char *)MFC::LocalLock(hlocTmp);
Common::sprintf_s(npszTmp, 16, "%d", m_iStartStones);
WritePrivateProfileString("Mankala", "StartStones", npszTmp, INI_FILENAME);
diff --git a/engines/bagel/hodjnpodj/mankala/mnklog.cpp b/engines/bagel/hodjnpodj/mankala/mnklog.cpp
index bb28e26c7ab..b516b24b250 100644
--- a/engines/bagel/hodjnpodj/mankala/mnklog.cpp
+++ b/engines/bagel/hodjnpodj/mankala/mnklog.cpp
@@ -1857,11 +1857,11 @@ cleanup:
//
// if (lIndex == THRESHHOLD)
// {
-// _fmemcpy(cBuffer, (LPSTR)m_lpCMnkData->m_hpcBestWin, BUFSIZE) ;
+// _fmemcpy(cBuffer, (char *)m_lpCMnkData->m_hpcBestWin, BUFSIZE) ;
// DumpBestWinTable() ;
// }
///// else if (lIndex >= 104856 // error detected at 104858
-// else if (_fmemcmp(cBuffer, (LPSTR)m_lpCMnkData->m_hpcBestWin,
+// else if (_fmemcmp(cBuffer, (char *)m_lpCMnkData->m_hpcBestWin,
// BUFSIZE)) // if first BUFSIZE bytes changed
// {
// DumpPosition(xpcMove) ;
diff --git a/engines/bagel/hodjnpodj/mankala/mnkui.cpp b/engines/bagel/hodjnpodj/mankala/mnkui.cpp
index b947018505c..2b94691e3c3 100644
--- a/engines/bagel/hodjnpodj/mankala/mnkui.cpp
+++ b/engines/bagel/hodjnpodj/mankala/mnkui.cpp
@@ -777,9 +777,10 @@ BOOL CMnkWindow::SetCrabSign(BOOL bPaint)
// returns: TRUE if error, FALSE otherwise
{
JXENTER(CMnkWindow::SetCrabSign) ;
- int iError = 0 ; // error code
- int iBmpSign ; // SBT_xxxx -- sign to display
- NPSTR npszHumanScore, npszCrabScore;
+ int iError = 0; // error code
+ int iBmpSign; // SBT_xxxx -- sign to display
+ char *npszHumanScore;
+ char *npszCrabScore;
HLOCAL hlocHumanScore, hlocCrabScore;
if (m_bStartGame) {
@@ -854,8 +855,8 @@ BOOL CMnkWindow::SetCrabSign(BOOL bPaint)
hlocCrabScore = LocalAlloc(LHND, 32);
if (hlocHumanScore && hlocCrabScore) {
- npszHumanScore = (NPSTR)LocalLock(hlocHumanScore);
- npszCrabScore = (NPSTR)LocalLock(hlocCrabScore);
+ npszHumanScore = (char *)LocalLock(hlocHumanScore);
+ npszCrabScore = (char *)LocalLock(hlocCrabScore);
Common::sprintf_s(npszHumanScore, 32, "Your Score: %d shell%c", m_cCurrentMove.m_iNumStones[0][HOMEINDEX + 2], (m_cCurrentMove.m_iNumStones[0][HOMEINDEX + 2] > 1) ? 's' : 0);
Common::sprintf_s(npszCrabScore, 32, "My Score: %d shell%c", m_cCurrentMove.m_iNumStones[1][HOMEINDEX + 2], (m_cCurrentMove.m_iNumStones[1][HOMEINDEX + 2] > 1) ? 's' : 0);
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp b/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
index ab784df9dbf..996c1e5de71 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/backpack.cpp
@@ -501,7 +501,7 @@ void CBackpack::UpdateItem(CDC *pDC, CItem *pItem, int nX, int nY) {
(*pDC).TextOut( // zap the text to the work area
nX,
nY,
- (LPCSTR)chBuffer,
+ (const char *)chBuffer,
strlen(chBuffer));
(void)(*pDC).SelectObject(pFontOld); // map out the font
}
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/bdbg.cpp b/engines/bagel/hodjnpodj/metagame/bgen/bdbg.cpp
index 09a17b089d4..801fdb0f904 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/bdbg.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/bdbg.cpp
@@ -65,14 +65,14 @@ CBdbgMgr::~CBdbgMgr(void)
//* CBdbgMgr::DebugInit -- Initialize
-BOOL CBdbgMgr::DebugInit(LPCSTR lpszIniFilename, LPCSTR lpszIniSectionname)
+BOOL CBdbgMgr::DebugInit(const char *lpszIniFilename, const char *lpszIniSectionname)
// returns: TRUE if error, FALSE otherwise
{
return FALSE;
}
//* CBdbgMgr::GetDebugInt -- get debugging integer
-int CBdbgMgr::GetDebugInt(LPCSTR lpszOption, int iDefault)
+int CBdbgMgr::GetDebugInt(const char *lpszOption, int iDefault)
// lpszOption -- option name string
// iDefault -- default value
// returns: debugging integer value
@@ -83,7 +83,7 @@ int CBdbgMgr::GetDebugInt(LPCSTR lpszOption, int iDefault)
//* CBdbgMgr::GetDebugString --
-BOOL CBdbgMgr::GetDebugString(LPCSTR lpszOption, LPSTR lpszTarget, int iTargetSize, LPCSTR lpszDefault)
+BOOL CBdbgMgr::GetDebugString(const char *lpszOption, char *lpszTarget, int iTargetSize, const char *lpszDefault)
// lpszOption -- option name string
// lpszDefault -- default value; if nullptr, then default is null string
// returns: TRUE if error, FALSE otherwise
@@ -92,7 +92,7 @@ BOOL CBdbgMgr::GetDebugString(LPCSTR lpszOption, LPSTR lpszTarget, int iTargetSi
}
//* CBdbgMgr::TraceConstructor -- trace object constructor, if optioned
-BOOL CBdbgMgr::TraceConstructor(LPCSTR lpszName, void *lpLoc)
+BOOL CBdbgMgr::TraceConstructor(const char *lpszName, void *lpLoc)
// lpszName -- name of object
// lpLoc -- location of object
// returns: TRUE if error, FALSE otherwise
@@ -101,7 +101,7 @@ BOOL CBdbgMgr::TraceConstructor(LPCSTR lpszName, void *lpLoc)
}
//* CBdbgMgr::TraceDestructor -- trace object destructor, if optioned
-BOOL CBdbgMgr::TraceDestructor(LPCSTR lpszName, void *lpLoc)
+BOOL CBdbgMgr::TraceDestructor(const char *lpszName, void *lpLoc)
// lpszName -- name of object
// lpLoc -- location of object
// returns: TRUE if error, FALSE otherwise
@@ -110,7 +110,7 @@ BOOL CBdbgMgr::TraceDestructor(LPCSTR lpszName, void *lpLoc)
}
//* CBdbgMgr::DebugMessageBox --
-BOOL CBdbgMgr::DebugMessageBox(LPCSTR lpszPrompt, UINT nType, UINT nIDPrompt)
+BOOL CBdbgMgr::DebugMessageBox(const char *lpszPrompt, UINT nType, UINT nIDPrompt)
// lpszPrompt -- message string, starting with '~'
// nType, nIDPrompt -- integer Common::sprintf_s substitutions
// returns: TRUE if error, FALSE otherwise
@@ -119,7 +119,7 @@ BOOL CBdbgMgr::DebugMessageBox(LPCSTR lpszPrompt, UINT nType, UINT nIDPrompt)
}
//* CBdbgMgr::AddTraceObject -- add object to trace list
-BOOL CBdbgMgr::AddTraceObject(LPCSTR lpszName, void *lpPtr)
+BOOL CBdbgMgr::AddTraceObject(const char *lpszName, void *lpPtr)
// lpszName -- name of object
// lpPtr -- pointer to object
// returns: TRUE if error, FALSE otherwise
@@ -128,7 +128,7 @@ BOOL CBdbgMgr::AddTraceObject(LPCSTR lpszName, void *lpPtr)
}
//* CBdbgMgr::TestTraceObject -- test
-BOOL CBdbgMgr::TestTraceObject(LPCSTR lpszName, void *lpPtr, BOOL bMissing)
+BOOL CBdbgMgr::TestTraceObject(const char *lpszName, void *lpPtr, BOOL bMissing)
// lpszName -- name of object
// lpPtr -- pointer to object
// bMissing -- if TRUE, then correct if pointer is missing;
@@ -140,7 +140,7 @@ BOOL CBdbgMgr::TestTraceObject(LPCSTR lpszName, void *lpPtr, BOOL bMissing)
}
//* CBdbgMgr::RemoveTraceObject -- add object to trace list
-BOOL CBdbgMgr::RemoveTraceObject(LPCSTR lpszName, void *lpPtr)
+BOOL CBdbgMgr::RemoveTraceObject(const char *lpszName, void *lpPtr)
// lpszName -- name of object
// lpPtr -- pointer to object
// returns: TRUE if error, FALSE otherwise
@@ -160,13 +160,13 @@ BOOL CBdbgMgr::ReportTraceObjects(void)
//* CBdbgMgr::OutputWithTime -- output debugging string with time
// lpszPattern -- Common::sprintf_s string containing %s for time substitution
// returns: TRUE if error, FALSE otherwise
-BOOL CBdbgMgr::OutputWithTime(LPCSTR lpszPattern) {
+BOOL CBdbgMgr::OutputWithTime(const char *lpszPattern) {
return FALSE;
}
//* CBdbgMgr::OutputWithWordWrap -- output debugging string with time
-BOOL CBdbgMgr::OutputWithWordWrap(LPCSTR lpStr1, LPCSTR lpStr2, int iIndent)
+BOOL CBdbgMgr::OutputWithWordWrap(const char *lpStr1, const char *lpStr2, int iIndent)
// lpStr1, lpStr2 -- strings to be concatenated and outputted, with
// the second one (only) processed for word wrap
// iIndent -- # blanks to indent after first line
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/bdbg.h b/engines/bagel/hodjnpodj/metagame/bgen/bdbg.h
index 77cbd496114..1ad0d1331c6 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/bdbg.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/bdbg.h
@@ -63,25 +63,25 @@ public:
CBdbgMgr(void) ;
~CBdbgMgr(void) ;
- BOOL DebugInit(LPCSTR lpszIniFilename,
- LPCSTR lpszIniSectionname) ;
- int GetDebugInt(LPCSTR lpszOption,
+ BOOL DebugInit(const char *lpszIniFilename,
+ const char *lpszIniSectionname) ;
+ int GetDebugInt(const char *lpszOption,
int iDefault PDFT(0)) ;
- BOOL GetDebugString(LPCSTR lpszOption,
- LPSTR lpszTarget, int iTargetSize,
- LPCSTR lpszDefault PDFT(nullptr)) ;
- BOOL TraceConstructor(LPCSTR lpszName, void *lpLoc) ;
- BOOL TraceDestructor(LPCSTR lpszName, void *lpLoc) ;
- BOOL DebugMessageBox(LPCSTR lpszPrompt,
+ BOOL GetDebugString(const char *lpszOption,
+ char *lpszTarget, int iTargetSize,
+ const char *lpszDefault PDFT(nullptr)) ;
+ BOOL TraceConstructor(const char *lpszName, void *lpLoc) ;
+ BOOL TraceDestructor(const char *lpszName, void *lpLoc) ;
+ BOOL DebugMessageBox(const char *lpszPrompt,
UINT nType, UINT nIDPrompt) ;
- BOOL AddTraceObject(LPCSTR lpszName, void *lpPtr) ;
- BOOL TestTraceObject(LPCSTR lpszName, void *lpPtr,
+ BOOL AddTraceObject(const char *lpszName, void *lpPtr) ;
+ BOOL TestTraceObject(const char *lpszName, void *lpPtr,
BOOL bMissing PDFT(FALSE)) ;
- BOOL RemoveTraceObject(LPCSTR lpszName, void *lpPtr) ;
+ BOOL RemoveTraceObject(const char *lpszName, void *lpPtr) ;
BOOL ReportTraceObjects(void) ;
- STATIC BOOL OutputWithTime(LPCSTR lpszPattern) ;
- STATIC BOOL OutputWithWordWrap(LPCSTR lpStr1,
- LPCSTR lpStr2, int iIndent) ;
+ STATIC BOOL OutputWithTime(const char *lpszPattern) ;
+ STATIC BOOL OutputWithWordWrap(const char *lpStr1,
+ const char *lpStr2, int iIndent) ;
} ;
#ifndef JXENTER
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/bgen.h b/engines/bagel/hodjnpodj/metagame/bgen/bgen.h
index 608a8627b7b..d82c92d82e5 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/bgen.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/bgen.h
@@ -44,8 +44,6 @@ namespace Metagame {
typedef int BOOL ;
typedef char *XPSTR ;
typedef char *XPSTR;
-typedef char *LPSTR ;
-typedef LPSTR *LPLPSTR ;
typedef int *XPINT ;
typedef char *XPCHAR ;
typedef void *XPVOID ;
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h b/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
index c1c571248b9..23c8b46bd68 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/bsutl.h
@@ -137,7 +137,7 @@ public:
//- GetInfo -- get information about scroll set
BOOL GetInfo(CBsuInfo *xpBsuInfo);
//- DumpInfo -- dump information about scroll set
- BOOL DumpInfo(LPSTR lpStart PDFT(nullptr));
+ BOOL DumpInfo(char *lpStart PDFT(nullptr));
};
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/item.cpp b/engines/bagel/hodjnpodj/metagame/bgen/item.cpp
index c8ab613cc5f..aa2bc42d37b 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/item.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/item.cpp
@@ -282,7 +282,7 @@ CItem::~CItem() {
* int nID; item identifier
*
* Return Value:
- * LPSTR pointer to item's descriptive text
+ * char * pointer to item's descriptive text
*
* Description: return a pointer to the descriptive text for an item.
*
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/mgstat.h b/engines/bagel/hodjnpodj/metagame/bgen/mgstat.h
index 058b4eadf60..7dc0d857b20 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/mgstat.h
+++ b/engines/bagel/hodjnpodj/metagame/bgen/mgstat.h
@@ -443,16 +443,16 @@ public:
int m_iLocCode ; // MG_LOC_xxxx
int m_iFunctionCode ; // MG_GAME_xxxx or MG_VISIT_xxxx
int m_iCost ; // Amount of money for MG_VISIT_INFO
- LPCSTR m_lpszLabel ; // node label for location
- LPCSTR m_lpszName ; // full name of location
+ const char *m_lpszLabel ; // node label for location
+ const char *m_lpszName ; // full name of location
} ;
// CSectorTable
class CSectorTable {
public:
int m_iSectorCode ; // MG_SECTOR_xxxx
- LPCSTR m_lpszLabel ; // node label for sector
- LPCSTR m_lpszName ; // full name of sector
+ const char *m_lpszLabel ; // node label for sector
+ const char *m_lpszName ; // full name of sector
} ;
// CGameTable
@@ -462,9 +462,9 @@ class CGameTable {
public:
int m_iGameCode; // MG_GAME_xxxx
int m_iWinCode; // MG_WIN_xxxx (win money, object, info)
- LPCSTR m_lpszGameName; // full name of game
- LPCSTR _path; // game subfolder path
- LPCSTR _dllName; // dll filename
+ const char *m_lpszGameName; // full name of game
+ const char *_path; // game subfolder path
+ const char *_dllName; // dll filename
FPDLLFUNCT _initFn;
} ;
@@ -473,8 +473,8 @@ class CNoteTable {
public:
int m_iCode ; // game or location code
int m_iCost ; // cost of information
- LPSTR m_lpszWavFile ; // sound file
- LPSTR m_lpszText ; // text of message
+ char *m_lpszWavFile ; // sound file
+ char *m_lpszText ; // text of message
} ;
// CClueTable
diff --git a/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp b/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
index fa6d007773b..b3218e1e0cb 100644
--- a/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
+++ b/engines/bagel/hodjnpodj/metagame/bgen/notebook.cpp
@@ -530,7 +530,7 @@ void CNotebook::UpdateContent(CDC *pDC) {
NOTE_TEXT_DX + NOTE_TEXT_DDX,
NOTE_TEXT_DY + NOTE_TEXT_DDY);
(*pDC).DrawText( // zap the text to the work area
- (LPCSTR)(*pNote).GetDescription(),
+ (const char *)(*pNote).GetDescription(),
-1,
&myRect,
DT_CENTER | DT_WORDBREAK);
diff --git a/engines/bagel/hodjnpodj/metagame/frame/movytmpl.cpp b/engines/bagel/hodjnpodj/metagame/frame/movytmpl.cpp
index 44e9008eb8b..da40c0ab429 100644
--- a/engines/bagel/hodjnpodj/metagame/frame/movytmpl.cpp
+++ b/engines/bagel/hodjnpodj/metagame/frame/movytmpl.cpp
@@ -42,7 +42,7 @@ namespace Frame {
static BOOL bPaintScroll;
BOOL CMovieWindow::BlowWindow(CWnd *pParent, BOOL bScroll,
- LPCSTR AviMovee, int x, int y, int w, int h) {
+ const char *AviMovee, int x, int y, int w, int h) {
m_pParent = pParent;
bPaintScroll = bScroll;
diff --git a/engines/bagel/hodjnpodj/metagame/frame/movytmpl.h b/engines/bagel/hodjnpodj/metagame/frame/movytmpl.h
index e4ab048cde7..de86d7f5815 100644
--- a/engines/bagel/hodjnpodj/metagame/frame/movytmpl.h
+++ b/engines/bagel/hodjnpodj/metagame/frame/movytmpl.h
@@ -51,7 +51,7 @@ public:
* @param h Height
* @return True if movie's playable, else FALSE.
*/
- BOOL BlowWindow(CWnd *pParentWnd, BOOL bScroll, LPCSTR lpszAviMovie,
+ BOOL BlowWindow(CWnd *pParentWnd, BOOL bScroll, const char *lpszAviMovie,
int x = 0, int y = 0, int w = MOVIE_WIDTH, int h = MOVIE_HEIGHT);
protected:
@@ -63,7 +63,7 @@ protected:
CRect MovieRect;
CWnd *m_pParent = nullptr;
- LPCSTR lpszAviMovie = nullptr; // The name of movie.
+ const char *lpszAviMovie = nullptr; // The name of movie.
public:
int nMovieId = -1;
diff --git a/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp b/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
index 29246bf72a5..4d0e1374f56 100644
--- a/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
+++ b/engines/bagel/hodjnpodj/metagame/grand_tour/grand_tour.cpp
@@ -117,7 +117,7 @@ int anGameValues[18] = { // set the game values to return
MG_GAME_THGESNGGME, MG_GAME_WORDSEARCH
};
-static LPCSTR aszGames[18] = { // set the display names for when the cursor passes over a game rect
+static const char *aszGames[18] = { // set the display names for when the cursor passes over a game rect
"Archeroids", "Art Parts", "Barbershop Quintet", "Battlefish", "Beacon", "Cryptograms",
"Dam Furry Animals", "Fuge", "Garfunkel", "Life", "Mankala", "Maze O' Doom",
"No Vacancy", "Pack-Rat", "Peggleboz", "Riddles", "TH GESNG GAM", "Word Search"
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtl.cpp b/engines/bagel/hodjnpodj/metagame/gtl/gtl.cpp
index 6d3b0839187..25e2bb40544 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtl.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtl.cpp
@@ -178,7 +178,7 @@ BOOL CGtlApp::CallOnFileSave(void)
//* CGtlApp::DoMessageBox -- override of CWinApp function to
// display message box messages
-int CGtlApp::DoMessageBox(LPCSTR lpszPrompt, UINT nType, UINT nIDPrompt)
+int CGtlApp::DoMessageBox(const char *lpszPrompt, UINT nType, UINT nIDPrompt)
// returns: TRUE if error, FALSE otherwise
{
JXENTER(CGtlApp::DoMessageBox) ;
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtl.h b/engines/bagel/hodjnpodj/metagame/gtl/gtl.h
index b759e0c4a95..f5a7f65d8e4 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtl.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtl.h
@@ -83,7 +83,7 @@ public:
BOOL CallOnFileSave(void) ;
//- DoMessageBox -- override of CWinApp function to
// display message box messages
- virtual int DoMessageBox(LPCSTR lpszPrompt,
+ virtual int DoMessageBox(const char *lpszPrompt,
UINT nType, UINT nIDPrompt) ;
BOOL OnIdle(long lCount) override;
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtlcpl.cpp b/engines/bagel/hodjnpodj/metagame/gtl/gtlcpl.cpp
index e2510488345..dfd6e8d790e 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtlcpl.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtlcpl.cpp
@@ -481,7 +481,7 @@ CLexElement *CGtlData::ParseInteger(CLexElement * xpLxel, int iPrevType, int FAR
//* CGtlData::ParseString -- parse string, store into node structure
// Note: Accepts identifier as well as string
-CLexElement *CGtlData::ParseString(CLexElement * xpLxel, int iPrevType, LPSTR lpszValue, XPINT xpiValue)
+CLexElement *CGtlData::ParseString(CLexElement * xpLxel, int iPrevType, char *lpszValue, XPINT xpiValue)
// xpLxel -- pointer to previous lexeme
// iPrevType -- type of previous lexeme
// lpszValue -- where string is to be stored, or nullptr if not stored
@@ -539,7 +539,7 @@ cleanup:
//* CGtlData::GetLabel -- get bitmap or node label
-BOOL CGtlData::GetLabel(LPSTR lpszLabel, BOOL bNode, int FAR& iIndex)
+BOOL CGtlData::GetLabel(char *lpszLabel, BOOL bNode, int FAR& iIndex)
// lpszLabel -- pointer to label string for bitmap/node being sought
// bNode -- FALSE for bitmaps, TRUE for nodes
// iIndex -- output: index of bitmap or node for label
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h b/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
index 9ac052ac954..9361f73c6ee 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtldat.h
@@ -164,7 +164,7 @@ class CLexElement {
class CKeyTab {
public:
int m_iKeyValue ; // keyword value
- LPCSTR m_xpszKeyString ; // string
+ const char *m_xpszKeyString ; // string
} ;
// CMap -- bit map
@@ -440,7 +440,7 @@ public:
// gtldcp.cpp -- decompiler for meta game
//- Decompile -- output data to .GTL file
- int Decompile(const char * xpszPathName) ;
+ int Decompile(const char *xpszPathName) ;
//- AsciiOutput -- ascii output
int AsciiOutput(int iIndent, XPSTR lpszOut) ;
//- ListingOutput -- listing output
@@ -464,12 +464,12 @@ public:
//- ParseString -- parse string, store into node structure
// Note: Accepts identifier as well as string
CLexElement *ParseString(CLexElement * xpLxel,
- int iPrevType, LPSTR lpszValue, XPINT xpiValue) ;
+ int iPrevType, char *lpszValue, XPINT xpiValue) ;
//- GetLabel -- get bitmap or node label
BOOL GetLabel(CLexElement * xpLxel,
BOOL bNode, int FAR& iIndex) ;
//- GetLabel -- get bitmap or node label
- BOOL GetLabel(LPSTR lpszLabel,
+ BOOL GetLabel(char *lpszLabel,
BOOL bNode, int FAR& iIndex) ;
private:
@@ -482,11 +482,11 @@ private:
// gtllex -- lexical analysis for graphics utility
//- FindKeyword -- find keyword, given tree node type
- LPCSTR FindKeyword(int iType) ;
+ const char *FindKeyword(int iType) ;
//- ReadLine -- read input line
BOOL ReadLine(void) ;
//- ErrorMsg -- publish error message
- BOOL ErrorMsg(CLexElement * xpLxel, LPCSTR szMessage) ;
+ BOOL ErrorMsg(CLexElement * xpLxel, const char *szMessage) ;
// gtlui.cpp -- data interface to Windows
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtldoc.h b/engines/bagel/hodjnpodj/metagame/gtl/gtldoc.h
index 5b176f1b60e..5b9008ecf28 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtldoc.h
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtldoc.h
@@ -71,7 +71,7 @@ public:
void DeleteContents() override;
protected:
//- InitDocument -- initialize document to specified file
- void InitDocument(const char * xpszPathName);
+ void InitDocument(const char *xpszPathName);
virtual BOOL OnOpenDocument(const char* xpszPathName) override;
virtual BOOL OnSaveDocument(const char* xpszPathName);
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/gtllex.cpp b/engines/bagel/hodjnpodj/metagame/gtl/gtllex.cpp
index 3d426b002f7..d739a5f105a 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/gtllex.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/gtllex.cpp
@@ -68,7 +68,7 @@ static const CKeyTab st_cKytbs[] = {
} ;
//* CGtlData::FindKeyword -- find keyword, given tree node type
-LPCSTR CGtlData::FindKeyword(int iType)
+const char *CGtlData::FindKeyword(int iType)
// iType -- KT_xxxx -- tree node type
// returns: string pointer to keyword, or to "????"
{
@@ -248,7 +248,7 @@ cleanup:
//* CGtlData::ErrorMsg -- publish error message
-BOOL CGtlData::ErrorMsg(CLexElement * xpLxel, LPCSTR szMessage)
+BOOL CGtlData::ErrorMsg(CLexElement * xpLxel, const char *szMessage)
// returns: TRUE if error, FALSE otherwise
{
int iError = 0 ; // error code
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp b/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
index 0329d77b439..370ccba4bd5 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/pawn.cpp
@@ -516,7 +516,7 @@ void CPawnShop::UpdateItem(CDC *pDC, CItem *pItem, int nX, int nY) {
(*pDC).TextOut( // zap the text to the work area
nX,
nY,
- (LPCSTR) chBuffer,
+ (const char *) chBuffer,
strlen(chBuffer));
(void)(*pDC).SelectObject(pFontOld); // map out the font
}
diff --git a/engines/bagel/hodjnpodj/metagame/gtl/rules.cpp b/engines/bagel/hodjnpodj/metagame/gtl/rules.cpp
index 3e052f79dca..26fdd329ff8 100644
--- a/engines/bagel/hodjnpodj/metagame/gtl/rules.cpp
+++ b/engines/bagel/hodjnpodj/metagame/gtl/rules.cpp
@@ -990,8 +990,8 @@ crop_byte:
}
n += 1;
}
-// (*pDC).TextOut(x,y,(LPCSTR) &chInBuf[i],n);
- (*pDC).TabbedTextOut(x, y, (LPCSTR) &chInBuf[i], n, 1, &tabstop, 0);
+// (*pDC).TextOut(x,y,(const char *) &chInBuf[i],n);
+ (*pDC).TabbedTextOut(x, y, (const char *) &chInBuf[i], n, 1, &tabstop, 0);
if (chInBuf[i + n] == '\r')
i += 2;
else if (chInBuf[i + n] == TEXT_NEWLINE)
diff --git a/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp b/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
index 12c8e7f88e1..29a1a7995f2 100644
--- a/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
+++ b/engines/bagel/hodjnpodj/metagame/zoom/zoommap.cpp
@@ -86,7 +86,7 @@ const int16 anGameValues[21] = {
-1
};
-static const LPCSTR astrGames[21] = { // set the display names for when the cursor passes over a game rect
+static const char *astrGames[21] = { // set the display names for when the cursor passes over a game rect
"Click Here To Play Archeroids",
"Click Here To Play Art Parts",
"Click Here To Play Barbershop Quintet",
diff --git a/engines/bagel/hodjnpodj/novacancy/main.cpp b/engines/bagel/hodjnpodj/novacancy/main.cpp
index 882574ce2ae..27587837a62 100644
--- a/engines/bagel/hodjnpodj/novacancy/main.cpp
+++ b/engines/bagel/hodjnpodj/novacancy/main.cpp
@@ -675,7 +675,7 @@ void CMainWindow::OnLButtonDown(UINT nFlags, CPoint point) {
CSprite* pBottleSprite,
*pCatSprite;
HLOCAL hlocScore;
- NPSTR npszScore; //to display score in case of SA mode
+ char *npszScore; //to display score in case of SA mode
const int iMaxScore = 45; //1+2+3+4+5+6+7+8+9 to be used for score computation.
ERROR_CODE errCode = ERR_NONE;
@@ -861,7 +861,7 @@ void CMainWindow::OnLButtonDown(UINT nFlags, CPoint point) {
*/
//if(!pGameParams->bPlayingMetagame){
if ((hlocScore = LocalAlloc(LHND, 32)) != nullptr) {
- npszScore = (NPSTR)LocalLock(hlocScore);
+ npszScore = (char *)LocalLock(hlocScore);
Common::sprintf_s(npszScore, 32, "%lu point%c out of 45.", iMaxScore - pGameParams->lScore, ((iMaxScore - pGameParams->lScore) == 1) ? ' ' : 's'); //imaxScore is 45.
CMessageBox(this, m_pGamePalette, "Your score is", npszScore);
LocalUnlock(hlocScore);
@@ -875,18 +875,18 @@ void CMainWindow::OnLButtonDown(UINT nFlags, CPoint point) {
case 1:
case 2:
- NPSTR npszInfo;
+ char *npszInfo;
HLOCAL hInfo;
if ((hInfo = LocalAlloc(LHND, 32)) == nullptr)
error("TODO: Memory alloc");
- npszInfo = (NPSTR)LocalLock(hInfo);
+ npszInfo = (char *)LocalLock(hInfo);
Common::sprintf_s(npszInfo, 32, "Only %d throw%c left.", (3 - m_cUnDoableThrows), (m_cUnDoableThrows == 1) ? 's' : ' ');
GamePause();
sndPlaySound(GetStringFromResource(IDS_SORRY), SND_ASYNC);
- CMessageBox(this, m_pGamePalette, "Undoable throw!", npszInfo ? (LPSTR)npszInfo : "");
+ CMessageBox(this, m_pGamePalette, "Undoable throw!", npszInfo ? (char *)npszInfo : "");
LocalUnlock(hInfo);
LocalFree(hInfo);
diff --git a/engines/bagel/hodjnpodj/poker/poker.cpp b/engines/bagel/hodjnpodj/poker/poker.cpp
index 5b1f8518268..6e511873662 100644
--- a/engines/bagel/hodjnpodj/poker/poker.cpp
+++ b/engines/bagel/hodjnpodj/poker/poker.cpp
@@ -113,7 +113,7 @@ CBmpButton *pDrawButton = nullptr; // Button for drawing cards not hel
static CSound *pGameSound = nullptr; // Game theme song
-static LPCSTR sBitmaps[53] = {
+static const char *sBitmaps[53] = {
"ART\\PKR1.BMP",
"ART\\PKR2.BMP",
"ART\\PKR3.BMP",
@@ -673,11 +673,11 @@ void CMainPokerWindow::SplashScreen() {
ptxtBetDisplay = new CText;
// create the display strings for the bet and user amount
- Common::sprintf_s((LPSTR)cBet, 10, "%li", m_lUserBet);
- Common::sprintf_s((LPSTR)cUser, 10, "%li", m_lUserAmount);
+ Common::sprintf_s((char *)cBet, 10, "%li", m_lUserBet);
+ Common::sprintf_s((char *)cUser, 10, "%li", m_lUserAmount);
j = 0;
- for (nCharIndex = strlen((LPSTR)cUser) - 1, nDisplayIndex = nCharIndex + (nCharIndex / 3), nCounter1 = 1;
+ for (nCharIndex = strlen((char *)cUser) - 1, nDisplayIndex = nCharIndex + (nCharIndex / 3), nCounter1 = 1;
nCharIndex >= 0;
nCharIndex--, nDisplayIndex--, nCounter1++) {
@@ -689,13 +689,13 @@ void CMainPokerWindow::SplashScreen() {
cUserDisplay[nDisplayIndex] = cUser[nCharIndex];
}
}
- nDisplayIndex = strlen((LPSTR)cUser);
+ nDisplayIndex = strlen((char *)cUser);
cUserDisplay[nDisplayIndex + j] = 0;
ptxtUserDisplay->SetupText(pDC, pGamePalette, &rectDisplayUser, JUSTIFY_CENTER);
ptxtUserDisplay->DisplayString(pDC, cUserDisplay, 16, FW_BOLD, (COLORREF)RGB(0, 0, 255));
- for (nCharIndex = strlen((LPSTR)cBet) - 1, nDisplayIndex = nCharIndex + (nCharIndex / 3), nCounter1 = 1;
+ for (nCharIndex = strlen((char *)cBet) - 1, nDisplayIndex = nCharIndex + (nCharIndex / 3), nCounter1 = 1;
nCharIndex >= 0;
nCharIndex--, nDisplayIndex--, nCounter1++) {
@@ -706,7 +706,7 @@ void CMainPokerWindow::SplashScreen() {
cBetDisplay[nDisplayIndex] = cBet[nCharIndex];
}
}
- nDisplayIndex = strlen((LPSTR)cBet);
+ nDisplayIndex = strlen((char *)cBet);
cBetDisplay[nDisplayIndex + (nDisplayIndex / 4)] = 0;
ptxtBetDisplay->SetupText(pDC, pGamePalette, &rectDisplayBet, JUSTIFY_CENTER);
diff --git a/engines/bagel/hodjnpodj/wordsearch/wordlist.cpp b/engines/bagel/hodjnpodj/wordsearch/wordlist.cpp
index 89716578b75..23b744ac35f 100644
--- a/engines/bagel/hodjnpodj/wordsearch/wordlist.cpp
+++ b/engines/bagel/hodjnpodj/wordsearch/wordlist.cpp
@@ -25,7 +25,7 @@ namespace Bagel {
namespace HodjNPodj {
namespace WordSearch {
-LPCSTR astrWLCat[NUMBEROFLISTS] = {
+const char *astrWLCat[NUMBEROFLISTS] = {
"Parts of an Airplane", //0
"Animals",
"Baseball Terms",
diff --git a/engines/bagel/hodjnpodj/wordsearch/wordsearch.cpp b/engines/bagel/hodjnpodj/wordsearch/wordsearch.cpp
index 902287c31f4..6ac66c16349 100644
--- a/engines/bagel/hodjnpodj/wordsearch/wordsearch.cpp
+++ b/engines/bagel/hodjnpodj/wordsearch/wordsearch.cpp
@@ -79,7 +79,7 @@ char acAlpha[26] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', '
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
};
-extern LPCSTR astrWLCat[NUMBEROFLISTS];
+extern const char *astrWLCat[NUMBEROFLISTS];
extern char acList[NUMBEROFLISTS][WORDSPERLIST][20];
/*****************************************************************
diff --git a/engines/bagel/mfc/afxmsg.h b/engines/bagel/mfc/afxmsg.h
index df1ac61057b..35034453251 100644
--- a/engines/bagel/mfc/afxmsg.h
+++ b/engines/bagel/mfc/afxmsg.h
@@ -409,7 +409,7 @@ namespace MFC {
#define ON_WM_SETTEXT() \
{ WM_SETTEXT, 0, 0, 0, AfxSig_i_v_S, \
(AFX_PMSG) (AFX_PMSGW) \
- (static_cast< int (AFX_MSG_CALL CWnd::*)(LPCTSTR) > ( &ThisClass::OnSetText)) },
+ (static_cast< int (AFX_MSG_CALL CWnd::*)(const char *) > ( &ThisClass::OnSetText)) },
#define ON_WM_GETTEXT() \
{ WM_GETTEXT, 0, 0, 0, AfxSig_i_i_s, \
@@ -519,12 +519,12 @@ namespace MFC {
#define ON_WM_SETTINGCHANGE() \
{ WM_SETTINGCHANGE, 0, 0, 0, AfxSig_vws, \
(AFX_PMSG)(AFX_PMSGW) \
- (static_cast< void (AFX_MSG_CALL CWnd::*)(UINT, LPCTSTR) > ( &ThisClass::OnSettingChange)) },
+ (static_cast< void (AFX_MSG_CALL CWnd::*)(UINT, const char *) > ( &ThisClass::OnSettingChange)) },
#define ON_WM_WININICHANGE() \
{ WM_WININICHANGE, 0, 0, 0, AfxSig_vs, \
(AFX_PMSG)(AFX_PMSGW) \
- (static_cast< void (AFX_MSG_CALL CWnd::*)(LPCTSTR) > ( &ThisClass::OnWinIniChange)) },
+ (static_cast< void (AFX_MSG_CALL CWnd::*)(const char *) > ( &ThisClass::OnWinIniChange)) },
#define ON_WM_DEVMODECHANGE() \
{ WM_DEVMODECHANGE, 0, 0, 0, AfxSig_vs, \
diff --git a/engines/bagel/mfc/afxstr.h b/engines/bagel/mfc/afxstr.h
index 9b1dcec3101..b416618b2d0 100644
--- a/engines/bagel/mfc/afxstr.h
+++ b/engines/bagel/mfc/afxstr.h
@@ -58,7 +58,7 @@ public:
clear();
}
- operator LPCSTR() const {
+ operator const char *() const {
return c_str();
}
diff --git a/engines/bagel/mfc/afxwin.h b/engines/bagel/mfc/afxwin.h
index 66902d9278b..75516a1e736 100644
--- a/engines/bagel/mfc/afxwin.h
+++ b/engines/bagel/mfc/afxwin.h
@@ -79,7 +79,7 @@ public:
BOOL CreateMenu();
BOOL CreatePopupMenu();
- BOOL LoadMenu(LPCTSTR lpszResourceName);
+ BOOL LoadMenu(const char *lpszResourceName);
BOOL LoadMenu(UINT nIDResource);
BOOL LoadMenuIndirect(const void *lpMenuTemplate);
BOOL DestroyMenu();
@@ -141,7 +141,7 @@ enum AfxSig {
AfxSig_SCROLL, // void (UINT, UINT, CWnd*)
AfxSig_SCROLL_REFLECT, // void (UINT, UINT)
AfxSig_v_v_s, // void (LPTSTR)
- AfxSig_v_u_cs, // void (UINT, LPCTSTR)
+ AfxSig_v_u_cs, // void (UINT, const char *)
AfxSig_OWNERDRAW, // void (int, LPTSTR) force return TRUE
AfxSig_i_i_s, // int (int, LPTSTR)
AfxSig_u_v_p, // UINT (CPoint)
@@ -182,7 +182,7 @@ enum AfxSig {
AfxSig_v_u_hkl, // void (UINT, HKL)
AfxSig_INPUTDEVICECHANGE, // void (unsigned short, HANDLE)
AfxSig_l_D_u, // LRESULT (CDC*, UINT)
- AfxSig_i_v_S, // int (LPCTSTR)
+ AfxSig_i_v_S, // int (const char *)
AfxSig_vwpb, // void (HFONT, BOOL)
AfxSig_h_v_v, // HANDLE ()
AfxSig_h_b_h, // HANDLE (BOOL, HANDLE)
@@ -418,7 +418,7 @@ union MessageMapFunctions {
void (AFX_MSG_CALL CWnd:: *pfn_vwp)(UINT, CPoint);
void (AFX_MSG_CALL CWnd:: *pfn_vwwh)(UINT, UINT, HANDLE);
BOOL(AFX_MSG_CALL CWnd:: *pfn_bwsp)(UINT, short, CPoint);
- void (AFX_MSG_CALL CWnd:: *pfn_vws)(UINT, LPCTSTR);
+ void (AFX_MSG_CALL CWnd:: *pfn_vws)(UINT, const char *);
void (AFX_MSG_CALL CWnd:: *pfn_vFb)(HFONT, BOOL);
};
@@ -594,7 +594,7 @@ public:
int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline,
BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision,
BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily,
- LPCSTR lpszFacename);
+ const char *lpszFacename);
BOOL CreateFontIndirect(const LOGFONT *lpLogFont);
};
@@ -775,37 +775,37 @@ public:
COLORREF getBkPixel() const;
int setBkMode(int nBkMode);
COLORREF setTextColor(COLORREF crColor);
- BOOL textOut(int x, int y, LPCSTR lpszString, int nCount,
+ BOOL textOut(int x, int y, const char *lpszString, int nCount,
int nTabPositions = 0, const int *lpnTabStopPositions = nullptr,
int nTabOrigin = 0, CSize *size = nullptr);
BOOL textOut(int x, int y, const CString &str,
int nTabPositions = 0, const int *lpnTabStopPositions = nullptr,
int nTabOrigin = 0, CSize *size = nullptr);
BOOL extTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
- LPCSTR lpszString, UINT nCount, int *lpDxWidths);
+ const char *lpszString, UINT nCount, int *lpDxWidths);
BOOL extTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
const CString &str, int *lpDxWidths);
- CSize tabbedTextOut(int x, int y, LPCSTR lpszString, int nCount,
+ CSize tabbedTextOut(int x, int y, const char *lpszString, int nCount,
int nTabPositions, const int *lpnTabStopPositions, int nTabOrigin);
CSize tabbedTextOut(int x, int y, const CString &str,
int nTabPositions, const int *lpnTabStopPositions, int nTabOrigin);
- int drawText(LPCSTR lpszString, int nCount, LPRECT lpRect, UINT nFormat,
+ int drawText(const char *lpszString, int nCount, LPRECT lpRect, UINT nFormat,
int nTabPositions = 0, const int *lpnTabStopPositions = nullptr,
int nTabOrigin = 0, CSize *size = nullptr);
int drawText(const CString &str, LPRECT lpRect, UINT nFormat,
int nTabPositions = 0, const int *lpnTabStopPositions = nullptr,
int nTabOrigin = 0, CSize *size = nullptr);
- CSize getTextExtent(LPCSTR lpszString, int nCount) const;
+ CSize getTextExtent(const char *lpszString, int nCount) const;
CSize getTextExtent(const CString &str) const;
- CSize getOutputTextExtent(LPCSTR lpszString, int nCount) const;
+ CSize getOutputTextExtent(const char *lpszString, int nCount) const;
CSize getOutputTextExtent(const CString &str) const;
- CSize getTabbedTextExtent(LPCSTR lpszString, int nCount,
+ CSize getTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const;
CSize getTabbedTextExtent(const CString &str,
int nTabPositions, int *lpnTabStopPositions) const;
- CSize getOutputTabbedTextExtent(LPCSTR lpszString, int nCount,
+ CSize getOutputTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const;
CSize getOutputTabbedTextExtent(const CString &str,
int nTabPositions, int *lpnTabStopPositions) const;
@@ -832,8 +832,8 @@ public:
return static_cast<Impl *>(m_hDC);
}
- BOOL CreateDC(LPCSTR lpszDriverName, LPCSTR lpszDeviceName,
- LPCSTR lpszOutput, const void *lpInitData);
+ BOOL CreateDC(const char *lpszDriverName, const char *lpszDeviceName,
+ const char *lpszOutput, const void *lpInitData);
BOOL CreateCompatibleDC(CDC *pDC);
BOOL DeleteDC();
BOOL Attach(HDC hDC);
@@ -928,30 +928,30 @@ public:
// Text Functions
virtual COLORREF SetTextColor(COLORREF crColor);
- virtual BOOL TextOut(int x, int y, LPCSTR lpszString, int nCount);
+ virtual BOOL TextOut(int x, int y, const char *lpszString, int nCount);
BOOL TextOut(int x, int y, const CString &str);
virtual BOOL ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
- LPCSTR lpszString, UINT nCount, int *lpDxWidths);
+ const char *lpszString, UINT nCount, int *lpDxWidths);
BOOL ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
const CString &str, int *lpDxWidths);
- virtual CSize TabbedTextOut(int x, int y, LPCSTR lpszString, int nCount,
+ virtual CSize TabbedTextOut(int x, int y, const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions, int nTabOrigin);
CSize TabbedTextOut(int x, int y, const CString &str,
int nTabPositions, int *lpnTabStopPositions, int nTabOrigin);
- int DrawText(LPCSTR lpszString, int nCount,
+ int DrawText(const char *lpszString, int nCount,
LPRECT lpRect, UINT nFormat);
int DrawText(const CString &str, LPRECT lpRect, UINT nFormat);
- CSize GetTextExtent(LPCSTR lpszString, int nCount) const;
+ CSize GetTextExtent(const char *lpszString, int nCount) const;
CSize GetTextExtent(const CString &str) const;
- CSize GetOutputTextExtent(LPCSTR lpszString, int nCount) const;
+ CSize GetOutputTextExtent(const char *lpszString, int nCount) const;
CSize GetOutputTextExtent(const CString &str) const;
- CSize GetTabbedTextExtent(LPCSTR lpszString, int nCount,
+ CSize GetTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const;
CSize GetTabbedTextExtent(const CString &str,
int nTabPositions, int *lpnTabStopPositions) const;
- CSize GetOutputTabbedTextExtent(LPCSTR lpszString, int nCount,
+ CSize GetOutputTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const;
CSize GetOutputTabbedTextExtent(const CString &str,
int nTabPositions, int *lpnTabStopPositions) const;
@@ -1042,14 +1042,14 @@ public:
CView *GetNextView(POSITION &rPosition) const;
const CString &GetTitle() const;
- virtual void SetTitle(LPCSTR lpszTitle);
+ virtual void SetTitle(const char *lpszTitle);
const CString &GetPathName() const;
- virtual void SetPathName(LPCSTR lpszPathName, BOOL bAddToMRU = TRUE);
+ virtual void SetPathName(const char *lpszPathName, BOOL bAddToMRU = TRUE);
virtual void ClearPathName();
virtual BOOL IsModified();
virtual void SetModifiedFlag(BOOL bModified = TRUE);
- virtual void ReportSaveLoadException(LPCSTR lpszPathName,
+ virtual void ReportSaveLoadException(const char *lpszPathName,
CException *e, BOOL bSaving, UINT nIDPDefault);
bool SaveModified();
@@ -1062,7 +1062,7 @@ public:
virtual BOOL OnNewDocument() {
return true;
}
- virtual BOOL OnOpenDocument(LPCSTR lpszPathName) {
+ virtual BOOL OnOpenDocument(const char *lpszPathName) {
return true;
}
virtual void OnFileSaveAs() {}
@@ -1085,8 +1085,8 @@ typedef struct tagCREATESTRUCTA {
int y = 0;
int x = 0;
long style = 0;
- LPCSTR lpszName = nullptr;
- LPCSTR lpszClass = nullptr;
+ const char * lpszName = nullptr;
+ const char * lpszClass = nullptr;
uint32 dwExStyle = 0;
} CREATESTRUCT, *LPCREATESTRUCT;
@@ -1242,8 +1242,8 @@ protected:
afx_msg void OnSpoolerStatus(UINT nStatus, UINT nJobs) {}
afx_msg void OnSysColorChange() {}
afx_msg void OnTimeChange() {}
- afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection) {}
- afx_msg void OnWinIniChange(LPCTSTR lpszSection) {}
+ afx_msg void OnSettingChange(UINT uFlags, const char *lpszSection) {}
+ afx_msg void OnWinIniChange(const char *lpszSection) {}
afx_msg UINT OnPowerBroadcast(UINT nPowerEvent, LPARAM lEventData) {
return 0;
}
@@ -1354,15 +1354,15 @@ public:
CWnd();
~CWnd() override;
- BOOL Create(LPCSTR lpszClassName, LPCSTR lpszWindowName,
+ BOOL Create(const char *lpszClassName, const char *lpszWindowName,
uint32 dwStyle, const RECT &rect, CWnd *pParentWnd, UINT nID,
CCreateContext *pContext = nullptr);
- BOOL CreateEx(uint32 dwExStyle, LPCTSTR lpszClassName,
- LPCTSTR lpszWindowName, uint32 dwStyle,
+ BOOL CreateEx(uint32 dwExStyle, const char *lpszClassName,
+ const char *lpszWindowName, uint32 dwStyle,
int x, int y, int nWidth, int nHeight,
HWND hWndParent, LPARAM nIDorHMenu, void *lpParam = nullptr);
- BOOL CreateEx(uint32 dwExStyle, LPCSTR lpszClassName,
- LPCSTR lpszWindowName, uint32 dwStyle,
+ BOOL CreateEx(uint32 dwExStyle, const char *lpszClassName,
+ const char *lpszWindowName, uint32 dwStyle,
const RECT &rect, CWnd *pParentWnd, UINT nID,
void *lpParam = nullptr);
@@ -1396,8 +1396,8 @@ public:
void DestroyWindow();
void Invalidate(BOOL bErase = TRUE);
int GetWindowText(CString &rString) const;
- int GetWindowText(LPSTR lpszStringBuf, int nMaxCount) const;
- BOOL SetWindowText(LPCSTR lpszString);
+ int GetWindowText(char *lpszStringBuf, int nMaxCount) const;
+ BOOL SetWindowText(const char *lpszString);
UINT GetState() const;
uint32 GetStyle() const {
return m_nStyle;
@@ -1443,7 +1443,7 @@ public:
CWnd *GetNextDlgGroupItem(CWnd *pWndCtl, BOOL bPrevious = FALSE) const;
BOOL GotoDlgCtrl(CWnd *pWndCtrl);
BOOL SubclassDlgItem(UINT nID, CWnd *pParent);
- BOOL SetDlgItemText(int nIDDlgItem, LPCSTR lpString);
+ BOOL SetDlgItemText(int nIDDlgItem, const char *lpString);
int GetDlgCtrlID() const;
void CheckDlgButton(int nIDButton, UINT nCheck);
LRESULT SendDlgItemMessage(int nID, UINT message,
@@ -1529,15 +1529,15 @@ public:
~CFrameWnd() override {
}
- BOOL Create(LPCSTR lpszClassName,
- LPCSTR lpszWindowName,
+ BOOL Create(const char *lpszClassName,
+ const char *lpszWindowName,
uint32 dwStyle,
const RECT &rect,
CWnd *pParentWnd = nullptr,
- LPCSTR lpszMenuName = nullptr,
+ const char *lpszMenuName = nullptr,
uint32 dwExStyle = 0,
CCreateContext *pContext = nullptr);
- BOOL Create(LPCSTR lpszClassName, LPCSTR lpszWindowName,
+ BOOL Create(const char *lpszClassName, const char *lpszWindowName,
uint32 dwStyle = WS_OVERLAPPEDWINDOW) {
CRect rectDefault;
return Create(lpszClassName, lpszWindowName, dwStyle, rectDefault);
@@ -1561,7 +1561,7 @@ class CDialog : public CWnd {
friend class CDialogTemplate;
private:
- LPCSTR m_lpszTemplateName = nullptr;
+ const char *m_lpszTemplateName = nullptr;
UINT m_nIDHelp = 0;
LPCDLGTEMPLATE m_lpDialogTemplate = nullptr;
HGLOBAL m_hDialogTemplate = 0;
@@ -1590,12 +1590,12 @@ protected:
public:
CDialog() {}
- explicit CDialog(LPCSTR lpszTemplateName,
+ explicit CDialog(const char *lpszTemplateName,
CWnd *pParentWnd = nullptr);
explicit CDialog(UINT nIDTemplate,
CWnd *pParentWnd = nullptr);
~CDialog() override {}
- BOOL Create(LPCSTR lpszTemplateName,
+ BOOL Create(const char *lpszTemplateName,
CWnd *pParentWnd = nullptr);
BOOL Create(UINT nIDTemplate,
CWnd *pParentWnd = nullptr);
@@ -1665,7 +1665,7 @@ protected:
public:
~CButton() override {
}
- CVIRTUAL BOOL Create(LPCTSTR lpszCaption, uint32 dwStyle,
+ CVIRTUAL BOOL Create(const char *lpszCaption, uint32 dwStyle,
const RECT &rect, CWnd *pParentWnd, UINT nID);
int GetCheck() const;
@@ -1838,7 +1838,7 @@ public:
* @param lpszPathName Path name. If null,
* then create new file with this type
*/
- virtual CDocument *OpenDocumentFile(LPCSTR lpszPathName,
+ virtual CDocument *OpenDocumentFile(const char *lpszPathName,
BOOL bMakeVisible = TRUE) = 0;
virtual CDocument *CreateNewDocument();
virtual CFrameWnd *CreateNewFrame(CDocument *pDoc, CFrameWnd *pOther);
@@ -1879,7 +1879,7 @@ public:
* @param lpszPathName Path name. If null,
* then create new file with this type
*/
- CDocument *OpenDocumentFile(LPCSTR lpszPathName,
+ CDocument *OpenDocumentFile(const char *lpszPathName,
BOOL bMakeVisible = TRUE) override;
void AddDocument(CDocument *pDoc) override;
@@ -1966,8 +1966,8 @@ public:
virtual BOOL SaveAllModified();
void SetDialogBkColor();
- HCURSOR LoadStandardCursor(LPCSTR lpszCursorName);
- HCURSOR LoadCursor(LPCSTR lpszResourceName);
+ HCURSOR LoadStandardCursor(const char *lpszCursorName);
+ HCURSOR LoadCursor(const char *lpszResourceName);
HCURSOR LoadCursor(UINT nIDResource);
HCURSOR SetCursor(HCURSOR hCursor);
void BeginWaitCursor();
@@ -1982,14 +1982,14 @@ public:
void AddDocTemplate(CDocTemplate *pTemplate);
void CloseAllDocuments(BOOL bEndSession);
- UINT GetProfileInt(LPCSTR lpszSection,
- LPCSTR lpszEntry, int nDefault);
- void WriteProfileInt(LPCSTR lpszSection,
- LPCSTR lpszEntry, int nValue);
- CString GetProfileString(LPCSTR lpszSection,
- LPCSTR lpszEntry, LPCSTR lpszDefault = nullptr) ;
- BOOL WriteProfileString(LPCSTR lpszSection,
- LPCSTR lpszEntry, LPCSTR lpszValue);
+ UINT GetProfileInt(const char *lpszSection,
+ const char *lpszEntry, int nDefault);
+ void WriteProfileInt(const char *lpszSection,
+ const char *lpszEntry, int nValue);
+ CString GetProfileString(const char *lpszSection,
+ const char *lpszEntry, const char *lpszDefault = nullptr) ;
+ BOOL WriteProfileString(const char *lpszSection,
+ const char *lpszEntry, const char *lpszValue);
virtual void OnFileNew();
@@ -2019,7 +2019,7 @@ public:
void removeResources(const Common::Path &file) {
_resources.removeResources(file);
}
- HRSRC findResource(LPCSTR lpName, LPCSTR lpType);
+ HRSRC findResource(const char *lpName, const char *lpType);
size_t sizeofResource(HRSRC hResInfo);
HGLOBAL loadResource(HRSRC hResInfo);
void *lockResource(HGLOBAL hResData);
@@ -2030,17 +2030,17 @@ public:
}
// Fonts
- int addFontResource(LPCSTR fontName) {
+ int addFontResource(const char *fontName) {
return _fonts.addFontResource(fontName);
}
- bool removeFontResource(LPCSTR fontName) {
+ bool removeFontResource(const char *fontName) {
return _fonts.removeFontResource(fontName);
}
HFONT createFont(int nHeight, int nWidth, int nEscapement,
int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline,
BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision,
BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily,
- LPCSTR lpszFacename) {
+ const char *lpszFacename) {
return _fonts.createFont(nHeight, nWidth,
nEscapement, nOrientation, nWeight, bItalic,
bUnderline, cStrikeOut, nCharSet, nOutPrecision,
@@ -2065,10 +2065,10 @@ public:
return (HPALETTE)_systemPalette.m_hObject;
}
- LPCSTR AfxRegisterWndClass(UINT nClassStyle,
+ const char *AfxRegisterWndClass(UINT nClassStyle,
HCURSOR hCursor, HBRUSH hbrBackground, HICON hIcon);
BOOL GetClassInfo(HINSTANCE hInstance,
- LPCSTR lpClassName, LPWNDCLASS lpWndClass);
+ const char * lpClassName, LPWNDCLASS lpWndClass);
};
extern CWinApp *AfxGetApp();
diff --git a/engines/bagel/mfc/atltime.h b/engines/bagel/mfc/atltime.h
index ac6fcde8419..2b9f40116c1 100644
--- a/engines/bagel/mfc/atltime.h
+++ b/engines/bagel/mfc/atltime.h
@@ -62,7 +62,7 @@ public:
bool operator>=(CTimeSpan span) const;
public:
- CString Format(LPCTSTR pszFormat) const;
+ CString Format(const char *pszFormat) const;
CString Format(UINT nID) const;
private:
@@ -122,8 +122,8 @@ public:
int GetDayOfWeek() const;
// formatting using "C" strftime
- CString Format(LPCTSTR pszFormat) const;
- CString FormatGmt(LPCTSTR pszFormat) const;
+ CString Format(const char *pszFormat) const;
+ CString FormatGmt(const char *pszFormat) const;
CString Format(UINT nFormatID) const;
CString FormatGmt(UINT nFormatID) const;
diff --git a/engines/bagel/mfc/button.cpp b/engines/bagel/mfc/button.cpp
index 582c63b0476..0b9425eb102 100644
--- a/engines/bagel/mfc/button.cpp
+++ b/engines/bagel/mfc/button.cpp
@@ -35,7 +35,7 @@ ON_MESSAGE(BM_CLICK, CButton::OnBnClicked)
ON_MESSAGE(BM_SETCHECK, CButton::OnBnSetCheck)
END_MESSAGE_MAP()
-BOOL CButton::Create(LPCTSTR lpszCaption, uint32 dwStyle,
+BOOL CButton::Create(const char *lpszCaption, uint32 dwStyle,
const RECT &rect, CWnd *pParentWnd, UINT nID) {
return CWnd::Create("BUTTON", lpszCaption, dwStyle, rect,
pParentWnd, nID);
diff --git a/engines/bagel/mfc/dc.cpp b/engines/bagel/mfc/dc.cpp
index a7a53ef1ee1..8a9b2b18e7e 100644
--- a/engines/bagel/mfc/dc.cpp
+++ b/engines/bagel/mfc/dc.cpp
@@ -68,8 +68,8 @@ void CDC::AfxUnhookObject() {
}
}
-BOOL CDC::CreateDC(LPCSTR lpszDriverName, LPCSTR lpszDeviceName,
- LPCSTR lpszOutput, const void *lpInitData) {
+BOOL CDC::CreateDC(const char *lpszDriverName, const char *lpszDeviceName,
+ const char *lpszOutput, const void *lpInitData) {
error("TODO: CDC::CreateDC");
}
@@ -553,7 +553,7 @@ COLORREF CDC::SetTextColor(COLORREF crColor) {
return impl()->setTextColor(crColor);
}
-BOOL CDC::TextOut(int x, int y, LPCSTR lpszString, int nCount) {
+BOOL CDC::TextOut(int x, int y, const char *lpszString, int nCount) {
return impl()->textOut(x, y, lpszString, nCount);
}
@@ -562,7 +562,7 @@ BOOL CDC::TextOut(int x, int y, const CString &str) {
}
BOOL CDC::ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
- LPCSTR lpszString, UINT nCount, int *lpDxWidths) {
+ const char *lpszString, UINT nCount, int *lpDxWidths) {
return impl()->extTextOut(x, y, nOptions, lpRect, lpszString, nCount, lpDxWidths);
}
@@ -571,7 +571,7 @@ BOOL CDC::ExtTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
return impl()->extTextOut(x, y, nOptions, lpRect, str, lpDxWidths);
}
-CSize CDC::TabbedTextOut(int x, int y, LPCSTR lpszString, int nCount,
+CSize CDC::TabbedTextOut(int x, int y, const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions, int nTabOrigin) {
return impl()->tabbedTextOut(x, y, lpszString, nCount,
nTabPositions, lpnTabStopPositions, nTabOrigin);
@@ -583,7 +583,7 @@ CSize CDC::TabbedTextOut(int x, int y, const CString &str,
lpnTabStopPositions, nTabOrigin);
}
-int CDC::DrawText(LPCSTR lpszString, int nCount,
+int CDC::DrawText(const char *lpszString, int nCount,
LPRECT lpRect, UINT nFormat) {
return impl()->drawText(lpszString, nCount, lpRect, nFormat);
}
@@ -592,7 +592,7 @@ int CDC::DrawText(const CString &str, LPRECT lpRect, UINT nFormat) {
return impl()->drawText(str, lpRect, nFormat);
}
-CSize CDC::GetTextExtent(LPCSTR lpszString, int nCount) const {
+CSize CDC::GetTextExtent(const char *lpszString, int nCount) const {
return impl()->getTextExtent(lpszString, nCount);
}
@@ -600,7 +600,7 @@ CSize CDC::GetTextExtent(const CString &str) const {
return impl()->getTextExtent(str);
}
-CSize CDC::GetOutputTextExtent(LPCSTR lpszString, int nCount) const {
+CSize CDC::GetOutputTextExtent(const char *lpszString, int nCount) const {
return impl()->getOutputTextExtent(lpszString, nCount);
}
@@ -608,7 +608,7 @@ CSize CDC::GetOutputTextExtent(const CString &str) const {
return impl()->getOutputTextExtent(str);
}
-CSize CDC::GetTabbedTextExtent(LPCSTR lpszString, int nCount,
+CSize CDC::GetTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const {
return impl()->getTabbedTextExtent(lpszString, nCount,
nTabPositions, lpnTabStopPositions);
@@ -620,7 +620,7 @@ CSize CDC::GetTabbedTextExtent(const CString &str,
lpnTabStopPositions);
}
-CSize CDC::GetOutputTabbedTextExtent(LPCSTR lpszString, int nCount,
+CSize CDC::GetOutputTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const {
return impl()->getOutputTabbedTextExtent(lpszString, nCount,
nTabPositions, lpnTabStopPositions);
@@ -1077,7 +1077,7 @@ COLORREF CDC::Impl::setTextColor(COLORREF crColor) {
return oldColor;
}
-BOOL CDC::Impl::textOut(int x, int y, LPCSTR lpszString, int nCount,
+BOOL CDC::Impl::textOut(int x, int y, const char *lpszString, int nCount,
int nTabPositions, const int *lpnTabStopPositions,
int nTabOrigin, CSize *size) {
Gfx::Surface *dest = getSurface();
@@ -1127,7 +1127,7 @@ BOOL CDC::Impl::textOut(int x, int y, const CString &str,
}
BOOL CDC::Impl::extTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
- LPCSTR lpszString, UINT nCount, int *lpDxWidths) {
+ const char *lpszString, UINT nCount, int *lpDxWidths) {
error("TODO: extTextOut");
}
@@ -1136,7 +1136,7 @@ BOOL CDC::Impl::extTextOut(int x, int y, UINT nOptions, LPCRECT lpRect,
error("TODO: extTextOut");
}
-CSize CDC::Impl::tabbedTextOut(int x, int y, LPCSTR lpszString, int nCount,
+CSize CDC::Impl::tabbedTextOut(int x, int y, const char *lpszString, int nCount,
int nTabPositions, const int *lpnTabStopPositions, int nTabOrigin) {
CString str(lpszString, nCount);
@@ -1154,7 +1154,7 @@ CSize CDC::Impl::tabbedTextOut(int x, int y, const CString &str,
return size;
}
-int CDC::Impl::drawText(LPCSTR lpszString, int nCount,
+int CDC::Impl::drawText(const char *lpszString, int nCount,
LPRECT lpRect, UINT nFormat, int nTabPositions,
const int *lpnTabStopPositions, int nTabOrigin,
CSize *size) {
@@ -1185,7 +1185,7 @@ int CDC::Impl::drawText(const CString &str, LPRECT lpRect, UINT nFormat,
return size->cy;
}
-CSize CDC::Impl::getTextExtent(LPCSTR lpszString, int nCount) const {
+CSize CDC::Impl::getTextExtent(const char *lpszString, int nCount) const {
CString str(lpszString, nCount);
Graphics::Font *font = *(CFont::Impl *)_font;
@@ -1204,7 +1204,7 @@ CSize CDC::Impl::getTextExtent(const CString &str) const {
return s;
}
-CSize CDC::Impl::getOutputTextExtent(LPCSTR lpszString, int nCount) const {
+CSize CDC::Impl::getOutputTextExtent(const char *lpszString, int nCount) const {
// TODO: Proper implementation that handles tabs, etc.
return getTextExtent(lpszString, nCount);
}
@@ -1214,7 +1214,7 @@ CSize CDC::Impl::getOutputTextExtent(const CString &str) const {
return getTextExtent(str);
}
-CSize CDC::Impl::getTabbedTextExtent(LPCSTR lpszString, int nCount,
+CSize CDC::Impl::getTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const {
// TODO: Proper implementation that handles tabs, etc.
return getTextExtent(lpszString, nCount);
@@ -1225,7 +1225,7 @@ CSize CDC::Impl::getTabbedTextExtent(const CString &str,
error("TODO");
}
-CSize CDC::Impl::getOutputTabbedTextExtent(LPCSTR lpszString, int nCount,
+CSize CDC::Impl::getOutputTabbedTextExtent(const char *lpszString, int nCount,
int nTabPositions, int *lpnTabStopPositions) const {
error("TODO");
}
diff --git a/engines/bagel/mfc/dialog.cpp b/engines/bagel/mfc/dialog.cpp
index 4e48bc4da58..146b4942e8b 100644
--- a/engines/bagel/mfc/dialog.cpp
+++ b/engines/bagel/mfc/dialog.cpp
@@ -37,7 +37,7 @@ ON_WM_CLOSE()
ON_WM_ACTIVATE()
END_MESSAGE_MAP()
-CDialog::CDialog(LPCSTR lpszTemplateName, CWnd *pParentWnd) {
+CDialog::CDialog(const char *lpszTemplateName, CWnd *pParentWnd) {
SetParent(pParentWnd);
m_lpszTemplateName = lpszTemplateName;
@@ -51,7 +51,7 @@ CDialog::CDialog(UINT nIDTemplate, CWnd *pParentWnd) {
m_nIDHelp = nIDTemplate;
}
-BOOL CDialog::Create(LPCSTR lpszTemplateName,
+BOOL CDialog::Create(const char *lpszTemplateName,
CWnd *pParentWnd) {
m_lpszTemplateName = lpszTemplateName; // used for help
SetParent(pParentWnd);
diff --git a/engines/bagel/mfc/document.cpp b/engines/bagel/mfc/document.cpp
index 2f603a0e417..1b94b02dcca 100644
--- a/engines/bagel/mfc/document.cpp
+++ b/engines/bagel/mfc/document.cpp
@@ -34,7 +34,7 @@ const CString &CDocument::GetTitle() const {
return _title;
}
-void CDocument::SetTitle(LPCSTR lpszTitle) {
+void CDocument::SetTitle(const char *lpszTitle) {
_title = CString(lpszTitle);
}
@@ -42,7 +42,7 @@ const CString &CDocument::GetPathName() const {
return _unusedPathName;
}
-void CDocument::SetPathName(LPCSTR lpszPathName, BOOL bAddToMRU) {
+void CDocument::SetPathName(const char *lpszPathName, BOOL bAddToMRU) {
}
void CDocument::ClearPathName() {
@@ -82,7 +82,7 @@ void CDocument::RemoveView(CView *pView) {
void CDocument::DeleteContents() {
}
-void CDocument::ReportSaveLoadException(LPCSTR lpszPathName,
+void CDocument::ReportSaveLoadException(const char *lpszPathName,
CException *e, BOOL bSaving, UINT nIDPDefault) {
error("Save/load error");
}
diff --git a/engines/bagel/mfc/font.cpp b/engines/bagel/mfc/font.cpp
index 81d250a6d84..262f073aa70 100644
--- a/engines/bagel/mfc/font.cpp
+++ b/engines/bagel/mfc/font.cpp
@@ -29,7 +29,7 @@ BOOL CFont::CreateFont(int nHeight, int nWidth, int nEscapement,
int nOrientation, int nWeight, BYTE bItalic, BYTE bUnderline,
BYTE cStrikeOut, BYTE nCharSet, BYTE nOutPrecision,
BYTE nClipPrecision, BYTE nQuality, BYTE nPitchAndFamily,
- LPCSTR lpszFacename) {
+ const char *lpszFacename) {
m_hObject = AfxGetApp()->createFont(nHeight, nWidth,
nEscapement, nOrientation, nWeight, bItalic,
bUnderline, cStrikeOut, nCharSet, nOutPrecision,
diff --git a/engines/bagel/mfc/frame_wnd.cpp b/engines/bagel/mfc/frame_wnd.cpp
index d98b650fcf7..6cea5ef7568 100644
--- a/engines/bagel/mfc/frame_wnd.cpp
+++ b/engines/bagel/mfc/frame_wnd.cpp
@@ -100,8 +100,8 @@ BOOL CFrameWnd::LoadFrame(UINT nIDResource, uint32 dwDefaultStyle,
//VERIFY(AfxDeferRegisterClass(AFX_WNDFRAMEORVIEW_REG));
// Create the window
- LPCSTR lpszClass = nullptr; //GetIconWndClass(dwDefaultStyle, nIDResource);
- LPCSTR lpszTitle = m_strTitle.c_str();
+ const char *lpszClass = nullptr; //GetIconWndClass(dwDefaultStyle, nIDResource);
+ const char *lpszTitle = m_strTitle.c_str();
CRect rectDefault;
if (!Create(lpszClass, lpszTitle, dwDefaultStyle, rectDefault,
pParentWnd, MAKEINTRESOURCE(nIDResource), 0L, pContext)) {
@@ -119,10 +119,10 @@ BOOL CFrameWnd::LoadFrame(UINT nIDResource, uint32 dwDefaultStyle,
}
-BOOL CFrameWnd::Create(LPCSTR lpszClassName,
- LPCSTR lpszWindowName, uint32 dwStyle,
+BOOL CFrameWnd::Create(const char *lpszClassName,
+ const char *lpszWindowName, uint32 dwStyle,
const RECT &rect, CWnd *pParentWnd,
- LPCSTR lpszMenuName, uint32 dwExStyle,
+ const char *lpszMenuName, uint32 dwExStyle,
CCreateContext *pContext) {
HMENU hMenu = nullptr;
if (lpszMenuName != nullptr) {
diff --git a/engines/bagel/mfc/gfx/cursor.h b/engines/bagel/mfc/gfx/cursor.h
index 61e48664e15..02e920f3640 100644
--- a/engines/bagel/mfc/gfx/cursor.h
+++ b/engines/bagel/mfc/gfx/cursor.h
@@ -39,7 +39,7 @@ constexpr int CURSOR_H = 20;
struct ResourceString_Hash {
uint operator()(const intptr s) const {
- return s <= 0xffff ? s : Common::hashit((LPCSTR)s);
+ return s <= 0xffff ? s : Common::hashit((const char *)s);
}
};
@@ -50,7 +50,7 @@ struct ResourceString_EqualTo {
return (xNum == yNum) && (
(xNum && x == y) ||
- (!xNum && !strcmp((LPCSTR)x, (LPCSTR)y))
+ (!xNum && !strcmp((const char *)x, (const char *)y))
);
}
};
diff --git a/engines/bagel/mfc/gfx/dialog_template.cpp b/engines/bagel/mfc/gfx/dialog_template.cpp
index c6059e467bd..706e4e96229 100644
--- a/engines/bagel/mfc/gfx/dialog_template.cpp
+++ b/engines/bagel/mfc/gfx/dialog_template.cpp
@@ -54,7 +54,7 @@ BOOL CDialogTemplate::HasFont() const {
return false;
}
-BOOL CDialogTemplate::SetFont(LPCSTR lpFaceName, WORD nFontSize) {
+BOOL CDialogTemplate::SetFont(const char *lpFaceName, WORD nFontSize) {
return false;
}
diff --git a/engines/bagel/mfc/gfx/dialog_template.h b/engines/bagel/mfc/gfx/dialog_template.h
index 91b7675388a..8132f2213c6 100644
--- a/engines/bagel/mfc/gfx/dialog_template.h
+++ b/engines/bagel/mfc/gfx/dialog_template.h
@@ -116,7 +116,7 @@ public:
void loadTemplate(CDialog *dialog);
BOOL HasFont() const;
- BOOL SetFont(LPCSTR lpFaceName, WORD nFontSize);
+ BOOL SetFont(const char *lpFaceName, WORD nFontSize);
BOOL SetSystemFont(WORD nFontSize = 0);
BOOL GetFont(CString &strFaceName, WORD &nFontSize) const;
void GetSizeInDialogUnits(SIZE *pSize) const;
diff --git a/engines/bagel/mfc/global_functions.cpp b/engines/bagel/mfc/global_functions.cpp
index bed1aa30fe8..7225667a365 100644
--- a/engines/bagel/mfc/global_functions.cpp
+++ b/engines/bagel/mfc/global_functions.cpp
@@ -68,30 +68,30 @@ size_t GlobalCompact(uint32 dwMinFree) {
return 999999;
}
-int MessageBox(HWND hWnd, LPCSTR lpText,
- LPCSTR lpCaption, UINT uType) {
+int MessageBox(HWND hWnd, const char *lpText,
+ const char *lpCaption, UINT uType) {
error("%s %s", lpText, lpCaption);
return 0;
}
-int MessageBox(LPCSTR lpText, LPCSTR lpCaption, UINT uType) {
+int MessageBox(const char *lpText, const char *lpCaption, UINT uType) {
error("%s %s", lpText, lpCaption);
return 0;
}
-int MessageBox(LPCSTR lpText) {
+int MessageBox(const char *lpText) {
error("%s", lpText);
return 0;
}
-UINT GetPrivateProfileInt(LPCSTR lpAppName,
- LPCSTR lpKeyName, int nDefault, LPCSTR lpFileName) {
+UINT GetPrivateProfileInt(const char *lpAppName,
+ const char *lpKeyName, int nDefault, const char *lpFileName) {
return AfxGetApp()->GetProfileInt(lpAppName, lpKeyName, nDefault);
}
-extern uint32 GetPrivateProfileString(LPCSTR lpAppName,
- LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString,
- uint32 nSize, LPCSTR lpFileName) {
+extern uint32 GetPrivateProfileString(const char *lpAppName,
+ const char *lpKeyName, const char *lpDefault, char *lpReturnedString,
+ uint32 nSize, const char *lpFileName) {
CString str = AfxGetApp()->GetProfileString(lpAppName,
lpKeyName, lpDefault);
Common::strcpy_s(lpReturnedString, nSize, str.c_str());
@@ -100,8 +100,8 @@ extern uint32 GetPrivateProfileString(LPCSTR lpAppName,
BOOL WritePrivateProfileString(
- LPCSTR lpAppName, LPCSTR lpKeyName,
- LPCSTR lpString, LPCSTR lpFileName) {
+ const char *lpAppName, const char *lpKeyName,
+ const char *lpString, const char *lpFileName) {
AfxGetApp()->WriteProfileString(lpAppName,
lpKeyName, lpString);
return true;
@@ -222,12 +222,12 @@ HINSTANCE AfxGetResourceHandle() {
return nullptr;
}
-HINSTANCE AfxFindResourceHandle(LPCSTR lpszName, LPCSTR lpszType) {
+HINSTANCE AfxFindResourceHandle(const char *lpszName, const char *lpszType) {
return AfxGetResourceHandle();
}
HRSRC FindResource(HMODULE hModule,
- LPCSTR lpName, LPCSTR lpType) {
+ const char *lpName, const char *lpType) {
return AfxGetApp()->findResource(lpName, lpType);
}
@@ -256,7 +256,7 @@ HFONT CreateFontIndirect(const LOGFONT *lf) {
lf->lfFaceName, lf->lfHeight);
}
-BOOL AfxExtractSubString(CString &rString, LPCSTR lpszFullString,
+BOOL AfxExtractSubString(CString &rString, const char *lpszFullString,
int iSubString, char chSep) {
if (lpszFullString == nullptr)
return FALSE;
@@ -271,7 +271,7 @@ BOOL AfxExtractSubString(CString &rString, LPCSTR lpszFullString,
lpszFullString++; // Point past the separator
}
- LPCSTR lpchEnd = strchr(lpszFullString, chSep);
+ const char *lpchEnd = strchr(lpszFullString, chSep);
int nLen = !lpchEnd ? strlen(lpszFullString) :
(int)(lpchEnd - lpszFullString);
ASSERT(nLen >= 0);
diff --git a/engines/bagel/mfc/global_functions.h b/engines/bagel/mfc/global_functions.h
index 04989b158b0..8034787adc8 100644
--- a/engines/bagel/mfc/global_functions.h
+++ b/engines/bagel/mfc/global_functions.h
@@ -63,17 +63,17 @@ extern CWinApp *AfxGetApp();
extern CWnd *AfxGetMainWnd();
extern HINSTANCE AfxGetInstanceHandle();
extern int LoadString(HINSTANCE hInstance,
- UINT uID, LPSTR lpBuffer, int cchBufferMax);
-extern HMODULE LoadLibrary(LPCSTR lpLibFileName);
+ UINT uID, char *lpBuffer, int cchBufferMax);
+extern HMODULE LoadLibrary(const char *lpLibFileName);
extern void FreeLibrary(HMODULE hModule);
extern FARPROC GetProcAddress(HMODULE hModule,
- LPCSTR lpProcName);
-extern HMODULE GetModuleHandle(LPCSTR lpModuleName);
+ const char * lpProcName);
+extern HMODULE GetModuleHandle(const char *lpModuleName);
-extern LPCSTR AFXAPI AfxRegisterWndClass(UINT nClassStyle,
+extern const char *AFXAPI AfxRegisterWndClass(UINT nClassStyle,
HCURSOR hCursor = 0, HBRUSH hbrBackground = 0, HICON hIcon = 0);
extern BOOL GetClassInfo(HINSTANCE hInstance,
- LPCSTR lpClassName, LPWNDCLASS lpWndClass);
+ const char *lpClassName, LPWNDCLASS lpWndClass);
extern int GetSystemMetrics(int nIndex);
extern HGLOBAL GlobalAlloc(UINT uFlags, size_t dwBytes);
@@ -89,19 +89,19 @@ extern size_t GlobalCompact(uint32 dwMinFree);
#define LocalCompact GlobalCompact
#define GetFreeSpace(w) (0x100000L)
-extern int MessageBox(HWND hWnd, LPCSTR lpText,
- LPCSTR lpCaption, UINT uType);
-extern int MessageBox(LPCSTR lpText, LPCSTR lpCaption, UINT uType = 0);
-extern int MessageBox(LPCSTR lpText);
-extern UINT GetPrivateProfileInt(LPCSTR lpAppName,
- LPCSTR lpKeyName, int nDefault, LPCSTR lpFileName);
-extern uint32 GetPrivateProfileString(LPCSTR lpAppName,
- LPCSTR lpKeyName, LPCSTR lpDefault, LPSTR lpReturnedString,
- uint32 nSize, LPCSTR lpFileName);
+extern int MessageBox(HWND hWnd, const char *lpText,
+ const char *lpCaption, UINT uType);
+extern int MessageBox(const char *lpText, const char *lpCaption, UINT uType = 0);
+extern int MessageBox(const char *lpText);
+extern UINT GetPrivateProfileInt(const char *lpAppName,
+ const char *lpKeyName, int nDefault, const char *lpFileName);
+extern uint32 GetPrivateProfileString(const char *lpAppName,
+ const char *lpKeyName, const char *lpDefault, char * lpReturnedString,
+ uint32 nSize, const char *lpFileName);
extern BOOL WritePrivateProfileString(
- LPCSTR lpAppName, LPCSTR lpKeyName,
- LPCSTR lpString, LPCSTR lpFileName);
+ const char *lpAppName, const char *lpKeyName,
+ const char *lpString, const char *lpFileName);
extern HTASK GetCurrentTask();
extern FARPROC MakeProcInstance(FARPROC lpProc, HINSTANCE hInstance);
@@ -132,9 +132,9 @@ extern LRESULT SendMessage(HWND hWnd, UINT Msg,
WPARAM wParam, LPARAM lParam);
extern HINSTANCE AfxGetResourceHandle();
-extern HINSTANCE AfxFindResourceHandle(LPCSTR lpszName, LPCSTR lpszType);
+extern HINSTANCE AfxFindResourceHandle(const char *lpszName, const char *lpszType);
extern HRSRC FindResource(HMODULE hModule,
- LPCSTR lpName, LPCSTR lpType);
+ const char *lpName, const char *lpType);
extern size_t SizeofResource(HMODULE hModule, HRSRC hResInfo);
extern HGLOBAL LoadResource(HMODULE hModule, HRSRC hResInfo);
extern void *LockResource(HGLOBAL hResData);
@@ -142,7 +142,7 @@ extern void UnlockResource(HGLOBAL hResData);
extern BOOL FreeResource(HGLOBAL hResData);
extern HFONT CreateFontIndirect(const LOGFONT *lf);
-extern BOOL AfxExtractSubString(CString &rString, LPCSTR lpszFullString,
+extern BOOL AfxExtractSubString(CString &rString, const char *lpszFullString,
int iSubString, char chSep = '\n');
inline char *strUpper(char *s) {
diff --git a/engines/bagel/mfc/libs/resources.cpp b/engines/bagel/mfc/libs/resources.cpp
index 30707a5cf33..7dcf3acede3 100644
--- a/engines/bagel/mfc/libs/resources.cpp
+++ b/engines/bagel/mfc/libs/resources.cpp
@@ -50,7 +50,7 @@ void Resources::removeResources(const Common::Path &file) {
_cache.clear();
}
-HRSRC Resources::findResource(LPCSTR lpName, LPCSTR lpType) {
+HRSRC Resources::findResource(const char *lpName, const char *lpType) {
if (empty())
error("Use CWinApp::addResources to register "
"an .exe or .dll file containing the resources");
diff --git a/engines/bagel/mfc/libs/resources.h b/engines/bagel/mfc/libs/resources.h
index 1d3dc0c51c7..85aa4a5ea35 100644
--- a/engines/bagel/mfc/libs/resources.h
+++ b/engines/bagel/mfc/libs/resources.h
@@ -82,7 +82,7 @@ public:
/**
* Find a resource
*/
- HRSRC findResource(LPCSTR lpName, LPCSTR lpType);
+ HRSRC findResource(const char *lpName, const char *lpType);
/**
* Return the size of a resource
diff --git a/engines/bagel/mfc/menu.cpp b/engines/bagel/mfc/menu.cpp
index 78c0bd684b6..69b0f6b4ff8 100644
--- a/engines/bagel/mfc/menu.cpp
+++ b/engines/bagel/mfc/menu.cpp
@@ -34,7 +34,7 @@ BOOL CMenu::CreateMenu() {
BOOL CMenu::CreatePopupMenu() {
error("TODO: CMenu::CreatePopupMenu");
}
-BOOL CMenu::LoadMenu(LPCTSTR lpszResourceName) {
+BOOL CMenu::LoadMenu(const char *lpszResourceName) {
error("TODO: CMenu::LoadMenu");
}
BOOL CMenu::LoadMenu(UINT nIDResource) {
diff --git a/engines/bagel/mfc/minwindef.h b/engines/bagel/mfc/minwindef.h
index e673c3b17f7..58642560d7a 100644
--- a/engines/bagel/mfc/minwindef.h
+++ b/engines/bagel/mfc/minwindef.h
@@ -294,8 +294,8 @@ typedef struct tagWNDCLASS {
HICON hIcon;
HCURSOR hCursor;
HBRUSH hbrBackground;
- LPCSTR lpszMenuName;
- LPCSTR lpszClassName;
+ const char * lpszMenuName;
+ const char * lpszClassName;
} WNDCLASS, *PWNDCLASS, *NPWNDCLASS, *LPWNDCLASS;
struct CDataExchange {
diff --git a/engines/bagel/mfc/single_doc_template.cpp b/engines/bagel/mfc/single_doc_template.cpp
index 1e0735d61cd..884cc078742 100644
--- a/engines/bagel/mfc/single_doc_template.cpp
+++ b/engines/bagel/mfc/single_doc_template.cpp
@@ -33,7 +33,7 @@ CSingleDocTemplate::~CSingleDocTemplate() {
assert(!m_pOnlyDoc);
}
-CDocument *CSingleDocTemplate::OpenDocumentFile(LPCSTR lpszPathName,
+CDocument *CSingleDocTemplate::OpenDocumentFile(const char *lpszPathName,
BOOL bMakeVisible) {
CDocument *pDocument = nullptr;
CFrameWnd *pFrame = nullptr;
diff --git a/engines/bagel/mfc/win_app.cpp b/engines/bagel/mfc/win_app.cpp
index aaedfb9991a..a03647d7457 100644
--- a/engines/bagel/mfc/win_app.cpp
+++ b/engines/bagel/mfc/win_app.cpp
@@ -176,11 +176,11 @@ int CWinApp::Run() {
void CWinApp::SetDialogBkColor() {
}
-HCURSOR CWinApp::LoadStandardCursor(LPCSTR lpszCursorName) {
+HCURSOR CWinApp::LoadStandardCursor(const char *lpszCursorName) {
return _cursors.loadCursor((intptr)lpszCursorName);
}
-HCURSOR CWinApp::LoadCursor(LPCSTR lpszResourceName) {
+HCURSOR CWinApp::LoadCursor(const char *lpszResourceName) {
return _cursors.loadCursor((intptr)lpszResourceName);
}
@@ -258,24 +258,24 @@ void CWinApp::CloseAllDocuments(BOOL bEndSession) {
m_pDocManager->CloseAllDocuments(bEndSession);
}
-UINT CWinApp::GetProfileInt(LPCSTR lpszSection,
- LPCSTR lpszEntry, int nDefault) {
+UINT CWinApp::GetProfileInt(const char *lpszSection,
+ const char *lpszEntry, int nDefault) {
return _settings[lpszSection].getInt(lpszEntry, nDefault);
}
-void CWinApp::WriteProfileInt(LPCSTR lpszSection,
- LPCSTR lpszEntry, int nValue) {
+void CWinApp::WriteProfileInt(const char *lpszSection,
+ const char *lpszEntry, int nValue) {
_settings[lpszSection].setInt(lpszEntry, nValue);
}
-CString CWinApp::GetProfileString(LPCSTR lpszSection,
- LPCSTR lpszEntry, LPCSTR lpszDefault) {
+CString CWinApp::GetProfileString(const char *lpszSection,
+ const char *lpszEntry, const char *lpszDefault) {
Common::String str = _settings[lpszSection].getString(lpszEntry, lpszDefault);
return CString(str.c_str());
}
-BOOL CWinApp::WriteProfileString(LPCSTR lpszSection,
- LPCSTR lpszEntry, LPCSTR lpszValue) {
+BOOL CWinApp::WriteProfileString(const char *lpszSection,
+ const char *lpszEntry, const char *lpszValue) {
_settings[lpszSection].setString(lpszEntry, lpszValue);
return true;
}
@@ -310,7 +310,7 @@ byte CWinApp::getColor(COLORREF color) const {
);
}
-HRSRC CWinApp::findResource(LPCSTR lpName, LPCSTR lpType) {
+HRSRC CWinApp::findResource(const char *lpName, const char *lpType) {
return _resources.findResource(lpName, lpType);
}
@@ -363,13 +363,13 @@ void CWinApp::AfxUnlockTempMaps() {
m_pmapHGDIOBJ->DeleteTemp();
}
-LPCSTR CWinApp::AfxRegisterWndClass(UINT nClassStyle,
+const char *CWinApp::AfxRegisterWndClass(UINT nClassStyle,
HCURSOR hCursor, HBRUSH hbrBackground, HICON hIcon) {
return "ScummVMWindow";
}
BOOL CWinApp::GetClassInfo(HINSTANCE hInstance,
- LPCSTR lpClassName, LPWNDCLASS lpWndClass) {
+ const char *lpClassName, LPWNDCLASS lpWndClass) {
assert(lpWndClass);
WNDCLASS &wc = *lpWndClass;
@@ -395,7 +395,7 @@ HINSTANCE AfxGetInstanceHandle() {
}
int LoadString(HINSTANCE hInstance, UINT uID,
- LPSTR lpBuffer, int cchBufferMax) {
+ char *lpBuffer, int cchBufferMax) {
if (lpBuffer == nullptr || cchBufferMax <= 0)
return 0;
@@ -435,7 +435,7 @@ int LoadString(HINSTANCE hInstance, UINT uID,
return 0;
}
-HMODULE LoadLibrary(LPCSTR lpLibFileName) {
+HMODULE LoadLibrary(const char *lpLibFileName) {
error("LoadLibrary is unsupported");
}
@@ -445,22 +445,22 @@ void FreeLibrary(HMODULE hModule) {
FARPROC GetProcAddress(HMODULE hModule,
- LPCSTR lpProcName) {
+ const char *lpProcName) {
error("TODO: GetProcAddress");
}
-HMODULE GetModuleHandle(LPCSTR lpModuleName) {
+HMODULE GetModuleHandle(const char *lpModuleName) {
error("TODO: GetModuleHandle");
}
-LPCSTR AfxRegisterWndClass(UINT nClassStyle,
+const char *AfxRegisterWndClass(UINT nClassStyle,
HCURSOR hCursor, HBRUSH hbrBackground, HICON hIcon) {
return AfxGetApp()->AfxRegisterWndClass(nClassStyle,
hCursor, hbrBackground, hIcon);
}
BOOL GetClassInfo(HINSTANCE hInstance,
- LPCSTR lpClassName, LPWNDCLASS lpWndClass) {
+ const char *lpClassName, LPWNDCLASS lpWndClass) {
return AfxGetApp()->GetClassInfo(hInstance, lpClassName, lpWndClass);
}
diff --git a/engines/bagel/mfc/wingdi.cpp b/engines/bagel/mfc/wingdi.cpp
index 9b8e376bf1b..a9efc6af34a 100644
--- a/engines/bagel/mfc/wingdi.cpp
+++ b/engines/bagel/mfc/wingdi.cpp
@@ -113,7 +113,7 @@ BOOL EndPaint(HWND hWnd, const PAINTSTRUCT *lpPaint) {
}
INT_PTR DialogBoxParam(HINSTANCE hInstance,
- LPCTSTR lpTemplateName, HWND hWndParent,
+ const char *lpTemplateName, HWND hWndParent,
DLGPROC lpDialogFunc, LPARAM dwInitParam) {
error("TODO: DialogBoxParam");
}
@@ -122,13 +122,13 @@ BOOL IsWindow(HWND hWnd) {
error("TODO: IsWindow");
}
-BOOL SetWindowText(HWND hWnd, LPCSTR lpszString) {
+BOOL SetWindowText(HWND hWnd, const char *lpszString) {
CWnd *wnd = CWnd::FromHandle(hWnd);
wnd->SetWindowText(lpszString);
return true;
}
-int GetWindowText(HWND hWnd, LPSTR lpszStringBuf, int nMaxCount) {
+int GetWindowText(HWND hWnd, char *lpszStringBuf, int nMaxCount) {
CWnd *wnd = CWnd::FromHandle(hWnd);
return wnd->GetWindowText(lpszStringBuf, nMaxCount);
}
@@ -274,7 +274,7 @@ int StretchDIBits(HDC hdc, int xDest, int yDest, int DestWidth, int DestHeight,
error("TODO: StretchDIBits");
}
-int GetTextExtent(HDC hdc, LPCSTR text, size_t len) {
+int GetTextExtent(HDC hdc, const char *text, size_t len) {
error("TODO: GetTextExtent");
}
@@ -288,11 +288,11 @@ intptr GetWindowWord(HWND hWnd, int nIndex) {
return 0;
}
-int AddFontResource(LPCSTR fontName) {
+int AddFontResource(const char *fontName) {
return AfxGetApp()->addFontResource(fontName);
}
-bool RemoveFontResource(LPCSTR fontName) {
+bool RemoveFontResource(const char *fontName) {
return AfxGetApp()->removeFontResource(fontName);
}
@@ -340,7 +340,7 @@ HWND GetCapture() {
}
HCURSOR LoadCursor(HINSTANCE hInstance,
- LPCSTR lpCursorName) {
+ const char *lpCursorName) {
return AfxGetApp()->LoadCursor(lpCursorName);
}
diff --git a/engines/bagel/mfc/wingdi.h b/engines/bagel/mfc/wingdi.h
index b9ba4c1ac88..1beb9e530a9 100644
--- a/engines/bagel/mfc/wingdi.h
+++ b/engines/bagel/mfc/wingdi.h
@@ -264,7 +264,7 @@ enum FontWeight {
/*
* Standard Cursor IDs
*/
-#define MAKEINTRESOURCE(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
+#define MAKEINTRESOURCE(i) ((char *)((ULONG_PTR)((WORD)(i))))
#define IDC_NONE 0
#define IDC_ARROW MAKEINTRESOURCE(32512)
@@ -741,11 +741,11 @@ extern HDC BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint);
extern BOOL EndPaint(HWND hWnd, const PAINTSTRUCT *lpPaint);
extern INT_PTR DialogBoxParam(HINSTANCE hInstance,
- LPCTSTR lpTemplateName, HWND hWndParent,
+ const char *lpTemplateName, HWND hWndParent,
DLGPROC lpDialogFunc, LPARAM dwInitParam);
extern BOOL IsWindow(HWND hWnd);
-extern BOOL SetWindowText(HWND hWnd, LPCSTR lpszString);
-extern int GetWindowText(HWND hWnd, LPSTR lpszStringBuf, int nMaxCount);
+extern BOOL SetWindowText(HWND hWnd, const char *lpszString);
+extern int GetWindowText(HWND hWnd, char *lpszStringBuf, int nMaxCount);
extern BOOL ScreenToClient(HWND hWnd, LPPOINT lpPoint);
HBITMAP CreateDIBitmap(HDC hdc, CONST BITMAPINFOHEADER *pbmih,
@@ -765,11 +765,11 @@ extern int SetStretchBltMode(HDC hdc, int mode);
extern int StretchDIBits(HDC hdc, int xDest, int yDest, int DestWidth, int DestHeight,
int xSrc, int ySrc, int SrcWidth, int SrcHeight,
CONST void *lpBits, CONST BITMAPINFO *lpbmi, UINT iUsage, uint32 rop);
-extern int GetTextExtent(HDC hdc, LPCSTR text, size_t len);
+extern int GetTextExtent(HDC hdc, const char *text, size_t len);
extern BOOL GetTextMetrics(HDC hdc, LPTEXTMETRIC lptm);
extern intptr GetWindowWord(HWND hWnd, int nIndex);
-extern int AddFontResource(LPCSTR fontName);
-extern bool RemoveFontResource(LPCSTR fontName);
+extern int AddFontResource(const char *fontName);
+extern bool RemoveFontResource(const char *fontName);
extern int SetScrollPos(HWND hWnd, int nBar,
int nPos, BOOL bRedraw);
extern void SetScrollRange(HWND hWnd, int nBar,
@@ -782,7 +782,7 @@ extern BOOL SetCapture(HWND hWnd);
extern BOOL ReleaseCapture();
extern HWND GetCapture();
extern HCURSOR LoadCursor(HINSTANCE hInstance,
- LPCSTR lpCursorName);
+ const char *lpCursorName);
extern HCURSOR SetCursor(HCURSOR hCursor);
extern int ShowCursor(BOOL bShow);
diff --git a/engines/bagel/mfc/winnt.h b/engines/bagel/mfc/winnt.h
index 670d79985d7..7ae79f8ceda 100644
--- a/engines/bagel/mfc/winnt.h
+++ b/engines/bagel/mfc/winnt.h
@@ -41,13 +41,9 @@ typedef long *LPLONG;
typedef uint32 *PDWORD;
typedef uint32 *LPDWORD;
-typedef const char *LPCSTR;
-typedef const char *LPCTSTR;
typedef const uint16 *LPCWSTR;
typedef uint16 *LPWSTR;
typedef uint16 *LPTSTR;
-typedef char *LPSTR;
-typedef char *NPSTR;
typedef LPWSTR BSTR;
typedef unsigned int UINT;
@@ -638,7 +634,7 @@ typedef uint32 (*APPLICATION_RECOVERY_CALLBACK)(void *pvParameter);
/*
* Predefined Resource Types
*/
-#define MAKEINTRESOURCE(i) ((LPSTR)((ULONG_PTR)((WORD)(i))))
+#define MAKEINTRESOURCE(i) ((char *)((ULONG_PTR)((WORD)(i))))
#define RT_CURSOR MAKEINTRESOURCE(1)
#define RT_BITMAP MAKEINTRESOURCE(2)
#define RT_ICON MAKEINTRESOURCE(3)
diff --git a/engines/bagel/mfc/wnd.cpp b/engines/bagel/mfc/wnd.cpp
index 1a6ad79c29b..63b6cb136ca 100644
--- a/engines/bagel/mfc/wnd.cpp
+++ b/engines/bagel/mfc/wnd.cpp
@@ -85,7 +85,7 @@ CWnd::~CWnd() {
pMap->RemoveHandle(m_hWnd);
}
-BOOL CWnd::Create(LPCSTR lpszClassName, LPCSTR lpszWindowName,
+BOOL CWnd::Create(const char *lpszClassName, const char *lpszWindowName,
uint32 dwStyle, const RECT &rect, CWnd *pParentWnd,
UINT nID, CCreateContext *pContext) {
m_pParentWnd = pParentWnd;
@@ -133,8 +133,8 @@ BOOL CWnd::Create(LPCSTR lpszClassName, LPCSTR lpszWindowName,
return true;
}
-BOOL CWnd::CreateEx(uint32 dwExStyle, LPCSTR lpszClassName,
- LPCSTR lpszWindowName, uint32 dwStyle,
+BOOL CWnd::CreateEx(uint32 dwExStyle, const char *lpszClassName,
+ const char *lpszWindowName, uint32 dwStyle,
const RECT &rect, CWnd *pParentWnd, UINT nID,
void *lpParam /* = nullptr */) {
return CreateEx(dwExStyle, lpszClassName, lpszWindowName, dwStyle,
@@ -142,8 +142,8 @@ BOOL CWnd::CreateEx(uint32 dwExStyle, LPCSTR lpszClassName,
pParentWnd->GetSafeHwnd(), nID, lpParam);
}
-BOOL CWnd::CreateEx(uint32 dwExStyle, LPCSTR lpszClassName,
- LPCSTR lpszWindowName, uint32 dwStyle,
+BOOL CWnd::CreateEx(uint32 dwExStyle, const char *lpszClassName,
+ const char *lpszWindowName, uint32 dwStyle,
int x, int y, int nWidth, int nHeight,
HWND hWndParent, LPARAM nIDorHMenu, void *lpParam) {
// Set up create structure
@@ -392,12 +392,12 @@ int CWnd::GetWindowText(CString &rString) const {
return rString.size();
}
-int CWnd::GetWindowText(LPSTR lpszStringBuf, int nMaxCount) const {
+int CWnd::GetWindowText(char *lpszStringBuf, int nMaxCount) const {
Common::strcpy_s(lpszStringBuf, nMaxCount, _windowText.c_str());
return strlen(lpszStringBuf);
}
-BOOL CWnd::SetWindowText(LPCSTR lpszString) {
+BOOL CWnd::SetWindowText(const char *lpszString) {
_windowText = lpszString;
Invalidate();
return true;
@@ -710,7 +710,7 @@ BOOL CWnd::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT *pResult
break;
case AfxSig_vws:
- (this->*mmf.pfn_vws)((UINT)wParam, (LPCTSTR)lParam);
+ (this->*mmf.pfn_vws)((UINT)wParam, (const char *)lParam);
break;
case AfxSig_vOWNER:
@@ -1073,7 +1073,7 @@ BOOL CWnd::SubclassDlgItem(UINT nID, CWnd *pParent) {
return true;
}
-BOOL CWnd::SetDlgItemText(int nIDDlgItem, LPCSTR lpString) {
+BOOL CWnd::SetDlgItemText(int nIDDlgItem, const char *lpString) {
CWnd *wnd = GetDlgItem(nIDDlgItem);
if (wnd) {
More information about the Scummvm-git-logs
mailing list