[Scummvm-git-logs] scummvm master -> f471847e24e2fcf9a1e4632be25ab4cf6a3d10d9

Strangerke noreply at scummvm.org
Mon May 6 12:03:20 UTC 2024


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

Summary:
39650c05cf BAGEL: Renaming of some constants, make use of CTEXT_WHITE instead of hardcoded value where appropriate
1201cc4c3d BAGEL: Remove useless null checks before deleting in slot_wnd
f471847e24 BAGEL: some renaming in sraf_computer, add some missing override


Commit: 39650c05cfbd562d16b1a00829dc20deb3896d3f
    https://github.com/scummvm/scummvm/commit/39650c05cfbd562d16b1a00829dc20deb3896d3f
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-06T13:03:00+01:00

Commit Message:
BAGEL: Renaming of some constants, make use of CTEXT_WHITE instead of hardcoded value where appropriate

Changed paths:
    engines/bagel/baglib/dev_dlg.cpp
    engines/bagel/baglib/fmovie.cpp
    engines/bagel/dialogs/credits_dialog.cpp
    engines/bagel/dialogs/opt_window.cpp
    engines/bagel/spacebar/bibble_window.cpp
    engines/bagel/spacebar/computer.cpp
    engines/bagel/spacebar/nav_window.cpp
    engines/bagel/spacebar/slot_wnd.cpp
    engines/bagel/spacebar/sraf_computer.cpp
    engines/bagel/spacebar/vid_wnd.cpp


