[Scummvm-git-logs] scummvm master -> 5e72a5f1c598a18292ac13fed43929d2f7281c08
Strangerke
noreply at scummvm.org
Mon May 6 20:44:04 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5e72a5f1c5 BAGEL: Some renaming in base_pda, initialize several variables in the constructor (CIC 1544840 )
Commit: 5e72a5f1c598a18292ac13fed43929d2f7281c08
https://github.com/scummvm/scummvm/commit/5e72a5f1c598a18292ac13fed43929d2f7281c08
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-05-06T21:43:50+01:00
Commit Message:
BAGEL: Some renaming in base_pda, initialize several variables in the constructor (CIC 1544840 )
Changed paths:
engines/bagel/baglib/base_pda.cpp
engines/bagel/baglib/base_pda.h
engines/bagel/baglib/master_win.cpp
engines/bagel/baglib/moo.cpp
engines/bagel/baglib/moo.h
engines/bagel/baglib/movie_object.cpp
engines/bagel/baglib/pda.cpp
engines/bagel/baglib/pda.h
engines/bagel/baglib/rp_object.cpp
engines/bagel/baglib/zoom_pda.cpp
diff --git a/engines/bagel/baglib/base_pda.cpp b/engines/bagel/baglib/base_pda.cpp
index adc6a488dcf..e7611cfc1d5 100644
--- a/engines/bagel/baglib/base_pda.cpp
+++ b/engines/bagel/baglib/base_pda.cpp
@@ -32,14 +32,14 @@
namespace Bagel {
// Init static members
-PDAMODE SBBasePda::_pdaMode;
-PDAPOS SBBasePda::_pdaPos;
-PDAMODE SBBasePda::_holdMode;
+PdaMode SBBasePda::_pdaMode;
+PdaPos SBBasePda::_pdaPos;
+PdaMode SBBasePda::_holdMode;
void SBBasePda::initialize() {
- _pdaMode = NOMODE;
- _pdaPos = UNINITIALIZED;
- _holdMode = NOMODE;
+ _pdaMode = PDA_NO_MODE;
+ _pdaPos = PDA_POS_UNINITIALIZED;
+ _holdMode = PDA_NO_MODE;
}
SBBasePda::SBBasePda(CBofWindow *parent, const CBofRect & /* xRect*/, bool activated) {
@@ -55,9 +55,12 @@ SBBasePda::SBBasePda(CBofWindow *parent, const CBofRect & /* xRect*/, bool activ
_logWnd = nullptr;
_curDisplay = nullptr;
+ _holdDisplay = nullptr;
// Other classes need to know if we're zoomed
setZoomed(false);
+ setDeactivate(false);
+
}
SBBasePda::~SBBasePda() {
@@ -79,7 +82,7 @@ bool SBBasePda::hideCurDisplay() {
_holdMode = _pdaMode;
_curDisplay = nullptr;
- _pdaMode = NOMODE;
+ _pdaMode = PDA_NO_MODE;
setPdaState();
return true;
}
@@ -111,7 +114,7 @@ bool SBBasePda::hideMovie() {
// if we have an inventory window
_mooWnd->setVisible(false);
_curDisplay = nullptr;
- _pdaMode = NOMODE;
+ _pdaMode = PDA_NO_MODE;
setPdaState();
return true;
}
@@ -123,7 +126,7 @@ bool SBBasePda::showMovie() {
synchronizePdaState();
// if we're already playing a movie, then return false
- if (_pdaMode == MOOMODE) {
+ if (_pdaMode == PDA_MOO_MODE) {
return false;
}
@@ -142,7 +145,7 @@ bool SBBasePda::showMovie() {
// Set the current display = Inventory
_curDisplay = _mooWnd;
- _pdaMode = MOOMODE;
+ _pdaMode = PDA_MOO_MODE;
setPdaState();
// Set default state of movie to don't deactivate PDA
@@ -174,7 +177,7 @@ bool SBBasePda::hideInventory() {
if (_invWnd) {
_invWnd->setVisible(false);
_curDisplay = nullptr;
- _pdaMode = NOMODE;
+ _pdaMode = PDA_NO_MODE;
setPdaState();
return true;
}
@@ -199,7 +202,7 @@ bool SBBasePda::showInventory() {
// Set the current display = Inventory
_curDisplay = _invWnd;
- _pdaMode = INVMODE;
+ _pdaMode = PDA_INV_MODE;
setPdaState();
return true;
}
@@ -225,7 +228,7 @@ bool SBBasePda::showMap() {
// Set the current display = Map
_curDisplay = _mapWnd;
- _pdaMode = MAPMODE;
+ _pdaMode = PDA_MAP_MODE;
_mapWnd->attachActiveObjects();
setPdaState();
@@ -246,7 +249,7 @@ bool SBBasePda::hideMap() {
// set the current display to nullptr
_curDisplay = nullptr;
setPdaState();
- _pdaMode = NOMODE;
+ _pdaMode = PDA_NO_MODE;
return true;
}
@@ -275,7 +278,7 @@ bool SBBasePda::showLog() {
// Set the current display = Map
_curDisplay = _logWnd;
- _pdaMode = LOGMODE;
+ _pdaMode = PDA_LOG_MODE;
_logWnd->attachActiveObjects();
setPdaState();
@@ -343,9 +346,9 @@ void *SBBasePda::pdaButtonHandler(int refId, void *info) {
}
void SBBasePda::synchronizePdaState() {
- if (_pdaPos == PDADOWN && isActivated()) {
+ if (_pdaPos == PDA_DOWN && isActivated()) {
deactivate();
- } else if (_pdaPos == PDAUP && isActivated() == false) {
+ } else if (_pdaPos == PDA_UP && isActivated() == false) {
activate();
}
}
@@ -356,7 +359,7 @@ void SBBasePda::activate() {
_activated = true;
}
- _pdaPos = PDAUP;
+ _pdaPos = PDA_UP;
setPdaState();
}
@@ -366,7 +369,7 @@ void SBBasePda::deactivate() {
_activated = false;
}
- _pdaPos = PDADOWN;
+ _pdaPos = PDA_DOWN;
setPdaState();
}
@@ -389,19 +392,19 @@ void SBBasePda::setPdaState() {
curVar = g_VarManager->getVariable(pdaMode);
if (curVar != nullptr) {
switch (_pdaMode) {
- case NOMODE:
+ case PDA_NO_MODE:
curVar->setValue("NOMODE");
break;
- case MAPMODE:
+ case PDA_MAP_MODE:
curVar->setValue("MAPMODE");
break;
- case INVMODE:
+ case PDA_INV_MODE:
curVar->setValue("INVMODE");
break;
- case LOGMODE:
+ case PDA_LOG_MODE:
curVar->setValue("LOGMODE");
break;
- case MOOMODE:
+ case PDA_MOO_MODE:
curVar->setValue("MOOMODE");
break;
}
@@ -410,10 +413,10 @@ void SBBasePda::setPdaState() {
curVar = g_VarManager->getVariable(pdaPos);
if (curVar != nullptr) {
switch (_pdaPos) {
- case PDAUP:
+ case PDA_UP:
curVar->setValue("UP");
break;
- case PDADOWN:
+ case PDA_DOWN:
curVar->setValue("DOWN");
break;
default:
@@ -445,15 +448,15 @@ void SBBasePda::getPdaState() {
// Now set the internal PDA state based on this info.
// If we saved during a movie, then restore to map mode.
if (pdaState.find("MAP") != -1 || pdaState.find("MOO") != -1) {
- _pdaMode = MAPMODE;
+ _pdaMode = PDA_MAP_MODE;
} else if (pdaState.find("INV") != -1) {
- _pdaMode = INVMODE;
+ _pdaMode = PDA_INV_MODE;
} else if (pdaState.find("LOG") != -1) {
- _pdaMode = LOGMODE;
+ _pdaMode = PDA_LOG_MODE;
} else if (pdaState.find("MOO") != -1) {
- _pdaMode = MOOMODE;
+ _pdaMode = PDA_MOO_MODE;
} else {
- _pdaMode = NOMODE;
+ _pdaMode = PDA_NO_MODE;
}
}
@@ -462,9 +465,9 @@ void SBBasePda::getPdaState() {
if (curVar) {
pdaState = curVar->getValue();
if (pdaState.find("UP") != -1) {
- _pdaPos = PDAUP;
+ _pdaPos = PDA_UP;
} else {
- _pdaPos = PDADOWN;
+ _pdaPos = PDA_DOWN;
}
}
}
@@ -481,9 +484,9 @@ int SBBasePda::getProperCursor(const CBofPoint &pos, CBofRect &pdaRect) {
// If we're in the map, return the nullptr cursor, if on the pda but not in the
// map window, return the hand. Same rules for nomode.
switch (_pdaMode) {
- case MAPMODE:
- case NOMODE:
- case MOOMODE:
+ case PDA_MAP_MODE:
+ case PDA_NO_MODE:
+ case PDA_MOO_MODE:
if (_mapWnd) {
CBofRect pdaViewRect = _mapWnd->getRect() + pdaRect.topLeft();
if (pdaViewRect.ptInRect(pos)) {
@@ -496,10 +499,10 @@ int SBBasePda::getProperCursor(const CBofPoint &pos, CBofRect &pdaRect) {
}
break;
- case INVMODE:
- case LOGMODE:
+ case PDA_INV_MODE:
+ case PDA_LOG_MODE:
// Make sure our cur display is synchronized.
- assert(_pdaMode == INVMODE ? _curDisplay == _invWnd : _curDisplay == _logWnd);
+ assert(_pdaMode == PDA_INV_MODE ? _curDisplay == _invWnd : _curDisplay == _logWnd);
// If we have a display, then parouse its list and see if we're over something worth
// mousedowning on.
@@ -527,7 +530,7 @@ int SBBasePda::getProperCursor(const CBofPoint &pos, CBofRect &pdaRect) {
}
}
- if (_pdaMode == LOGMODE) {
+ if (_pdaMode == PDA_LOG_MODE) {
if (overObj) {
return overObj->getOverCursor();
}
@@ -536,7 +539,7 @@ int SBBasePda::getProperCursor(const CBofPoint &pos, CBofRect &pdaRect) {
}
}
- if (_pdaMode == INVMODE) {
+ if (_pdaMode == PDA_INV_MODE) {
if (wieldCursor >= 0) {
return wieldCursor;
}
diff --git a/engines/bagel/baglib/base_pda.h b/engines/bagel/baglib/base_pda.h
index 108636954c4..6a5a2a83e8a 100644
--- a/engines/bagel/baglib/base_pda.h
+++ b/engines/bagel/baglib/base_pda.h
@@ -36,24 +36,24 @@ namespace Bagel {
#define PDA_MSGLIGHT (110)
#define PDA_ZOOMFLASH "ZOOMFLASH"
-enum PDAMODE {
- NOMODE,
- MAPMODE,
- INVMODE,
- LOGMODE,
- MOOMODE
+enum PdaMode {
+ PDA_NO_MODE,
+ PDA_MAP_MODE,
+ PDA_INV_MODE,
+ PDA_LOG_MODE,
+ PDA_MOO_MODE
};
-enum PDAPOS {
- UNINITIALIZED,
- PDAUP,
- PDADOWN
+enum PdaPos {
+ PDA_POS_UNINITIALIZED,
+ PDA_UP,
+ PDA_DOWN
};
class SBBasePda {
protected:
// All PDA's in the game should share the same mode
- static PDAMODE _pdaMode;
- static PDAPOS _pdaPos;
+ static PdaMode _pdaMode;
+ static PdaPos _pdaPos;
int _numMoves;
int _activating;
bool _activated;
@@ -64,12 +64,12 @@ protected:
CBagStorageDevBmp *_logWnd; // Pointer to the Map object
CBagStorageDevBmp *_curDisplay; // Pointer to the object currently displayed in PDA
CBofWindow *_parent;
- bool _zoomed;
- bool _deactivate; // should we deactivate when done w/movie?
+ bool _zoomedFl;
+ bool _deactivateFl; // should we deactivate when done w/movie?
// hold this info for restore method
CBagStorageDevBmp *_holdDisplay;
- static PDAMODE _holdMode;
+ static PdaMode _holdMode;
public:
SBBasePda(CBofWindow *parent = nullptr, const CBofRect &rect = CBofRect(), bool activated = false);
@@ -79,10 +79,10 @@ public:
/**
* Allows PDA mode to be set by script
*/
- static void setPdaMode(PDAMODE pdaMode) {
+ static void setPdaMode(PdaMode pdaMode) {
_pdaMode = pdaMode;
}
- static PDAMODE getPdaMode() {
+ static PdaMode getPdaMode() {
return _pdaMode;
}
bool isActivated() {
@@ -136,11 +136,11 @@ public:
void stopMovie(bool bResetPDA);
void setDeactivate(bool b) {
- _deactivate = b;
+ _deactivateFl = b;
}
bool getDeactivate() {
- return _deactivate;
+ return _deactivateFl;
}
/**
@@ -182,10 +182,10 @@ public:
void getPdaState();
void setZoomed(bool newVal) {
- _zoomed = newVal;
+ _zoomedFl = newVal;
}
bool getZoomed() {
- return _zoomed;
+ return _zoomedFl;
}
int getProperCursor(const CBofPoint &pos, CBofRect &pdaRect);
diff --git a/engines/bagel/baglib/master_win.cpp b/engines/bagel/baglib/master_win.cpp
index 3ed7c5dd448..fb959e2ea23 100644
--- a/engines/bagel/baglib/master_win.cpp
+++ b/engines/bagel/baglib/master_win.cpp
@@ -830,11 +830,11 @@ ErrorCode CBagMasterWin::loadFileFromStream(CBagIfstream &input, const CBofStrin
getAlphaNumFromStream(input, pdaState);
if (pdaState.find("MAP") != -1) {
- SBBasePda::setPdaMode(MAPMODE);
+ SBBasePda::setPdaMode(PDA_MAP_MODE);
} else if (pdaState.find("INV") != -1) {
- SBBasePda::setPdaMode(INVMODE);
+ SBBasePda::setPdaMode(PDA_INV_MODE);
} else if (pdaState.find("LOG") != -1) {
- SBBasePda::setPdaMode(LOGMODE);
+ SBBasePda::setPdaMode(PDA_LOG_MODE);
}
logInfo(buildString("PDASTATE = %s", pdaStateBuf));
}
diff --git a/engines/bagel/baglib/moo.cpp b/engines/bagel/baglib/moo.cpp
index 734d5f7cd0b..8e1d8e759bb 100644
--- a/engines/bagel/baglib/moo.cpp
+++ b/engines/bagel/baglib/moo.cpp
@@ -26,13 +26,13 @@
namespace Bagel {
CBagCharacterObject *CBagMoo::_pMovie;
-PDAMODE CBagMoo::_eSavePDAMode;
-PDAPOS CBagMoo::_eSavePDAPos;
+PdaMode CBagMoo::_eSavePDAMode;
+PdaPos CBagMoo::_eSavePDAPos;
void CBagMoo::initialize() {
_pMovie = nullptr;
- _eSavePDAMode = NOMODE;
- _eSavePDAPos = UNINITIALIZED;
+ _eSavePDAMode = PDA_NO_MODE;
+ _eSavePDAPos = PDA_POS_UNINITIALIZED;
}
ErrorCode CBagMoo::update(CBofBitmap *pBmp, CBofPoint /*pt*/, CBofRect *pSrcRect, int nMaskColor) {
@@ -54,10 +54,8 @@ ErrorCode CBagMoo::update(CBofBitmap *pBmp, CBofPoint /*pt*/, CBofRect *pSrcRect
CBagMoo::~CBagMoo() {
// Can possibly have a movie left over.
- if (_pMovie) {
- delete _pMovie;
- _pMovie = nullptr;
- }
+ delete _pMovie;
+ _pMovie = nullptr;
}
ErrorCode CBagMoo::setPDAMovie(CBofString &s) {
@@ -94,19 +92,19 @@ void CBagMoo::stopMovie(bool bResetPDA) {
if (pPDA) {
// Assume this marks the end of the movie.
switch (_eSavePDAMode) {
- case MAPMODE:
+ case PDA_MAP_MODE:
pPDA->showMap();
break;
- case INVMODE:
+ case PDA_INV_MODE:
pPDA->showInventory();
break;
- case LOGMODE:
+ case PDA_LOG_MODE:
pPDA->showLog();
break;
- case NOMODE:
+ case PDA_NO_MODE:
default:
pPDA->hideMovie();
break;
diff --git a/engines/bagel/baglib/moo.h b/engines/bagel/baglib/moo.h
index d5ba15319de..96f6e2bfbef 100644
--- a/engines/bagel/baglib/moo.h
+++ b/engines/bagel/baglib/moo.h
@@ -33,8 +33,8 @@ class CBagMoo : public CBagStorageDevBmp {
protected:
private:
static CBagCharacterObject *_pMovie;
- static PDAMODE _eSavePDAMode;
- static PDAPOS _eSavePDAPos;
+ static PdaMode _eSavePDAMode;
+ static PdaPos _eSavePDAPos;
public:
CBagMoo() : CBagStorageDevBmp() {}
@@ -59,10 +59,10 @@ public:
return _pMovie != nullptr;
}
- void savePDAMode(PDAMODE pdaMode) {
+ void savePDAMode(PdaMode pdaMode) {
_eSavePDAMode = pdaMode;
}
- void savePDAPosition(PDAPOS pdaPos) {
+ void savePDAPosition(PdaPos pdaPos) {
_eSavePDAPos = pdaPos;
}
};
diff --git a/engines/bagel/baglib/movie_object.cpp b/engines/bagel/baglib/movie_object.cpp
index bd122230769..e84cc63b742 100644
--- a/engines/bagel/baglib/movie_object.cpp
+++ b/engines/bagel/baglib/movie_object.cpp
@@ -555,7 +555,7 @@ bool CBagMovieObject::asynchPDAMovieCanPlay() {
if (pPDAz->getZoomed() || // We're zoomed
(pMainWin->isCIC() && !isDontOverride()) || // We're in a character closeup
CBofSound::soundsPlayingNotOver() || // A sound is playing
- pPDA->getPdaMode() == MOOMODE) { // An asynch movie is already playing
+ pPDA->getPdaMode() == PDA_MOO_MODE) { // An asynch movie is already playing
bCanPlay = false;
}
}
diff --git a/engines/bagel/baglib/pda.cpp b/engines/bagel/baglib/pda.cpp
index 96cd7dcea07..53edcb9111b 100644
--- a/engines/bagel/baglib/pda.cpp
+++ b/engines/bagel/baglib/pda.cpp
@@ -179,11 +179,11 @@ ErrorCode CBagPDA::attach() {
rc = _logWnd->attach();
}
}
- if (_pdaMode == INVMODE) {
+ if (_pdaMode == PDA_INV_MODE) {
showInventory();
- } else if (_pdaMode == MAPMODE) {
+ } else if (_pdaMode == PDA_MAP_MODE) {
showMap();
- } else if (_pdaMode == LOGMODE) {
+ } else if (_pdaMode == PDA_LOG_MODE) {
showLog();
}
@@ -267,13 +267,13 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
}
// We have gotten back from a zoom and we need to straighten up
- if (SBBasePda::_pdaMode == INVMODE && _curDisplay != _invWnd) {
+ if (SBBasePda::_pdaMode == PDA_INV_MODE && _curDisplay != _invWnd) {
showInventory();
- } else if (SBBasePda::_pdaMode == MAPMODE && _curDisplay != _mapWnd) {
+ } else if (SBBasePda::_pdaMode == PDA_MAP_MODE && _curDisplay != _mapWnd) {
showMap();
- } else if (SBBasePda::_pdaMode == LOGMODE && _curDisplay != _logWnd) {
+ } else if (SBBasePda::_pdaMode == PDA_LOG_MODE && _curDisplay != _logWnd) {
showLog();
}
@@ -282,8 +282,8 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
bool bMoviePlaying = false;
if ((!isActivated()) && // Must be down
- ((_pdaMode == MAPMODE) ||
- (bIsMovieWaiting && _pdaMode != MOOMODE))) {
+ ((_pdaMode == PDA_MAP_MODE) ||
+ (bIsMovieWaiting && _pdaMode != PDA_MOO_MODE))) {
// Reset to reflect we know it happened
setPreFiltered(false);
@@ -292,7 +292,7 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
if (bIsMovieWaiting == true) {
runWaitingMovie();
}
- } else if (_pdaMode == MOOMODE) {
+ } else if (_pdaMode == PDA_MOO_MODE) {
// If we're playing a pda movie, then make sure we continue to update.
bMoviePlaying = true;
bUpdate = true;
@@ -309,7 +309,7 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
if (isActivating() || bWandAnimating || bMoviePlaying) {
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
((CBagPanWindow *)pMainWin)->setPreFilterPan(true);
- } else if (!isActivated() && (SBBasePda::_pdaMode != MAPMODE)) {
+ } else if (!isActivated() && (SBBasePda::_pdaMode != PDA_MAP_MODE)) {
// If it is not activated, then don't bother redrawing it or the objects
// inside of it.
setDirty(false);
@@ -339,7 +339,7 @@ bool CBagPDA::isInside(const CBofPoint &xPoint) {
void CBagPDA::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info) {
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
- if (!isActivated() && _pdaMode != INVMODE) { // if the PDA is not active, activate it
+ if (!isActivated() && _pdaMode != PDA_INV_MODE) { // if the PDA is not active, activate it
if (isInside(*xPoint)) {
// Make sure the entire screen gets redrawn for an activate
((CBagPanWindow *)pMainWin)->setPreFilterPan(true);
@@ -359,7 +359,7 @@ void CBagPDA::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info) {
_curDisplay->onLButtonUp(nFlags, &RealPt, info);
} else {
// if not in the PDA view port then check and make sure it is activated.
- if (SBBasePda::_pdaMode == INVMODE && !isActivated()) {
+ if (SBBasePda::_pdaMode == PDA_INV_MODE && !isActivated()) {
if (isInside(*xPoint)) {
// Make sure the entire screen gets redrawn for an activate
((CBagPanWindow *)pMainWin)->setPreFilterPan(true);
@@ -387,7 +387,7 @@ void CBagPDA::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info) {
}
// Deactivate the PDA if we didn't hit a button.
- if (bButtonHit || _pdaMode == NOMODE) {
+ if (bButtonHit || _pdaMode == PDA_NO_MODE) {
CBagStorageDevBmp::onLButtonUp(nFlags, xPoint, info);
} else {
((CBagPanWindow *)pMainWin)->setPreFilterPan(true);
@@ -463,7 +463,7 @@ void CBagPDA::handleZoomButton(bool bButtonDown) {
// Only change the flashing state if we're not in a button down situation
if (pZoomFlash && pZoomRegular && pZoomRegular->getState() != 1) {
- if (bButtonDown == false && _pdaMode == INVMODE && (_pdaPos == PDAUP) && _invWnd && _invWnd->getNumFloatPages() > 1) {
+ if (bButtonDown == false && _pdaMode == PDA_INV_MODE && (_pdaPos == PDA_UP) && _invWnd && _invWnd->getNumFloatPages() > 1) {
// Make the zoom button blink, to indicate more icons
if (_flashingFl == false) {
// Don't allow attachActiveObjects() to be called in here
diff --git a/engines/bagel/baglib/pda.h b/engines/bagel/baglib/pda.h
index 2fd207ba8ad..3d248ab1ed8 100644
--- a/engines/bagel/baglib/pda.h
+++ b/engines/bagel/baglib/pda.h
@@ -129,7 +129,7 @@ public:
static bool isMovieWaiting();
static bool isMoviePlaying() {
- return _pdaMode == MOOMODE;
+ return _pdaMode == PDA_MOO_MODE;
}
static void runWaitingMovie();
diff --git a/engines/bagel/baglib/rp_object.cpp b/engines/bagel/baglib/rp_object.cpp
index 237f7c26f0c..d509f7bd127 100644
--- a/engines/bagel/baglib/rp_object.cpp
+++ b/engines/bagel/baglib/rp_object.cpp
@@ -524,7 +524,7 @@ int CBagRPObject::runResiduePrintedQueue() {
}
// The first part of this static should only run if the log is frontmost.
- if (SBBasePda::getPdaMode() == LOGMODE) {
+ if (SBBasePda::getPdaMode() == PDA_LOG_MODE) {
// If our script switched us to the main menu, then make sure that we
// have a chance to deactivate anything that we have active.
RPStates prevRPState = _eRPMode;
diff --git a/engines/bagel/baglib/zoom_pda.cpp b/engines/bagel/baglib/zoom_pda.cpp
index 5db24e0fdfb..a0818b4a402 100644
--- a/engines/bagel/baglib/zoom_pda.cpp
+++ b/engines/bagel/baglib/zoom_pda.cpp
@@ -207,11 +207,11 @@ ErrorCode SBZoomPda::attach() {
_logWnd->attachActiveObjects();
}
- if (_pdaMode == INVMODE) {
+ if (_pdaMode == PDA_INV_MODE) {
showInventory();
- } else if (_pdaMode == MAPMODE) {
+ } else if (_pdaMode == PDA_MAP_MODE) {
showMap();
- } else if (_pdaMode == LOGMODE) {
+ } else if (_pdaMode == PDA_LOG_MODE) {
showLog();
}
@@ -263,7 +263,7 @@ void SBZoomPda::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *) {
_curDisplay->onLButtonUp(nFlags, xPoint, nullptr);
} else {
// We have no mode yet, then pass it to the default method
- if (_pdaMode == NOMODE) {
+ if (_pdaMode == PDA_NO_MODE) {
CBagStorageDevWnd::onLButtonUp(nFlags, xPoint);
}
}
@@ -295,7 +295,7 @@ void SBZoomPda::onMainLoop() {
uint32 nCurTime = getTimer();
// Force an update every 1/4 second
- if (_pdaMode == INVMODE || _pdaMode == MAPMODE) {
+ if (_pdaMode == PDA_INV_MODE || _pdaMode == PDA_MAP_MODE) {
if (nCurTime > (g_lZoomPDALastUpdate + 250)) {
g_lZoomPDALastUpdate = nCurTime;
More information about the Scummvm-git-logs
mailing list