diff --git a/engines/bagel/baglib/dev_dlg.cpp b/engines/bagel/baglib/dev_dlg.cpp
index c2d152cfa59..7a5875590c7 100644
--- a/engines/bagel/baglib/dev_dlg.cpp
+++ b/engines/bagel/baglib/dev_dlg.cpp
@@ -196,7 +196,7 @@ void CDevDlg::setText(CBofString &text, CBofRect *textRect) {
 	_titleText = new CBofText;
 	if (_titleText != nullptr) {
 		_titleText->setupText(textRect, JUSTIFY_CENTER, FORMAT_DEFAULT);
-		_titleText->setColor(RGB(255, 255, 255));
+		_titleText->setColor(CTEXT_WHITE);
 		_titleText->SetSize(FONT_14POINT);
 		_titleText->setWeight(TEXT_BOLD);
 		_titleText->setText(text);
diff --git a/engines/bagel/baglib/fmovie.cpp b/engines/bagel/baglib/fmovie.cpp
index 08de15a5c75..52e671e6f43 100644
--- a/engines/bagel/baglib/fmovie.cpp
+++ b/engines/bagel/baglib/fmovie.cpp
@@ -25,7 +25,6 @@
 #include "bagel/boflib/app.h"
 #include "bagel/baglib/master_win.h"
 #include "bagel/baglib/pan_window.h"
-#include "bagel/boflib/misc.h"
 #include "bagel/boflib/std_keys.h"
 
 namespace Bagel {
@@ -125,7 +124,7 @@ bool CBagFMovie::openMovie(const char *sFilename) {
 
 	if (_bmpBuf) {
 		_bmpBuf->lock();
-		_bmpBuf->fillRect(nullptr, _smackerPal->getNearestIndex(RGB(255, 255, 255)));
+		_bmpBuf->fillRect(nullptr, _smackerPal->getNearestIndex(CTEXT_WHITE));
 
 		_reversedFl = !(_bmpBuf->isTopDown());
 		_bufferStart = (char *)_bmpBuf->getPixelAddress(0, _reversedFl * (_bmpBuf->height() - 1));
diff --git a/engines/bagel/dialogs/credits_dialog.cpp b/engines/bagel/dialogs/credits_dialog.cpp
index e41b8d7657f..ed1c03035bf 100644
--- a/engines/bagel/dialogs/credits_dialog.cpp
+++ b/engines/bagel/dialogs/credits_dialog.cpp
@@ -346,7 +346,7 @@ ErrorCode CBagCreditsDialog::paintLine(int nLine, char *pszText) {
 	_pCreditsBmp->fillRect(&cRect, MY_MASK_COLOR);
 
 	if (*pszText != '\0') {
-		paintShadowedText(_pCreditsBmp, &cRect, pszText, g_cScreen[_iScreen]._nPointSize, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_CENTER);
+		paintShadowedText(_pCreditsBmp, &cRect, pszText, g_cScreen[_iScreen]._nPointSize, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_CENTER);
 	}
 
 	return _errCode;
diff --git a/engines/bagel/dialogs/opt_window.cpp b/engines/bagel/dialogs/opt_window.cpp
index 243f21bd3a9..e3bab267a51 100644
--- a/engines/bagel/dialogs/opt_window.cpp
+++ b/engines/bagel/dialogs/opt_window.cpp
@@ -125,7 +125,7 @@ CBagOptWindow::CBagOptWindow() {
 	_cColorScheme._cHighlight = RGB(255, 255, 255);
 	_cColorScheme._cShadow = RGB(255, 255, 255);
 	_cColorScheme._cText = RGB(0, 0, 0);
-	_cColorScheme._cTextDisabled = RGB(255, 255, 255);
+	_cColorScheme._cTextDisabled = CTEXT_WHITE;
 	_cColorScheme._cOutline = RGB(123, 156, 206);
 
 	// Don't need to save the background behind this dialog
diff --git a/engines/bagel/spacebar/bibble_window.cpp b/engines/bagel/spacebar/bibble_window.cpp
index 44cc3499825..03e790feed4 100644
--- a/engines/bagel/spacebar/bibble_window.cpp
+++ b/engines/bagel/spacebar/bibble_window.cpp
@@ -306,7 +306,7 @@ ErrorCode CBibbleWindow::attach() {
 		CBofRect cRect(CREDITS_AREA_X1, CREDITS_AREA_Y1, CREDITS_AREA_X2, CREDITS_AREA_Y2);
 
 		_pCreditsText->setupText(&cRect, JUSTIFY_RIGHT, FORMAT_CENTER_RIGHT);
-		_pCreditsText->setColor(RGB(255, 255, 255));
+		_pCreditsText->setColor(CTEXT_WHITE);
 
 		_pCreditsText->SetSize(mapWindowsPointSize(20));
 		_pCreditsText->setWeight(TEXT_BOLD);
@@ -690,7 +690,7 @@ void CBibbleWindow::onBofButton(CBofObject *pObject, int nState) {
 			CBofBitmap cBmp(cRect.width(), cRect.height(), (CBofPalette *)nullptr, false);
 			cBmp.captureScreen(this, &cRect);
 
-			paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
+			paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_WRAP, FORMAT_TOP_LEFT);
 			waitForInput();
 
 			cBmp.paint(this, &cRect);
diff --git a/engines/bagel/spacebar/computer.cpp b/engines/bagel/spacebar/computer.cpp
index 1e66780a295..a049400468d 100644
--- a/engines/bagel/spacebar/computer.cpp
+++ b/engines/bagel/spacebar/computer.cpp
@@ -717,7 +717,7 @@ void SBarComputer::order() {
 			if (nCredits < 1) {
 				CBofBitmap saveBackground(640, 480, (CBofPalette *)nullptr, false);
 				saveBackground.captureScreen(this, &_compTextWindow);
-				paintBeveledText(this, &_compTextWindow, szBroke, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
+				paintBeveledText(this, &_compTextWindow, szBroke, FONT_15POINT, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_WRAP, FORMAT_TOP_LEFT);
 
 				waitForInput();
 
@@ -757,7 +757,7 @@ void SBarComputer::order() {
 					}
 
 					if (bRefuse) {
-						paintBeveledText(this, &_compTextWindow, szRefuse, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
+						paintBeveledText(this, &_compTextWindow, szRefuse, FONT_15POINT, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_WRAP, FORMAT_TOP_LEFT);
 						waitForInput();
 
 						saveBackgroundTwo.paint(this, &_compTextWindow);
diff --git a/engines/bagel/spacebar/nav_window.cpp b/engines/bagel/spacebar/nav_window.cpp
index 515b0fb4507..fee274f436a 100644
--- a/engines/bagel/spacebar/nav_window.cpp
+++ b/engines/bagel/spacebar/nav_window.cpp
@@ -45,7 +45,7 @@ namespace SpaceBar {
 #define NEBSIM4_BMP  "$SBARDIR\\NEBLITZ\\CLOSEUP\\NAV\\nebsim4.bmp"
 
 // New background bmps are black, so text will be white
-#define NAV_TEXT_COLOR         RGB(255,255,255)
+#define NAV_TEXT_COLOR         CTEXT_WHITE
 
 struct ST_BUTTONS {
 	const char *_pszName;
diff --git a/engines/bagel/spacebar/slot_wnd.cpp b/engines/bagel/spacebar/slot_wnd.cpp
index f6f2d245f49..335a034df80 100644
--- a/engines/bagel/spacebar/slot_wnd.cpp
+++ b/engines/bagel/spacebar/slot_wnd.cpp
@@ -33,9 +33,9 @@ namespace SpaceBar {
 // return $1; for casino background sounds
 #define CASINO_AUDIO            "CASINO.WAV"
 
-#define BGCBDIR         "$SBARDIR\\BAR\\CLOSEUP\\BGCB\\"
-#define WINAUDIO        "BGNWIN.WAV"
-#define SLOTAUDIO       "BGNSLOT.WAV"
+#define BGCB_DIR         "$SBARDIR\\BAR\\CLOSEUP\\BGCB\\"
+#define WIN_AUDIO        "BGNWIN.WAV"
+#define SLOT_AUDIO       "BGNSLOT.WAV"
 
 struct ST_BUTTONS {
 	const char *_pszName;
@@ -174,7 +174,7 @@ ErrorCode  SBarSlotWnd::attach() {
 	_bLose = false;
 	_bFixBet = false;
 
-	if ((_pSlotSound = new CBofSound(this, BuildSlotDir(SLOTAUDIO), SOUND_MIX, 1)) != nullptr) {
+	if ((_pSlotSound = new CBofSound(this, BuildSlotDir(SLOT_AUDIO), SOUND_MIX, 1)) != nullptr) {
 
 	} else {
 		reportError(ERR_MEMORY, "Could not allocate a CBofSound");
@@ -239,8 +239,7 @@ ErrorCode  SBarSlotWnd::attach() {
 		if (_pCredText != nullptr) {
 			CBofRect cRect(CreditRect.left, CreditRect.top, CreditRect.right, CreditRect.bottom);
 			_pCredText->setupText(&cRect, JUSTIFY_RIGHT, FORMAT_CENTER_RIGHT);
-			_pCredText->setColor(RGB(255, 255, 255));
-
+			_pCredText->setColor(CTEXT_WHITE);
 			_pCredText->SetSize(20);
 			_pCredText->setWeight(TEXT_BOLD);
 			_pCredText->setText(buildString("%d", _nCredit));
@@ -257,8 +256,7 @@ ErrorCode  SBarSlotWnd::attach() {
 		if (_pBetText != nullptr) {
 			CBofRect cRect(BetRect.left, BetRect.top, BetRect.right, BetRect.bottom);
 			_pBetText->setupText(&cRect, JUSTIFY_RIGHT, FORMAT_CENTER_RIGHT);
-			_pBetText->setColor(RGB(255, 255, 255));
-
+			_pBetText->setColor(CTEXT_WHITE);
 			_pBetText->SetSize(20);
 			_pBetText->setWeight(TEXT_BOLD);
 			_pBetText->setText(buildString("%d", _nBet));
@@ -275,7 +273,7 @@ ErrorCode  SBarSlotWnd::attach() {
 		if (_pOddsText != nullptr) {
 			CBofRect cRect(OddRect.left, OddRect.top, OddRect.right, OddRect.bottom);
 			_pOddsText->setupText(&cRect, JUSTIFY_RIGHT, FORMAT_CENTER_RIGHT);
-			_pOddsText->setColor(RGB(255, 255, 255));
+			_pOddsText->setColor(CTEXT_WHITE);
 
 			_pOddsText->SetSize(32);
 			_pOddsText->setWeight(TEXT_BOLD);
@@ -411,7 +409,7 @@ void SBarSlotWnd::addBet(int nBetVal) {
 		CBofBitmap cBmp(cRect.width(), cRect.height(), (CBofPalette *)nullptr, false);
 		cBmp.captureScreen(this, &cRect);
 
-		paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
+		paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_WRAP, FORMAT_TOP_LEFT);
 		waitForInput();
 
 		cBmp.paint(this, &cRect);
@@ -441,7 +439,7 @@ void SBarSlotWnd::betAll() {
 		CBofBitmap cBmp(cRect.width(), cRect.height(), (CBofPalette *)nullptr, false);
 		cBmp.captureScreen(this, &cRect);
 
-		paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
+		paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_WRAP, FORMAT_TOP_LEFT);
 		waitForInput();
 
 		cBmp.paint(this, &cRect);
@@ -549,7 +547,7 @@ void SBarSlotWnd::calcOutcome() {
 	// Do we have a winner ?
 	if (_nPayOff1 > 0) {
 		// Play winning audio
-		_pWinSound = new CBofSound(this, BuildSlotDir(WINAUDIO), SOUND_MIX, 1);
+		_pWinSound = new CBofSound(this, BuildSlotDir(WIN_AUDIO), SOUND_MIX, 1);
 		if (_pWinSound != nullptr) {
 			_pWinSound->play();
 		} else {
@@ -909,7 +907,7 @@ const char *BuildSlotDir(const char *pszFile) {
 	static char szBuf[MAX_DIRPATH];
 
 	// Where Slot assets
-	Common::sprintf_s(szBuf, "%s%s%s", BGCBDIR, PATH_DELIMETER, pszFile);
+	Common::sprintf_s(szBuf, "%s%s%s", BGCB_DIR, PATH_DELIMETER, pszFile);
 
 	CBofString sSlotDir(szBuf, MAX_DIRPATH);
 	MACROREPLACE(sSlotDir);
diff --git a/engines/bagel/spacebar/sraf_computer.cpp b/engines/bagel/spacebar/sraf_computer.cpp
index 5e2c8781e7f..d81abebba44 100644
--- a/engines/bagel/spacebar/sraf_computer.cpp
+++ b/engines/bagel/spacebar/sraf_computer.cpp
@@ -499,7 +499,7 @@ SrafComputer::SrafComputer() :
 	gStafferDisplay(0, 0, 640 - 1, 480 - 1), gSrafTextWindow(0, 440, 640 - 1, 480 - 1) {
 	int i;
 
-	_cTextColor = RGB(255, 255, 255);			// Start out with white as our text color
+	_cTextColor = CTEXT_WHITE;			// Start out with white as our text color
 	_cTextHiliteColor = RGB(255, 255, 255);	// and some other color as our hilite
 	_cTextLineColor = RGB(0xFF, 0xFF, 0x00);
 
@@ -4616,7 +4616,7 @@ int SrafTextScreen::createTextScreen(CBofWindow *pParent) {
 
 	if ((_pTextBox = new CBofTextBox(this, &cRect, _text)) != nullptr) {
 		_pTextBox->setPageLength(24);
-		_pTextBox->setColor(RGB(255, 255, 255));
+		_pTextBox->setColor(CTEXT_WHITE);
 		_pTextBox->setFont(FONT_MONO);
 		_pTextBox->setPointSize(FONT_14POINT);
 	} else {
diff --git a/engines/bagel/spacebar/vid_wnd.cpp b/engines/bagel/spacebar/vid_wnd.cpp
index 9a021f5c2a8..24e76a0e06a 100644
--- a/engines/bagel/spacebar/vid_wnd.cpp
+++ b/engines/bagel/spacebar/vid_wnd.cpp
@@ -36,7 +36,7 @@ namespace SpaceBar {
 #define START_TIME1 174000
 #define END_TIME1   225000
 
-#define CLOSEUPVIDEODIR     "$SBARDIR\\BAR\\CLOSEUP\\BRCC2\\"
+#define CLOSEUP_VIDEO_DIR     "$SBARDIR\\BAR\\CLOSEUP\\BRCC2\\"
 
 #define NUM_FRAME_TYPES 11
 
@@ -284,7 +284,7 @@ ErrorCode SBarVidWnd::onRender(CBofBitmap *pBmp, CBofRect *pRect) {
 
 		Common::sprintf_s(szBuf, "%02d:%02d:%02d", nHr, nMn, nSc);
 
-		paintText(pBmp, &cRect, szBuf, 14, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_DEFAULT, FONT_MONO);
+		paintText(pBmp, &cRect, szBuf, 14, TEXT_NORMAL, CTEXT_WHITE, JUSTIFY_WRAP, FORMAT_DEFAULT, FONT_MONO);
 	}
 
 	return _errCode;
@@ -300,7 +300,7 @@ CBagObject *SBarVidWnd::onNewButtonObject(const CBofString &) {
 
 
 const char *BuildVidDir(const char *pszFile) {
-	return formPath(CLOSEUPVIDEODIR, pszFile);
+	return formPath(CLOSEUP_VIDEO_DIR, pszFile);
 }
 
 


Commit: 1201cc4c3d6bf7d0c0c5c00cc3ebad55e5a2d5b0
    https://github.com/scummvm/scummvm/commit/1201cc4c3d6bf7d0c0c5c00cc3ebad55e5a2d5b0
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-06T13:03:00+01:00

Commit Message:
BAGEL: Remove useless null checks before deleting in slot_wnd

Changed paths:
    engines/bagel/spacebar/slot_wnd.cpp


diff --git a/engines/bagel/spacebar/slot_wnd.cpp b/engines/bagel/spacebar/slot_wnd.cpp
index 335a034df80..878cf10d436 100644
--- a/engines/bagel/spacebar/slot_wnd.cpp
+++ b/engines/bagel/spacebar/slot_wnd.cpp
@@ -346,33 +346,23 @@ ErrorCode SBarSlotWnd::detach() {
 		}
 	}
 
-	if (_pCredText != nullptr) {
-		delete _pCredText;
-		_pCredText = nullptr;
-	}
-	if (_pBetText != nullptr) {
-		delete _pBetText;
-		_pBetText = nullptr;
-	}
+	delete _pCredText;
+	_pCredText = nullptr;
 
-	if (_bFixBmp != nullptr) {
-		delete _bFixBmp;
-		_bFixBmp = nullptr;
-	}
+	delete _pBetText;
+	_pBetText = nullptr;
 
-	if (_pWinSound != nullptr) {
-		delete _pWinSound;
-		_pWinSound = nullptr;
-	}
+	delete _bFixBmp;
+	_bFixBmp = nullptr;
 
-	if (_pSlotSound != nullptr) {
-		delete _pSlotSound;
-		_pSlotSound = nullptr;
-	}
-	if (_pOddsText != nullptr) {
-		delete _pOddsText;
-		_pOddsText = nullptr;
-	}
+	delete _pWinSound;
+	_pWinSound = nullptr;
+
+	delete _pSlotSound;
+	_pSlotSound = nullptr;
+
+	delete _pOddsText;
+	_pOddsText = nullptr;
 
 	CBagStorageDevWnd::detach();
 


Commit: f471847e24e2fcf9a1e4632be25ab4cf6a3d10d9
    https://github.com/scummvm/scummvm/commit/f471847e24e2fcf9a1e4632be25ab4cf6a3d10d9
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-06T13:03:00+01:00

Commit Message:
BAGEL: some renaming in sraf_computer, add some missing override

Changed paths:
    engines/bagel/spacebar/sraf_computer.cpp
    engines/bagel/spacebar/sraf_computer.h


diff --git a/engines/bagel/spacebar/sraf_computer.cpp b/engines/bagel/spacebar/sraf_computer.cpp
index d81abebba44..06d5343a05d 100644
--- a/engines/bagel/spacebar/sraf_computer.cpp
+++ b/engines/bagel/spacebar/sraf_computer.cpp
@@ -501,11 +501,11 @@ SrafComputer::SrafComputer() :
 
 	_cTextColor = CTEXT_WHITE;			// Start out with white as our text color
 	_cTextHiliteColor = RGB(255, 255, 255);	// and some other color as our hilite
-	_cTextLineColor = RGB(0xFF, 0xFF, 0x00);
+	_cTextLineColor = CTEXT_YELLOW;
 
 	// Computer starts as off and at the main screen
-	_eMode = SCOFF;
-	_eCurScreen = SCMAIN;
+	_eMode = SC_OFF;
+	_eCurScreen = SC_MAIN;
 
 	// initialize our three buttons
 	for (i = 0; i < NUM_SRAFCOMPBUTT; i++) {
@@ -886,7 +886,7 @@ void SrafComputer::onPaint(CBofRect *pRect) {
 		paintBackdrop();
 	}
 
-	if (_eMode == SCOFF) {
+	if (_eMode == SC_OFF) {
 		_pButtons[ON_BUTTON]->paint(nullptr);
 	} else {
 		_pButtons[OFF_BUTTON]->paint(nullptr);
@@ -979,7 +979,7 @@ ErrorCode SrafComputer::attach() {
 
 ErrorCode SrafComputer::detach() {
 	// Computer gets turned off
-	_eMode = SCOFF;
+	_eMode = SC_OFF;
 
 	// Get rid of the system cursor
 	if (_bSrafAttached) {
@@ -1055,7 +1055,7 @@ void SrafComputer::onKeyHit(uint32 lKey, uint32 nRepCount) {
 	switch (lKey) {
 	case BKEY_BACK:                 // Temporary, go back to main screen.
 		deleteListBox();
-		_eCurScreen = SCMAIN;
+		_eCurScreen = SC_MAIN;
 		break;
 
 	case BKEY_ALT_q:
@@ -1085,43 +1085,43 @@ void SrafComputer::onBofButton(CBofObject *pObject, int nState) {
 	CBofButton *pButton = (CBofButton *)pObject;
 
 	switch (_eCurScreen) {
-	case SCMAIN:
+	case SC_MAIN:
 		onButtonMainScreen(pButton, nState);
 		break;
-	case SCDEAL:
+	case SC_DEAL:
 		onButtonDealSummary(pButton, nState);
 		break;
-	case SCBIDS:
+	case SC_BIDS:
 		onButtonBuyerBids(pButton, nState);
 		break;
-	case SCBACKGROUNDDATA:
+	case SC_BACKGROUND_DATA:
 		onButtonDealBackground(pButton, nState);
 		break;
-	case SCSELLER_BIOS:
+	case SC_SELLER_BIOS:
 		onButtonSellerBios(pButton, nState);
 		break;
-	case SCOTHER_BIOS:
+	case SC_OTHER_BIOS:
 		onButtonOtherBios(pButton, nState);
 		break;
-	case SCSTAFF_BIOS:
+	case SC_STAFF_BIOS:
 		onButtonStaffBios(pButton, nState);
 		break;
-	case SCDISPATCH:
+	case SC_DISPATCH:
 		onButtonDispatchTeam(pButton, nState);
 		break;
-	case SCEMAIL:
+	case SC_EMAIL:
 		onButtonCurrentEMail(pButton, nState);
 		break;
-	case SCAUDIO:
+	case SC_AUDIO:
 		onButtonAudioSettings(pButton, nState);
 		break;
-	case SCORDER:
+	case SC_ORDER:
 		onButtonRoboButler(pButton, nState);
 		break;
-	case SCCHECK_TEAMS:
+	case SC_CHECK_TEAMS:
 		onButtonCheckTeams(pButton, nState);
 		break;
-	case SCCODE_WORDS:
+	case SC_CODE_WORDS:
 		onButtonCodeWords(pButton, nState);
 		break;
 	default:
@@ -1131,14 +1131,14 @@ void SrafComputer::onBofButton(CBofObject *pObject, int nState) {
 
 
 void SrafComputer::setOn() {
-	_eMode = SCON;
+	_eMode = SC_ON;
 
 	activateMainScreen();
 }
 
 void SrafComputer::setOff() {
-	if (_eMode != SCOFF) {
-		_eMode = SCOFF;
+	if (_eMode != SC_OFF) {
+		_eMode = SC_OFF;
 
 		_pButtons[QUIT_BUTTON]->hide();
 		_pButtons[OFF_BUTTON]->hide();
@@ -1212,43 +1212,43 @@ void SrafComputer::onBofListBox(CBofObject * /*pListBox*/, int nItemIndex) {
 
 	// Do all kinds of neat things based on our current screen.
 	switch (_eCurScreen) {
-	case SCMAIN:
+	case SC_MAIN:
 		onListMainScreen();
 		break;
-	case SCDEAL:
+	case SC_DEAL:
 		onListDealSummary();
 		break;
-	case SCBIDS:
+	case SC_BIDS:
 		onListBuyerBids();
 		break;
-	case SCBACKGROUNDDATA:
+	case SC_BACKGROUND_DATA:
 		onListDealBackground();
 		break;
-	case SCSELLER_BIOS:
+	case SC_SELLER_BIOS:
 		onListSellerBios();
 		break;
-	case SCOTHER_BIOS:
+	case SC_OTHER_BIOS:
 		onListOtherBios();
 		break;
-	case SCSTAFF_BIOS:
+	case SC_STAFF_BIOS:
 		onListStaffBios();
 		break;
-	case SCDISPATCH:
+	case SC_DISPATCH:
 		onListDispatchTeam();
 		break;
-	case SCEMAIL:
+	case SC_EMAIL:
 		onListCurrentEMail();
 		break;
-	case SCAUDIO:
+	case SC_AUDIO:
 		onListAudioSettings();
 		break;
-	case SCORDER:
+	case SC_ORDER:
 		onListRoboButler();
 		break;
-	case SCCHECK_TEAMS:
+	case SC_CHECK_TEAMS:
 		onListCheckTeams();
 		break;
-	case SCCODE_WORDS:
+	case SC_CODE_WORDS:
 		onListCodeWords();
 		break;
 	default:
@@ -1265,7 +1265,7 @@ void SrafComputer::activateDealSummary() {
 	CBofString sStr(szLocalBuff, 256);
 
 	// Current screen is now the DEAL screen.
-	_eCurScreen = SCDEAL;
+	_eCurScreen = SC_DEAL;
 
 	// initialize point size and item height
 	_nListPointSize = kBuyerBidsPointSize;
@@ -1437,7 +1437,7 @@ void SrafComputer::activateBuyerBids() {
 	CBofString sStr(szLocalBuff, 256);
 
 	// Current screen is now the BIDS screen.
-	_eCurScreen = SCBIDS;
+	_eCurScreen = SC_BIDS;
 
 	// initialize point size and item height
 	_nListPointSize = kBuyerBidsPointSize;
@@ -1514,7 +1514,7 @@ void SrafComputer::activateDealBackground() {
 	szLocalBuff[0] = '\0';
 	CBofString sStr(szLocalBuff, 256);
 
-	_eCurScreen = SCBACKGROUNDDATA;
+	_eCurScreen = SC_BACKGROUND_DATA;
 
 	sStr = buildSrafDir("SRAFDEAL.TXT");
 	displayTextScreen(sStr);
@@ -1536,7 +1536,7 @@ void SrafComputer::activateSellerBios() {
 	CBofString sStr(szLocalBuff, 256);
 
 	// Current screen is now the SELLER BIOS screen.
-	_eCurScreen = SCSELLER_BIOS;
+	_eCurScreen = SC_SELLER_BIOS;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -1581,7 +1581,7 @@ void SrafComputer::activateOtherBios() {
 	CBofString sStr(szLocalBuff, 256);
 
 	// Current screen is now the OTHER BIOS screen.
-	_eCurScreen = SCOTHER_BIOS;
+	_eCurScreen = SC_OTHER_BIOS;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -1625,7 +1625,7 @@ void SrafComputer::activateStaffBios() {
 	CBofString sStr(szLocalBuff, 256);
 
 	// Current screen is now the STAFF BIOS screen.
-	_eCurScreen = SCSTAFF_BIOS;
+	_eCurScreen = SC_STAFF_BIOS;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -1665,7 +1665,7 @@ void SrafComputer::activateStaffBios() {
 
 void SrafComputer::activateDispatchTeam() {
 	// Current screen is now the DISPATCH screen.
-	_eCurScreen = SCDISPATCH;
+	_eCurScreen = SC_DISPATCH;
 
 	// initialize point size and item height
 	_nListPointSize = kBuyerBidsPointSize;
@@ -1884,7 +1884,7 @@ void SrafComputer::activateCurrentEMail() {
 	char szRightCol[256];
 
 	// Current screen is now the EMAIL screen.
-	_eCurScreen = SCEMAIL;
+	_eCurScreen = SC_EMAIL;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -1941,7 +1941,7 @@ void SrafComputer::activateAudioSettings() {
 	CBofString sStr(szLocalBuff, 256);
 
 	// current screen is now the AUDIO screen.
-	_eCurScreen = SCAUDIO;
+	_eCurScreen = SC_AUDIO;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -2004,7 +2004,7 @@ void SrafComputer::activateRoboButler() {
 	char szRightCol[256];
 
 	// Current screen is now the robobutler screen.
-	_eCurScreen = SCORDER;
+	_eCurScreen = SC_ORDER;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -2093,7 +2093,7 @@ void SrafComputer::activateCheckTeams() {
 	CBofString aStr(szAttendeesBuff, 256);
 
 	// Current screen is now the Check teams screen.
-	_eCurScreen = SCCHECK_TEAMS;
+	_eCurScreen = SC_CHECK_TEAMS;
 
 	// initialize point size and item height
 	//
@@ -2363,7 +2363,7 @@ void SrafComputer::activateCodeWords() {
 	char szRightCol[128];
 
 	// Current screen is now the CODE WORDS screen.
-	_eCurScreen = SCCODE_WORDS;
+	_eCurScreen = SC_CODE_WORDS;
 
 	// initialize point size and item height
 	_nListPointSize = kOtherPointSize;
@@ -3658,7 +3658,7 @@ void SrafComputer::deactivateMainScreen() {
 	deleteListBox();
 
 	//  Hide the on/off button
-	if (_eMode == SCON) {
+	if (_eMode == SC_ON) {
 		_pButtons[ON_BUTTON]->hide();
 	} else {
 		_pButtons[OFF_BUTTON]->hide();
@@ -3671,7 +3671,7 @@ void SrafComputer::activateMainScreen() {
 	CBofString sStr(szLocalStr, 256);
 
 	// Current screen is now the MAIN screen.
-	_eCurScreen = SCMAIN;
+	_eCurScreen = SC_MAIN;
 
 	// Delete the list box
 	deleteListBox();
@@ -4409,8 +4409,8 @@ void SrafComputer::setMainScreen() {
 	}
 
 	SrafComputer *srafComp = _pHead;
-	if (srafComp->_eCurScreen == SCBACKGROUNDDATA) {
-		srafComp->_eCurScreen = SCMAIN;
+	if (srafComp->_eCurScreen == SC_BACKGROUND_DATA) {
+		srafComp->_eCurScreen = SC_MAIN;
 	}
 }
 
@@ -4421,7 +4421,7 @@ void SrafComputer::incrementTurnCount() {
 	assert(pVar != nullptr);
 
 	// If the puzzle is already solved, then don't increment.
-	if (_eCurScreen == SCCODE_WORDS) {
+	if (_eCurScreen == SC_CODE_WORDS) {
 		return;
 	}
 
@@ -4432,7 +4432,7 @@ void SrafComputer::incrementTurnCount() {
 	}
 
 	// If we're in a screen that has a time count, then update it here...
-	if (_eCurScreen == SCCHECK_TEAMS || _eCurScreen == SCMAIN) {
+	if (_eCurScreen == SC_CHECK_TEAMS || _eCurScreen == SC_MAIN) {
 		displayTurnCount(gTurncountLineNo);
 	}
 
@@ -4448,21 +4448,21 @@ void SrafComputer::incrementTurnCount() {
 					// If current screen is the check teams screen, then make sure we update
 					// it.
 					switch (_eCurScreen) {
-					case SCCHECK_TEAMS:
+					case SC_CHECK_TEAMS:
 						activateCheckTeams();
 						break;
 
 					// update the buyer bids screen if that's our underlying
 					// guy.
-					case SCBIDS:
+					case SC_BIDS:
 						activateBuyerBids();
 						break;
 
-					case SCDEAL:
+					case SC_DEAL:
 						activateDealSummary();
 						break;
 
-					case SCDISPATCH:
+					case SC_DISPATCH:
 						activateDispatchTeam();
 						break;
 
diff --git a/engines/bagel/spacebar/sraf_computer.h b/engines/bagel/spacebar/sraf_computer.h
index 1d926a3e25f..057c6ded2e5 100644
--- a/engines/bagel/spacebar/sraf_computer.h
+++ b/engines/bagel/spacebar/sraf_computer.h
@@ -143,15 +143,15 @@ class SrafComputer : public CBagStorageDevWnd {
 public:
 	SrafComputer();
 	virtual ~SrafComputer();
-	virtual void onKeyHit(uint32 lKey, uint32 nRepCount);
-	virtual ErrorCode attach();
-	virtual ErrorCode detach();
-	void onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void * = nullptr);
-	void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void * = nullptr);
-	void onMainLoop();
-	void onPaint(CBofRect *pRect);
-	void onBofButton(CBofObject *, int);
-	void onBofListBox(CBofObject *pListBox, int nItemIndex);
+	void onKeyHit(uint32 lKey, uint32 nRepCount) override;
+	ErrorCode attach() override;
+	ErrorCode detach() override;
+	void onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void * = nullptr) override;
+	void onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void * = nullptr) override;
+	void onMainLoop() override;
+	void onPaint(CBofRect *pRect) override;
+	void onBofButton(CBofObject *, int) override;
+	void onBofListBox(CBofObject *pListBox, int nItemIndex) override;
 	void setOn();
 	void setOff();
 	void setQuit();
@@ -286,15 +286,17 @@ public:
 	void restoreSraffanVars();
 
 protected:
-	enum SRAFCOMPMODE {
-		SCON, SCOFF, SCDONE
+	enum SrafCompModeC {
+		SC_ON, SC_OFF, SC_DONE
 	} _eMode;
-	enum SRAFCURSCREEN {
-		SCMAIN, SCDEAL, SCBIDS, SCBACKGROUNDDATA,
-		SCSELLER_BIOS, SCOTHER_BIOS, SCSTAFF_BIOS,
-		SCDISPATCH, SCEMAIL, SCAUDIO, SCORDER,
-		SCCHECK_TEAMS, SCCODE_WORDS
+	
+	enum SrafCurScreen {
+		SC_MAIN, SC_DEAL, SC_BIDS, SC_BACKGROUND_DATA,
+		SC_SELLER_BIOS, SC_OTHER_BIOS, SC_STAFF_BIOS,
+		SC_DISPATCH, SC_EMAIL, SC_AUDIO, SC_ORDER,
+		SC_CHECK_TEAMS, SC_CODE_WORDS
 	} _eCurScreen;
+	
 	CBofBmpButton *_pButtons[NUM_SRAFCOMPBUTT];
 	RGBCOLOR _cTextColor;
 	RGBCOLOR _cTextHiliteColor;




More information about the Scummvm-git-logs mailing list