mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 01:07:22 +00:00
BAGEL: Renaming in master_win.h
This commit is contained in:
parent
a010ca9fd8
commit
922378204d
@ -152,7 +152,7 @@ bool BagelEngine::canSaveGameStateCurrently(Common::U32String *msg) {
|
||||
}
|
||||
|
||||
Common::Error BagelEngine::saveGameState(int slot, const Common::String &desc, bool isAutosave) {
|
||||
_masterWin->FillSaveBuffer(&_saveData);
|
||||
_masterWin->fillSaveBuffer(&_saveData);
|
||||
|
||||
return Engine::saveGameState(slot, desc, isAutosave);
|
||||
}
|
||||
@ -167,7 +167,7 @@ Common::Error BagelEngine::loadGameState(int slot) {
|
||||
Common::Error result = Engine::loadGameState(slot);
|
||||
|
||||
if (result.getCode() == Common::kNoError) {
|
||||
_masterWin->DoRestore(&_saveData);
|
||||
_masterWin->doRestore(&_saveData);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -317,7 +317,7 @@ void *SBBasePda::pdaButtonHandler(int refId, void *info) {
|
||||
if (curApp != nullptr) {
|
||||
CBagMasterWin *curWnd = curApp->getMasterWnd();
|
||||
if (curWnd != nullptr) {
|
||||
curWnd->postUserMessage(WM_SHOWSYSTEMDLG, 0);
|
||||
curWnd->postUserMessage(WM_SHOW_SYSTEM_DLG, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -374,7 +374,7 @@ void SBBasePda::setPdaState() {
|
||||
const char *pdaMode;
|
||||
const char *pdaPos;
|
||||
|
||||
CBagVar *curVar = VARMNGR->GetVariable("INBAR");
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable("INBAR");
|
||||
|
||||
if (curVar != nullptr) {
|
||||
// Defined as global
|
||||
@ -386,7 +386,7 @@ void SBBasePda::setPdaState() {
|
||||
}
|
||||
|
||||
// Save the pda state and position
|
||||
curVar = VARMNGR->GetVariable(pdaMode);
|
||||
curVar = VAR_MANAGER->GetVariable(pdaMode);
|
||||
if (curVar != nullptr) {
|
||||
switch (_pdaMode) {
|
||||
case NOMODE:
|
||||
@ -407,7 +407,7 @@ void SBBasePda::setPdaState() {
|
||||
}
|
||||
}
|
||||
|
||||
curVar = VARMNGR->GetVariable(pdaPos);
|
||||
curVar = VAR_MANAGER->GetVariable(pdaPos);
|
||||
if (curVar != nullptr) {
|
||||
switch (_pdaPos) {
|
||||
case PDAUP:
|
||||
@ -428,7 +428,7 @@ void SBBasePda::getPdaState() {
|
||||
const char *pdaMode;
|
||||
const char *pdaPos;
|
||||
|
||||
CBagVar *curVar = VARMNGR->GetVariable("INBAR");
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable("INBAR");
|
||||
|
||||
if (curVar != nullptr) {
|
||||
// Defined as global
|
||||
@ -439,7 +439,7 @@ void SBBasePda::getPdaState() {
|
||||
pdaPos = "PDAPOSITION";
|
||||
}
|
||||
|
||||
curVar = VARMNGR->GetVariable(pdaMode);
|
||||
curVar = VAR_MANAGER->GetVariable(pdaMode);
|
||||
if (curVar) {
|
||||
pdaState = curVar->GetValue();
|
||||
// Now set the internal PDA state based on this info.
|
||||
@ -458,7 +458,7 @@ void SBBasePda::getPdaState() {
|
||||
}
|
||||
|
||||
// Get the PDA up/down position
|
||||
curVar = VARMNGR->GetVariable(pdaPos);
|
||||
curVar = VAR_MANAGER->GetVariable(pdaPos);
|
||||
if (curVar) {
|
||||
pdaState = curVar->GetValue();
|
||||
if (pdaState.Find("UP") != -1) {
|
||||
|
@ -138,7 +138,7 @@ void CBagButtonObject::onLButtonDown(uint32 /*nFlags*/, CBofPoint *point, void *
|
||||
}
|
||||
|
||||
void CBagButtonObject::onLButtonUp(uint32 flags, CBofPoint *point, void *extraInfo) {
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
|
||||
if (pMainWin != nullptr) {
|
||||
pMainWin->SetPreFilterPan(true);
|
||||
@ -212,7 +212,7 @@ void CBagButtonObject::onLButtonUp(uint32 flags, CBofPoint *point, void *extraIn
|
||||
}
|
||||
|
||||
bool CBagButtonObject::onMouseMove(uint32 /*nFlags*/, CBofPoint point, void *extraInfo) {
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
|
||||
if (_buttonType == BTN_SLIDER && _dragging) {
|
||||
if (!_slideRect.IsRectEmpty()) {
|
||||
|
@ -272,7 +272,7 @@ bool CBagCharacterObject::doAdvance() {
|
||||
// If we got a background bitmap
|
||||
if (_bmpBuf != nullptr) {
|
||||
// If This Panimation is modal, or Panimations are ON, then get next frame.
|
||||
if (IsModal() || !_pAnim || CBagMasterWin::GetPanimations()) {
|
||||
if (IsModal() || !_pAnim || CBagMasterWin::getPanimations()) {
|
||||
if (_smacker->needsUpdate()) {
|
||||
doAdvanceFl = true;
|
||||
|
||||
@ -545,7 +545,7 @@ void CBagCharacterObject::setNumOfLoops(int n) {
|
||||
|
||||
// If this character is modal run until done looping
|
||||
if (IsModal() && isAttached()) {
|
||||
CBagStorageDevWnd *win = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *win = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
|
||||
if (win != nullptr) {
|
||||
win->RunModal(this);
|
||||
@ -648,7 +648,7 @@ void CBagCharacterObject::setPdaWand(CBagCharacterObject *pdaWand) {
|
||||
|
||||
bool CBagCharacterObject::pdaWandAnimating() {
|
||||
if (_pdaWand == nullptr || !_pdaWand->isAttached()) {
|
||||
CBagStorageDev *pda = SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagStorageDev *pda = SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
if (pda != nullptr) {
|
||||
CBagCharacterObject *wand = (CBagCharacterObject *)pda->GetObject("WANDANIM");
|
||||
if (wand != nullptr) {
|
||||
|
@ -56,20 +56,20 @@ bool CBagCommandObject::runObject() {
|
||||
|
||||
// Check if these items should be replaced by the current sdev
|
||||
if (!srcSDev.IsEmpty() && !srcSDev.Find(CURRSDEV_TOKEN)) {
|
||||
srcSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetName();
|
||||
srcSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetName();
|
||||
}
|
||||
|
||||
if (!dstSDev.IsEmpty() && !dstSDev.Find(CURRSDEV_TOKEN)) {
|
||||
dstSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetName();
|
||||
dstSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetName();
|
||||
}
|
||||
|
||||
// Check if these items should be replaced by the previous sdev
|
||||
if (!srcSDev.IsEmpty() && !srcSDev.Find(PREVSDEV_TOKEN)) {
|
||||
srcSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetPrevSDev();
|
||||
srcSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetPrevSDev();
|
||||
}
|
||||
|
||||
if (!dstSDev.IsEmpty() && !dstSDev.Find(PREVSDEV_TOKEN)) {
|
||||
dstSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetPrevSDev();
|
||||
dstSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetPrevSDev();
|
||||
}
|
||||
|
||||
if (getFileName() == "REMOVE") {
|
||||
@ -78,7 +78,7 @@ bool CBagCommandObject::runObject() {
|
||||
removeFl = true;
|
||||
|
||||
if (!_objName.IsEmpty() && !srcSDev.IsEmpty()) {
|
||||
SDEVMNGR->RemoveObject(srcSDev, _objName);
|
||||
SDEV_MANAGER->RemoveObject(srcSDev, _objName);
|
||||
}
|
||||
removeFl = false;
|
||||
}
|
||||
@ -86,19 +86,19 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "INSERT2") {
|
||||
if (!_objName.IsEmpty() && !dstSDev.IsEmpty()) {
|
||||
g_allowAttachActiveObjectsFl = false;
|
||||
SDEVMNGR->AddObject(dstSDev, _objName);
|
||||
SDEV_MANAGER->AddObject(dstSDev, _objName);
|
||||
g_allowAttachActiveObjectsFl = true;
|
||||
}
|
||||
|
||||
} else if (getFileName() == "INSERT") {
|
||||
if (!_objName.IsEmpty() && !dstSDev.IsEmpty()) {
|
||||
SDEVMNGR->AddObject(dstSDev, _objName);
|
||||
SDEV_MANAGER->AddObject(dstSDev, _objName);
|
||||
}
|
||||
|
||||
} else if (getFileName() == "TRANSFER") {
|
||||
|
||||
if (!_objName.IsEmpty() && !srcSDev.IsEmpty() && !dstSDev.IsEmpty()) {
|
||||
SDEVMNGR->MoveObject(dstSDev, srcSDev, _objName);
|
||||
SDEV_MANAGER->MoveObject(dstSDev, srcSDev, _objName);
|
||||
}
|
||||
|
||||
} else if (getFileName().Find("FLUSHQUEUE") == 0) {
|
||||
@ -113,7 +113,7 @@ bool CBagCommandObject::runObject() {
|
||||
Assert(slot >= 0 && slot < 8);
|
||||
|
||||
} else if (getFileName() == "CLOSE") {
|
||||
CBagStorageDevWnd *currentSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *currentSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
currentSDev->close();
|
||||
|
||||
} else if (getFileName() == "UPDATE") {
|
||||
@ -122,7 +122,7 @@ bool CBagCommandObject::runObject() {
|
||||
if (!updateFl) {
|
||||
updateFl = true;
|
||||
|
||||
CBagStorageDevWnd *currentSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *currentSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
currentSDev->AttachActiveObjects();
|
||||
|
||||
updateFl = false;
|
||||
@ -136,7 +136,7 @@ bool CBagCommandObject::runObject() {
|
||||
if (!eventLoopFl) {
|
||||
eventLoopFl = true;
|
||||
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
if (currSDev != nullptr) {
|
||||
if (currSDev->GetDeviceType() == SDEV_GAMEWIN) {
|
||||
CBagPanWindow *panWin = (CBagPanWindow *)currSDev;
|
||||
@ -154,13 +154,13 @@ bool CBagCommandObject::runObject() {
|
||||
if (CBagPanWindow::_pWieldBmp != nullptr) {
|
||||
CBagObject *currObj = CBagPanWindow::_pWieldBmp->GetCurrObj();
|
||||
if (currObj != nullptr) {
|
||||
SDEVMNGR->RemoveObject(CBagPanWindow::_pWieldBmp->GetName(), currObj->GetRefName());
|
||||
SDEV_MANAGER->RemoveObject(CBagPanWindow::_pWieldBmp->GetName(), currObj->GetRefName());
|
||||
}
|
||||
}
|
||||
|
||||
} else if (getFileName() == "PAINT") {
|
||||
// Get a pointer to the current game window
|
||||
CBagStorageDevWnd *gameWin = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *gameWin = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
|
||||
if (gameWin != nullptr) {
|
||||
gameWin->PaintScreen(nullptr);
|
||||
@ -174,7 +174,7 @@ bool CBagCommandObject::runObject() {
|
||||
if (CBagPanWindow::_pWieldBmp != nullptr) {
|
||||
CBagObject *currObj = CBagPanWindow::_pWieldBmp->GetCurrObj();
|
||||
if (currObj != nullptr) {
|
||||
SDEVMNGR->MoveObject("INV_WLD", CBagPanWindow::_pWieldBmp->GetName(), currObj->GetRefName());
|
||||
SDEV_MANAGER->MoveObject("INV_WLD", CBagPanWindow::_pWieldBmp->GetName(), currObj->GetRefName());
|
||||
CBagPanWindow::_pWieldBmp->SetCurrObj(nullptr);
|
||||
}
|
||||
}
|
||||
@ -189,7 +189,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "DEACTIVATEPDA") {
|
||||
|
||||
// Get a pointer to the current game window
|
||||
CBagStorageDevWnd *gameWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *gameWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
|
||||
// Pull down the PDA (if it exists)
|
||||
if (gameWin->GetDeviceType() == SDEV_GAMEWIN) {
|
||||
@ -198,9 +198,9 @@ bool CBagCommandObject::runObject() {
|
||||
}
|
||||
|
||||
} else if (getFileName() == "ROTATETOFLY") {
|
||||
if (CBagMasterWin::GetFlyThru()) {
|
||||
if (CBagMasterWin::getFlyThru()) {
|
||||
CBagMasterWin::setActiveCursor(6);
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
if ((currSDev != nullptr) && (currSDev->GetDeviceType() == SDEV_GAMEWIN)) {
|
||||
CBagPanWindow *currWin = (CBagPanWindow *)currSDev;
|
||||
currWin->RotateTo(getPosition());
|
||||
@ -209,7 +209,7 @@ bool CBagCommandObject::runObject() {
|
||||
|
||||
} else if (getFileName() == "ROTATETO") {
|
||||
CBagMasterWin::setActiveCursor(6);
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
if ((currSDev != nullptr) && (currSDev->GetDeviceType() == SDEV_GAMEWIN)) {
|
||||
CBagPanWindow *currWin = (CBagPanWindow *)currSDev;
|
||||
currWin->RotateTo(getPosition());
|
||||
@ -221,7 +221,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "TURN") {
|
||||
|
||||
// Cause 1 turn to go by
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
|
||||
} else if (getFileName() == "RP_UPDATE_QUEUE") {
|
||||
// Execute any waiting residue printing results.
|
||||
@ -251,7 +251,7 @@ bool CBagCommandObject::runObject() {
|
||||
CBagMasterWin *pWin = CBagel::getBagApp()->getMasterWnd();
|
||||
|
||||
if (pWin != nullptr) {
|
||||
pWin->SaveSDevStack();
|
||||
pWin->saveSDevStack();
|
||||
}
|
||||
|
||||
} else if (getFileName() == "DEATH2") {
|
||||
@ -304,7 +304,7 @@ bool CBagCommandObject::runObject() {
|
||||
dlg.destroy();
|
||||
|
||||
} else if (getFileName() == "SNAPTO") {
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
if ((currSDev != nullptr) && (currSDev->GetDeviceType() == SDEV_GAMEWIN)) {
|
||||
CBagPanWindow *currWin= (CBagPanWindow *)currSDev;
|
||||
|
||||
@ -335,7 +335,7 @@ bool CBagCommandObject::runObject() {
|
||||
|
||||
} else if (getFileName() == "ACTIVATEPDA") {
|
||||
// Get a pointer to the current game window
|
||||
CBagStorageDevWnd *mainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *mainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
// Pull up the PDA (if it exists)
|
||||
//
|
||||
if (mainWin->GetDeviceType() == SDEV_GAMEWIN) {
|
||||
@ -345,7 +345,7 @@ bool CBagCommandObject::runObject() {
|
||||
|
||||
} else if (getFileName() == "SHOWPDALOG") {
|
||||
// Get a pointer to the current game window
|
||||
CBagPDA *pda = (CBagPDA *)SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagPDA *pda = (CBagPDA *)SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
if (pda) {
|
||||
pda->showLog();
|
||||
}
|
||||
@ -374,7 +374,7 @@ bool CBagCommandObject::runObject() {
|
||||
}
|
||||
|
||||
// Display Credits
|
||||
mainWin->ShowCreditsDialog(mainWin);
|
||||
mainWin->showCreditsDialog(mainWin);
|
||||
|
||||
// Exit the game
|
||||
CBagel::getBagApp()->getMasterWnd()->close();
|
||||
|
@ -116,7 +116,7 @@ void CDevDlg::onMouseMove(uint32 /*nFlags*/, CBofPoint * /*pPoint*/, void *) {
|
||||
void CDevDlg::onClose() {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
CBagVar *varDialogReturn = VARMNGR->GetVariable("DIALOGRETURN");
|
||||
CBagVar *varDialogReturn = VAR_MANAGER->GetVariable("DIALOGRETURN");
|
||||
if (varDialogReturn != nullptr) {
|
||||
// If we need to parse the input for 2 words (Deven-7 Code words)
|
||||
if (_useExtraFl) {
|
||||
@ -127,7 +127,7 @@ void CDevDlg::onClose() {
|
||||
p++;
|
||||
|
||||
// Set variable 2 (DIALOGRETURN2)
|
||||
CBagVar *varDialogReturn2 = VARMNGR->GetVariable("DIALOGRETURN2");
|
||||
CBagVar *varDialogReturn2 = VAR_MANAGER->GetVariable("DIALOGRETURN2");
|
||||
if (varDialogReturn2 != nullptr) {
|
||||
varDialogReturn2->SetValue(p);
|
||||
}
|
||||
|
@ -332,9 +332,9 @@ void CBagDossierObject::deactivateCurDossier() {
|
||||
|
||||
if (residuePrintedObj) {
|
||||
if (residuePrintedObj->Zoomed()) {
|
||||
logWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
logWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
logWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
logWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
}
|
||||
_curDossier->deactivateDossierObject(logWld);
|
||||
@ -367,9 +367,9 @@ void CBagDossierObject::showDossierText() {
|
||||
|
||||
CBagLog *logWld;
|
||||
if (zoomedFl) {
|
||||
logWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
logWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
logWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
logWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
// Now reactivate this object.
|
||||
|
@ -28,7 +28,7 @@ namespace Bagel {
|
||||
|
||||
bool CBagExam::initExam() {
|
||||
CBofRect paintRect(155, 55, 155 + 330 - 1, 55 + 250 - 1);
|
||||
paintBitmap(CBagel::getBagApp()->getMasterWnd()->GetCurrentGameWindow(), buildSysDir("SSBORDER.BMP"), &paintRect);
|
||||
paintBitmap(CBagel::getBagApp()->getMasterWnd()->getCurrentGameWindow(), buildSysDir("SSBORDER.BMP"), &paintRect);
|
||||
|
||||
Common::Event e;
|
||||
while (g_system->getEventManager()->pollEvent(e)) {
|
||||
|
@ -154,7 +154,7 @@ CBagVar *CBagExpression::getVariable(int itemPos) {
|
||||
CBofString stringObject(frontStr, 256);
|
||||
CBofString stringProperty(backStr, 256);
|
||||
|
||||
int newVal = SDEVMNGR->GetObjectValue(stringObject, stringProperty);
|
||||
int newVal = SDEV_MANAGER->GetObjectValue(stringObject, stringProperty);
|
||||
curVar->SetValue(newVal);
|
||||
}
|
||||
}
|
||||
@ -426,7 +426,7 @@ bool CBagExpression::onMinusAssign(CBagVar *leftHandOper, CBagVar *rightHandOper
|
||||
bool CBagExpression::onContains(CBagVar *leftHandOper, CBagVar *rightHandOper, CBagVar & /* resultOper, unused */) {
|
||||
Assert((leftHandOper != nullptr) && (rightHandOper != nullptr));
|
||||
|
||||
CBagStorageDev *sDev = SDEVMNGR->GetStorageDevice(leftHandOper->GetValue());
|
||||
CBagStorageDev *sDev = SDEV_MANAGER->GetStorageDevice(leftHandOper->GetValue());
|
||||
if (sDev == nullptr)
|
||||
return false;
|
||||
|
||||
@ -440,7 +440,7 @@ bool CBagExpression::onContains(CBagVar *leftHandOper, CBagVar *rightHandOper, C
|
||||
bool CBagExpression::onHas(CBagVar *leftHandOper, CBagVar *rightHandOper, CBagVar & /* resultOper, unused */) {
|
||||
Assert((leftHandOper != nullptr) && (rightHandOper != nullptr));
|
||||
|
||||
CBagStorageDev *sDev = SDEVMNGR->GetStorageDevice(leftHandOper->GetValue());
|
||||
CBagStorageDev *sDev = SDEV_MANAGER->GetStorageDevice(leftHandOper->GetValue());
|
||||
if (sDev == nullptr)
|
||||
return false;
|
||||
|
||||
@ -454,7 +454,7 @@ bool CBagExpression::onHas(CBagVar *leftHandOper, CBagVar *rightHandOper, CBagVa
|
||||
bool CBagExpression::onStatus(CBagVar *pLHOper, CBagVar * /* rightHandOper, unused */, CBagVar & /* resultOper, unused */) {
|
||||
Assert(pLHOper != nullptr);
|
||||
|
||||
CBagStorageDev *sDev = SDEVMNGR->GetStorageDeviceContaining(pLHOper->GetValue());
|
||||
CBagStorageDev *sDev = SDEV_MANAGER->GetStorageDeviceContaining(pLHOper->GetValue());
|
||||
if (sDev == nullptr)
|
||||
return false;
|
||||
|
||||
@ -580,7 +580,7 @@ PARSE_CODES CBagExpression::setInfo(CBagIfstream &istr) {
|
||||
istr.eatWhite();
|
||||
|
||||
GetAlphaNumFromStream(istr, tmpStr);
|
||||
CBagVar *curVar = VARMNGR->GetVariable(tmpStr);
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable(tmpStr);
|
||||
if (!curVar) {
|
||||
// This must be a reference, make a new variable
|
||||
if (tmpStr.Find("~~") > 0) {
|
||||
@ -611,7 +611,7 @@ PARSE_CODES CBagExpression::setInfo(CBagIfstream &istr) {
|
||||
|
||||
istr.eatWhite();
|
||||
GetAlphaNumFromStream(istr, tmpStr);
|
||||
curVar = VARMNGR->GetVariable(tmpStr);
|
||||
curVar = VAR_MANAGER->GetVariable(tmpStr);
|
||||
if (!curVar) {
|
||||
if (tmpStr.Find("~~") > 0) {
|
||||
// This must be a reference, make a new variable
|
||||
|
@ -57,10 +57,10 @@ bool CBagExpressionObject::runObject() {
|
||||
CBofString objectStr = getFileName().Left(nIndex);
|
||||
CBofString propertyStr = getFileName().Mid(nIndex + 2);
|
||||
|
||||
SDEVMNGR->SetObjectValue(objectStr, propertyStr, localVar.GetNumValue());
|
||||
SDEV_MANAGER->SetObjectValue(objectStr, propertyStr, localVar.GetNumValue());
|
||||
|
||||
} else {
|
||||
CBagVar *pVar = VARMNGR->GetVariable(getFileName());
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(getFileName());
|
||||
if (pVar)
|
||||
pVar->SetValue(localVar.GetValue());
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ bool CBagFMovie::openMovie(const char *sFilename) {
|
||||
|
||||
CBagMasterWin *curWin = CBagel::getBagApp()->getMasterWnd();
|
||||
if (curWin != nullptr) {
|
||||
CBagStorageDevWnd *curSDev = curWin->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *curSDev = curWin->getCurrentStorageDev();
|
||||
if ((curSDev != nullptr) && curSDev->IsFiltered()) {
|
||||
uint16 filterId = curSDev->GetFilterId();
|
||||
FilterFunction filterFunction = curSDev->GetFilter();
|
||||
@ -184,7 +184,7 @@ void CBagFMovie::onMainLoop() {
|
||||
// Filter the bitmap.
|
||||
CBagMasterWin *curWin = CBagel::getBagApp()->getMasterWnd();
|
||||
if (curWin != nullptr) {
|
||||
CBagStorageDevWnd *curSDev = curWin->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *curSDev = curWin->getCurrentStorageDev();
|
||||
if ((curSDev != nullptr) && curSDev->IsFiltered()) {
|
||||
uint16 filterId = curSDev->GetFilterId();
|
||||
FilterFunction filterFunction = curSDev->GetFilter();
|
||||
|
@ -39,10 +39,10 @@ bool CBagInv::_firstStashFl;
|
||||
|
||||
ErrorCode CBagInv::activateLocalObject(const CBofString &objectName) {
|
||||
|
||||
CBagStorageDev *pdaSDev = SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagStorageDev *pdaSDev = SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
|
||||
// Don't do any wand animation if we are zoomed.
|
||||
SBZoomPda *zoomPda = (SBZoomPda *)SDEVMNGR->GetStorageDevice("BPDAZ_WLD");
|
||||
SBZoomPda *zoomPda = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice("BPDAZ_WLD");
|
||||
Assert(zoomPda != nullptr);
|
||||
bool zoomedFl = (zoomPda ? zoomPda->getZoomed() : false);
|
||||
|
||||
@ -64,9 +64,9 @@ ErrorCode CBagInv::activateLocalObject(const CBofString &objectName) {
|
||||
|
||||
if (zoomedFl == false) {
|
||||
// Check to see if we are in the bar
|
||||
CBagVar *var = VARMNGR->GetVariable("INBAR");
|
||||
CBagVar *var = VAR_MANAGER->GetVariable("INBAR");
|
||||
if (var != nullptr) {
|
||||
var = VARMNGR->GetVariable("FIRST_STASH");
|
||||
var = VAR_MANAGER->GetVariable("FIRST_STASH");
|
||||
|
||||
// If this is our first stash, play the smacker associated with it.
|
||||
if ((var != nullptr) && (var->GetNumValue() == 0)) {
|
||||
@ -93,10 +93,10 @@ ErrorCode CBagInv::activateLocalObject(const CBofString &objectName) {
|
||||
* The wand on the PDA should animate
|
||||
*/
|
||||
ErrorCode CBagInv::deactivateLocalObject(const CBofString &objectName) {
|
||||
CBagStorageDev *pdaSDev = SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagStorageDev *pdaSDev = SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
|
||||
// Don't do any wand animation if we are zoomed.
|
||||
SBZoomPda *zoomPDA = (SBZoomPda *)SDEVMNGR->GetStorageDevice("BPDAZ_WLD");
|
||||
SBZoomPda *zoomPDA = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice("BPDAZ_WLD");
|
||||
Assert(zoomPDA != nullptr);
|
||||
bool zoomedFl = (zoomPDA ? zoomPDA->getZoomed() : false);
|
||||
|
||||
|
@ -173,7 +173,7 @@ bool CBagLinkObject::runObject() {
|
||||
if (getFileName().Find("$LASTWORLD") != -1) {
|
||||
curStr = getFileName();
|
||||
|
||||
CBagVar *var = VARMNGR->GetVariable("$LASTWORLD");
|
||||
CBagVar *var = VAR_MANAGER->GetVariable("$LASTWORLD");
|
||||
if (var != nullptr) {
|
||||
curStr.ReplaceStr("$LASTWORLD", var->GetValue());
|
||||
}
|
||||
@ -181,23 +181,23 @@ bool CBagLinkObject::runObject() {
|
||||
|
||||
CBagMasterWin::setActiveCursor(6);
|
||||
|
||||
CBagStorageDevWnd *curSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *curSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
|
||||
// Set the link position for the storage device we are about to jump to
|
||||
CBagStorageDev *destWin = SDEVMNGR->GetStorageDevice(curStr);
|
||||
CBagStorageDev *destWin = SDEV_MANAGER->GetStorageDevice(curStr);
|
||||
if (destWin) {
|
||||
destWin->SetLoadFilePos(getDestLoc());
|
||||
}
|
||||
|
||||
CBagMasterWin *pMasterWin = CBagel::getBagApp()->getMasterWnd();
|
||||
if (pMasterWin) {
|
||||
pMasterWin->SetCurrfadeIn(_fade);
|
||||
pMasterWin->SetStorageDev(curStr);
|
||||
pMasterWin->setCurrfadeIn(_fade);
|
||||
pMasterWin->setStorageDev(curStr);
|
||||
}
|
||||
|
||||
CBagStorageDevWnd *otherSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *otherSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
if (!curSDev->IsCloseup() && !otherSDev->IsCloseup()) {
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
}
|
||||
|
||||
return CBagObject::runObject();
|
||||
|
@ -64,7 +64,7 @@ CBofPoint CBagLog::arrangeFloater(CBofPoint pos, CBagObject *bagObj) {
|
||||
int borderSize = 0;
|
||||
|
||||
// Get this from script, allows individual log states to set border.
|
||||
CBagVar *curVar = VARMNGR->GetVariable("LOGBORDER");
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable("LOGBORDER");
|
||||
if (curVar != nullptr) {
|
||||
borderSize = curVar->GetNumValue();
|
||||
}
|
||||
@ -187,7 +187,7 @@ int CBagLog::getCurFltPage() {
|
||||
int nCurFltPage = 0;
|
||||
|
||||
// Read in their total nuggets from game
|
||||
CBagVar *curVar = VARMNGR->GetVariable("CUR_BAR_LOG_PAGE");
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable("CUR_BAR_LOG_PAGE");
|
||||
|
||||
if (curVar) {
|
||||
nCurFltPage = curVar->GetNumValue();
|
||||
@ -198,7 +198,7 @@ int CBagLog::getCurFltPage() {
|
||||
|
||||
void CBagLog::setCurFltPage(int fltPage) {
|
||||
// Read in their total nuggets from game
|
||||
CBagVar *curVar = VARMNGR->GetVariable("CUR_BAR_LOG_PAGE");
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable("CUR_BAR_LOG_PAGE");
|
||||
|
||||
if (curVar)
|
||||
curVar->SetValue(fltPage);
|
||||
@ -302,7 +302,7 @@ ErrorCode CBagLog::activateLocalObject(CBagObject *bagObj) {
|
||||
bagObj->SetMsgWaiting(true);
|
||||
}
|
||||
|
||||
CBagStorageDev *pda = SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagStorageDev *pda = SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
|
||||
if (pda) {
|
||||
CBagButtonObject *msgLight = (CBagButtonObject *)pda->GetObject("MSGLIGHT");
|
||||
@ -334,10 +334,10 @@ ErrorCode CBagLog::playMsgQueue() {
|
||||
// Only play one message per click on the pda message light.
|
||||
if (count) {
|
||||
|
||||
CBagStorageDev *bpda = SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagStorageDev *bpda = SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
|
||||
// If we're in a closeup, then don't play the message!
|
||||
CBagStorageDev *sdev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDev *sdev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
bool playMsgFl = true;
|
||||
|
||||
if ((sdev != nullptr) && sdev->IsCIC()) {
|
||||
@ -533,7 +533,7 @@ int CBagLogMsg::getProperty(const CBofString &prop) {
|
||||
ErrorCode CBagLogMsg::update(CBofBitmap *bmp, CBofPoint pt, CBofRect *srcRect, int maskColor) {
|
||||
// We could use a variable here, translate it's value if that's the case.
|
||||
if (getMsgTime() == 0) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable(_msgTimeStr);
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(_msgTimeStr);
|
||||
int nMsgTime = pVar->GetNumValue();
|
||||
setMsgTime(nMsgTime);
|
||||
}
|
||||
@ -912,7 +912,7 @@ ErrorCode CBagEnergyDetectorObject::attach() {
|
||||
CBofString zhapsString(zhapsBuffer, 256);
|
||||
|
||||
// We could use a variable here, translate it's value if that's the case.
|
||||
CBagVar *curVar = VARMNGR->GetVariable(_energyTimeStr);
|
||||
CBagVar *curVar = VAR_MANAGER->GetVariable(_energyTimeStr);
|
||||
if (curVar) {
|
||||
nMsgTime = curVar->GetNumValue();
|
||||
} else {
|
||||
@ -923,7 +923,7 @@ ErrorCode CBagEnergyDetectorObject::attach() {
|
||||
int minute = nMsgTime - (hour * 100);
|
||||
|
||||
// Get the number of zhaps.
|
||||
curVar = VARMNGR->GetVariable(_zhapsStr);
|
||||
curVar = VAR_MANAGER->GetVariable(_zhapsStr);
|
||||
if (curVar) {
|
||||
zhapsString = curVar->GetValue();
|
||||
} else {
|
||||
@ -931,7 +931,7 @@ ErrorCode CBagEnergyDetectorObject::attach() {
|
||||
}
|
||||
|
||||
// Get the cause
|
||||
curVar = VARMNGR->GetVariable(_causeStr);
|
||||
curVar = VAR_MANAGER->GetVariable(_causeStr);
|
||||
if (curVar) {
|
||||
causeString = curVar->GetValue();
|
||||
} else {
|
||||
@ -1017,7 +1017,7 @@ PARSE_CODES CBagLogClue::setInfo(CBagIfstream &istr) {
|
||||
if (!sStr.Find("STRINGVAR")) {
|
||||
istr.eatWhite();
|
||||
GetAlphaNumFromStream(istr, sStr);
|
||||
CBagVar *pVar = VARMNGR->GetVariable(sStr);
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(sStr);
|
||||
// The variable must have been found, if it wasn't, then
|
||||
// complain violently.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -35,27 +35,27 @@
|
||||
|
||||
namespace Bagel {
|
||||
|
||||
#define SDEVMNGR CBagel::getBagApp()->getMasterWnd()->GetStorageDevManager()
|
||||
#define VARMNGR CBagel::getBagApp()->getMasterWnd()->GetVariableManager()
|
||||
#define SDEV_MANAGER CBagel::getBagApp()->getMasterWnd()->getStorageDevManager()
|
||||
#define VAR_MANAGER CBagel::getBagApp()->getMasterWnd()->getVariableManager()
|
||||
|
||||
class CBagStorageDevManager;
|
||||
class CBagStorageDevWnd;
|
||||
class CBagStorageDev;
|
||||
|
||||
enum SpaceBarEventType {
|
||||
WM_ENTERPANWINDOW = 1001,
|
||||
WM_ENTERCLOSEUPWINDOW = 1002,
|
||||
WM_EXITCLOSEUPWINDOW = 1003,
|
||||
WM_ENTERNEWWLD = 1004,
|
||||
WM_ENTER_PAN_WINDOW = 1001,
|
||||
WM_ENTER_CLOSE_UP_WINDOW = 1002,
|
||||
WM_EXIT_CLOSE_UP_WINDOW = 1003,
|
||||
WM_ENTER_NEW_WLD = 1004,
|
||||
WM_DIE = 1005,
|
||||
WM_SHOWSYSTEMDLG = 1006
|
||||
WM_SHOW_SYSTEM_DLG = 1006
|
||||
};
|
||||
|
||||
#define MAX_CURSORS 60
|
||||
|
||||
// Some utility routines
|
||||
void SetCICStatus(CBagStorageDev *pSDev);
|
||||
bool GetCICStatus();
|
||||
void setCICStatus(CBagStorageDev *sdev);
|
||||
bool getCICStatus();
|
||||
|
||||
/**
|
||||
* This is the main window that is never destroyed throughout the game.
|
||||
@ -65,27 +65,27 @@ bool GetCICStatus();
|
||||
*/
|
||||
class CBagMasterWin : public CBofWindow, public CBagParseObject {
|
||||
protected:
|
||||
static bool m_bObjSave;
|
||||
static ST_OBJ *m_pObjList;
|
||||
static CBagCursor *m_cCursorList[MAX_CURSORS];
|
||||
static bool _objSaveFl;
|
||||
static ST_OBJ *_objList;
|
||||
static CBagCursor *_cursorList[MAX_CURSORS];
|
||||
|
||||
CBagStorageDevWnd *m_pGameWindow;
|
||||
CBagStorageDevWnd *_gameWindow;
|
||||
|
||||
CBofString m_cWldScript;
|
||||
CBofString m_sStartWld;
|
||||
CBofString m_cCDChangeAudio;
|
||||
CBofString m_cSysScreen;
|
||||
CBofString _wldScript;
|
||||
CBofString _startWld;
|
||||
CBofString _cdChangeAudio;
|
||||
CBofString _sysScreen;
|
||||
|
||||
uint16 m_nDiskID;
|
||||
int m_nFadeIn;
|
||||
CBofList<CBagStorageDev *> *m_pGameSDevList;
|
||||
CBagStorageDevManager *m_pStorageDeviceList;
|
||||
CBagVarManager *m_pVariableList; // List of variables used throughout wld
|
||||
CBofSound *m_pWaitSound;
|
||||
static int m_nCurCursor;
|
||||
uint16 _diskId;
|
||||
int _fadeIn;
|
||||
CBofList<CBagStorageDev *> *_gameSDevList;
|
||||
CBagStorageDevManager *_storageDeviceList;
|
||||
CBagVarManager *_variableList; // List of variables used throughout wld
|
||||
CBofSound *_waitSound;
|
||||
static int _curCursor;
|
||||
|
||||
public:
|
||||
static int m_lMenuCount;
|
||||
static int _menuCount;
|
||||
|
||||
CBagMasterWin();
|
||||
virtual ~CBagMasterWin();
|
||||
@ -93,127 +93,127 @@ public:
|
||||
|
||||
void close();
|
||||
|
||||
CBofString &GetWldScript() {
|
||||
return m_cWldScript;
|
||||
CBofString &getWldScript() {
|
||||
return _wldScript;
|
||||
}
|
||||
|
||||
static void setActiveCursor(int iCursor);
|
||||
static int GetActiveCursor() {
|
||||
return m_nCurCursor;
|
||||
static void setActiveCursor(int cursorId);
|
||||
static int getActiveCursor() {
|
||||
return _curCursor;
|
||||
}
|
||||
|
||||
// User options
|
||||
static bool GetFlyThru();
|
||||
static bool getFlyThru();
|
||||
|
||||
static bool GetPanimations();
|
||||
static void SetPanimations(bool bPanims);
|
||||
static bool getPanimations();
|
||||
static void setPanimations(bool panimsFl);
|
||||
|
||||
static int GetCorrection();
|
||||
static void SetCorrection(int nCorrection);
|
||||
static int getCorrection();
|
||||
static void setCorrection(int correction);
|
||||
|
||||
static int GetPanSpeed();
|
||||
static void SetPanSpeed(int nSpeed);
|
||||
static int getPanSpeed();
|
||||
static void setPanSpeed(int speed);
|
||||
|
||||
static int GetMidiVolume();
|
||||
static void SetMidiVolume(int nVol);
|
||||
static int getMidiVolume();
|
||||
static void setMidiVolume(int vol);
|
||||
|
||||
static int GetWaveVolume();
|
||||
static void SetWaveVolume(int nVol);
|
||||
static int getWaveVolume();
|
||||
static void setWaveVolume(int vol);
|
||||
|
||||
static bool GetMidi() {
|
||||
return GetMidiVolume() != 0;
|
||||
static bool getMidi() {
|
||||
return getMidiVolume() != 0;
|
||||
}
|
||||
static bool GetDigitalAudio() {
|
||||
return GetWaveVolume() != 0;
|
||||
static bool getDigitalAudio() {
|
||||
return getWaveVolume() != 0;
|
||||
}
|
||||
|
||||
static void MuteToggle();
|
||||
static void ForcePaintScreen();
|
||||
static void muteToggle();
|
||||
static void forcePaintScreen();
|
||||
|
||||
virtual ErrorCode ShowSystemDialog(bool bSave = true);
|
||||
bool ShowRestartDialog(CBofWindow *pWin = nullptr, bool bSave = true);
|
||||
bool ShowSaveDialog(CBofWindow *pWin, bool bSave = true);
|
||||
bool ShowRestoreDialog(CBofWindow *pWin, bool bSave = true);
|
||||
bool ShowQuitDialog(CBofWindow *pWin, bool bSave = true);
|
||||
ErrorCode ShowCreditsDialog(CBofWindow *pWin, bool bSave = true);
|
||||
virtual ErrorCode showSystemDialog(bool saveFl = true);
|
||||
bool showRestartDialog(CBofWindow *win = nullptr, bool saveFl = true);
|
||||
bool showSaveDialog(CBofWindow *win, bool saveFl = true);
|
||||
bool showRestoreDialog(CBofWindow *win, bool saveFl = true);
|
||||
bool showQuitDialog(CBofWindow *win, bool saveFl = true);
|
||||
ErrorCode showCreditsDialog(CBofWindow *win, bool saveFl = true);
|
||||
|
||||
void FillSaveBuffer(ST_BAGEL_SAVE *pSaveBuf);
|
||||
void DoRestore(ST_BAGEL_SAVE *pSaveBuf);
|
||||
void fillSaveBuffer(ST_BAGEL_SAVE *saveBuf);
|
||||
void doRestore(ST_BAGEL_SAVE *saveBuf);
|
||||
|
||||
ErrorCode NewGame();
|
||||
ErrorCode newGame();
|
||||
|
||||
ErrorCode LoadFile(const CBofString &sWldName, const CBofString &sStartWldName, bool bRestart = false, bool bSetStart = true);
|
||||
ErrorCode loadFile(const CBofString &wldName, const CBofString &startWldName, bool restartFl = false, bool setStartFl = true);
|
||||
|
||||
ErrorCode SaveFile(const CBofString &sWldName);
|
||||
ErrorCode LoadFileFromStream(CBagIfstream &fpInput, const CBofString &sWldName);
|
||||
ErrorCode LoadGlobalVars(const CBofString &sWldName);
|
||||
ErrorCode saveFile(const CBofString &wldName);
|
||||
ErrorCode loadFileFromStream(CBagIfstream &input, const CBofString &wldName);
|
||||
ErrorCode loadGlobalVars(const CBofString &wldName);
|
||||
|
||||
ErrorCode SetCurrfadeIn(int nFade) {
|
||||
m_nFadeIn = nFade;
|
||||
ErrorCode setCurrfadeIn(int fade) {
|
||||
_fadeIn = fade;
|
||||
return ERR_NONE;
|
||||
}
|
||||
ErrorCode SetStorageDev(const CBofString &sWldName, bool bEntry = true);
|
||||
ErrorCode GotoNewWindow(const CBofString *pStr);
|
||||
ErrorCode setStorageDev(const CBofString &wldName, bool entry = true);
|
||||
ErrorCode gotoNewWindow(const CBofString *str);
|
||||
|
||||
uint16 GetDiskID() {
|
||||
return m_nDiskID;
|
||||
uint16 getDiskID() {
|
||||
return _diskId;
|
||||
}
|
||||
void SetDiskID(uint16 did) {
|
||||
m_nDiskID = did;
|
||||
void setDiskID(uint16 id) {
|
||||
_diskId = id;
|
||||
}
|
||||
|
||||
CBofWindow *GetCurrentGameWindow() {
|
||||
return (CBofWindow *)m_pGameWindow;
|
||||
CBofWindow *getCurrentGameWindow() {
|
||||
return (CBofWindow *)_gameWindow;
|
||||
}
|
||||
CBagStorageDevWnd *GetCurrentStorageDev() {
|
||||
return m_pGameWindow;
|
||||
CBagStorageDevWnd *getCurrentStorageDev() {
|
||||
return _gameWindow;
|
||||
}
|
||||
CBagStorageDevManager *GetStorageDevManager() {
|
||||
return m_pStorageDeviceList;
|
||||
CBagStorageDevManager *getStorageDevManager() {
|
||||
return _storageDeviceList;
|
||||
}
|
||||
CBagVarManager *GetVariableManager() {
|
||||
return m_pVariableList;
|
||||
CBagVarManager *getVariableManager() {
|
||||
return _variableList;
|
||||
}
|
||||
|
||||
virtual CBagStorageDev *OnNewStorageDev(const CBofString &typestr) = 0;
|
||||
virtual CBagStorageDev *OnNewStorageDev(int nType) = 0;
|
||||
virtual CBagStorageDev *onNewStorageDev(const CBofString &typestr) = 0;
|
||||
virtual CBagStorageDev *onNewStorageDev(int type) = 0;
|
||||
|
||||
virtual void OnNewFilter(CBagStorageDev *, const CBofString &typestr) = 0;
|
||||
virtual void OnNewFilter(CBagStorageDev *pSDev, const int nType) = 0;
|
||||
virtual void onNewFilter(CBagStorageDev *, const CBofString &typeStr) = 0;
|
||||
virtual void onNewFilter(CBagStorageDev *sdev, const int type) = 0;
|
||||
|
||||
virtual ErrorCode OnHelp(const CBofString &sHelpFile, bool bSaveBkg = true, CBofWindow *pParent = nullptr);
|
||||
virtual ErrorCode onHelp(const CBofString &helpFile, bool saveBkgFl = true, CBofWindow *parent = nullptr);
|
||||
|
||||
void onUserMessage(uint32 nMessage, uint32 lParam) override;
|
||||
void onUserMessage(uint32 message, uint32 param) override;
|
||||
|
||||
void onKeyHit(uint32 lKey, uint32 lRepCount) override;
|
||||
void onKeyHit(uint32 keyCode, uint32 repCount) override;
|
||||
void onClose() override;
|
||||
|
||||
ST_OBJ *GetObjList() {
|
||||
return m_pObjList;
|
||||
ST_OBJ *getObjList() {
|
||||
return _objList;
|
||||
}
|
||||
void SetSaveObjs(bool bSave) {
|
||||
m_bObjSave = bSave;
|
||||
void setSaveObjs(bool saveFl) {
|
||||
_objSaveFl = saveFl;
|
||||
}
|
||||
bool IsObjSave() {
|
||||
return m_bObjSave;
|
||||
bool isObjSave() {
|
||||
return _objSaveFl;
|
||||
}
|
||||
|
||||
void SaveSDevStack();
|
||||
void saveSDevStack();
|
||||
|
||||
virtual void *GetDataStart() override {
|
||||
return &m_pGameWindow;
|
||||
void *getDataStart() override {
|
||||
return &_gameWindow;
|
||||
}
|
||||
virtual void *GetDataEnd() override {
|
||||
return &m_pVariableList + sizeof(CBagVarManager *);
|
||||
|
||||
void *getDataEnd() override {
|
||||
return &_variableList + sizeof(CBagVarManager *);
|
||||
}
|
||||
|
||||
// Since we do this from load file and do restore, centralize it in one location.
|
||||
void RestoreActiveMessages(CBagStorageDevManager *pSDevManager);
|
||||
void restoreActiveMessages(CBagStorageDevManager *sdevManager);
|
||||
};
|
||||
|
||||
ErrorCode PaintBeveledText(CBofBitmap *pBmp, CBofRect *pRect, const CBofString &cStr, const int nSize, const int nWeight, const RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 nFormat = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
|
||||
ErrorCode PaintBeveledText(CBofWindow *pWin, CBofRect *pRect, const CBofString &cStr, const int nSize, const int nWeight, const RGBCOLOR cColor = CTEXT_COLOR, int nJustify = JUSTIFY_CENTER, uint32 nFormat = FORMAT_DEFAULT, int nFont = FONT_DEFAULT);
|
||||
ErrorCode WaitForInput();
|
||||
ErrorCode paintBeveledText(CBofWindow *win, CBofRect *rect, const CBofString &string, const int size, const int weight, const RGBCOLOR color = CTEXT_COLOR, int justify = JUSTIFY_CENTER, uint32 format = FORMAT_DEFAULT, int font = FONT_DEFAULT);
|
||||
ErrorCode waitForInput();
|
||||
|
||||
extern bool g_bWaitOK;
|
||||
|
||||
|
@ -208,7 +208,7 @@ bool CBagMenu::TrackPopupMenu(uint32 /*nFlags*/, int x, int y, CBofWindow *pWnd,
|
||||
// If we're zoomed, then do things differently
|
||||
CBagTextObject *pTXObj = (CBagTextObject *)pObj;
|
||||
if (pTXObj->IsCaption()) {
|
||||
SBZoomPda *pZPDA = (SBZoomPda *)SDEVMNGR->GetStorageDevice("BPDAZ_WLD");
|
||||
SBZoomPda *pZPDA = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice("BPDAZ_WLD");
|
||||
if (pZPDA && pZPDA->getZoomed()) {
|
||||
bZoomed = true;
|
||||
|
||||
@ -399,7 +399,7 @@ bool CBagMenu::TrackPopupMenu(uint32 /*nFlags*/, int x, int y, CBofWindow *pWnd,
|
||||
|
||||
// If we were requested to put a dialog over the PDA, then shift it upward
|
||||
// a bit... unless of course the mousedown occurred in the PDA itself.
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
|
||||
if (pPDA != nullptr && (pPDA->isActivated() && bZoomed == false)) {
|
||||
if (!pPDA->isInside(cMouseDown)) {
|
||||
@ -469,19 +469,19 @@ bool CBagMenu::TrackPopupMenu(uint32 /*nFlags*/, int x, int y, CBofWindow *pWnd,
|
||||
|
||||
// If our current storage device is "AS CUSTOM" then don't allow
|
||||
// the timer to get incremented.
|
||||
CBagStorageDev *pCurSDEV = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev();
|
||||
CBagStorageDev *pCurSDEV = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
|
||||
if (pObj != nullptr) {
|
||||
pObj->runCallBack();
|
||||
|
||||
// Selecting this menu item causes a turn to go by
|
||||
if (nNumCalls == 1 && pCurSDEV->IsCustom() == false) {
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
}
|
||||
} else if (bCaption && (nNumCalls == 2)) {
|
||||
// Selecting this menu item causes a turn to go by
|
||||
dlg.m_pSelectedObject = nullptr;
|
||||
if (pCurSDEV->IsCustom() == false) {
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -563,7 +563,7 @@ bool CBagMenu::RemoveUniversalObjectList() {
|
||||
CBagMenuDlg::CBagMenuDlg() {
|
||||
// Remove this SDEV from the storage device list so that it is not deleted
|
||||
// when we switch .WLD files, and there may still be a Dialog open.
|
||||
SDEVMNGR->UnRegisterStorageDev(this);
|
||||
SDEV_MANAGER->UnRegisterStorageDev(this);
|
||||
}
|
||||
|
||||
CBagMenuDlg::~CBagMenuDlg() {
|
||||
|
@ -88,7 +88,7 @@ ErrorCode CBagMoo::SetPDAMovie(CBofString &s) {
|
||||
}
|
||||
|
||||
void CBagMoo::StopMovie(bool bResetPDA) {
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
|
||||
if (bResetPDA) {
|
||||
if (pPDA) {
|
||||
|
@ -74,14 +74,14 @@ CBagMovieObject::~CBagMovieObject() {
|
||||
bool CBagMovieObject::runObject() {
|
||||
CBagPDA *pPDA = nullptr;
|
||||
CBofWindow *pNewWin = nullptr;
|
||||
SBZoomPda *pPDAz = (SBZoomPda *)SDEVMNGR->GetStorageDevice("BPDAZ_WLD");
|
||||
SBZoomPda *pPDAz = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice("BPDAZ_WLD");
|
||||
bool bZoomed = (pPDAz == nullptr ? false : pPDAz->getZoomed());
|
||||
|
||||
// Get a pointer to the current game window
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
|
||||
bool rc = true;
|
||||
if (!m_bFlyThru || CBagMasterWin::GetFlyThru()) {
|
||||
if (!m_bFlyThru || CBagMasterWin::getFlyThru()) {
|
||||
rc = false;
|
||||
|
||||
CBofString sFileName = getFileName();
|
||||
@ -146,11 +146,11 @@ bool CBagMovieObject::runObject() {
|
||||
|
||||
bool isFiltered = false;
|
||||
CBagMasterWin *pWnd = CBagel::getBagApp()->getMasterWnd();
|
||||
CBagStorageDevWnd *pSDevWnd = (pWnd ? pWnd->GetCurrentStorageDev() : nullptr);
|
||||
CBagStorageDevWnd *pSDevWnd = (pWnd ? pWnd->getCurrentStorageDev() : nullptr);
|
||||
|
||||
// Get the pda here, we need it so much anyway.
|
||||
if (pPDA == nullptr) {
|
||||
pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
}
|
||||
Assert(pPDA != nullptr);
|
||||
|
||||
@ -181,7 +181,7 @@ bool CBagMovieObject::runObject() {
|
||||
// If we have a movie playing in the zoom pda, then black out
|
||||
// the background. Examine movies will always play with a black background
|
||||
// on the mac (prevents a palette shift).
|
||||
CBagExam *pMovie = new CBagExam(CBagel::getBagApp()->getMasterWnd()->GetCurrentGameWindow(), sFileName, &r);
|
||||
CBagExam *pMovie = new CBagExam(CBagel::getBagApp()->getMasterWnd()->getCurrentGameWindow(), sFileName, &r);
|
||||
|
||||
if (pMovie) {
|
||||
// If there is an associated sound file, then start it up here.
|
||||
@ -220,7 +220,7 @@ bool CBagMovieObject::runObject() {
|
||||
// Increment timer one, pda message counts as one turn
|
||||
// Allow scripter to override timer increment
|
||||
if (IsIncrement()) {
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
}
|
||||
}
|
||||
|
||||
@ -540,12 +540,12 @@ bool CBagMovieObject::asynchPDAMovieCanPlay() {
|
||||
CBofString sStr(szLocalBuff, 256);
|
||||
|
||||
sStr = "BPDAZ_WLD";
|
||||
SBZoomPda *pPDAz = (SBZoomPda *)SDEVMNGR->GetStorageDevice(sStr);
|
||||
SBZoomPda *pPDAz = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice(sStr);
|
||||
|
||||
sStr = "BPDA_WLD";
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice(sStr);
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice(sStr);
|
||||
|
||||
CBagPanWindow *pMainWin = (CBagPanWindow *)(CBagel::getBagApp()->getMasterWnd()->GetCurrentGameWindow());
|
||||
CBagPanWindow *pMainWin = (CBagPanWindow *)(CBagel::getBagApp()->getMasterWnd()->getCurrentGameWindow());
|
||||
|
||||
// Queue this message if any one of a variety of things is happening.
|
||||
Assert(pPDA != nullptr);
|
||||
|
@ -157,7 +157,7 @@ bool CBagObject::runObject() {
|
||||
if (IsTimeless())
|
||||
return true;
|
||||
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -193,14 +193,14 @@ PARSE_CODES CBagObject::setInfo(CBagIfstream &istr) {
|
||||
// Try to cut down the number of Storage Devices by
|
||||
// removing these unused ones from the list.
|
||||
//
|
||||
SDEVMNGR->UnRegisterStorageDev(m_pMenu);
|
||||
SDEV_MANAGER->UnRegisterStorageDev(m_pMenu);
|
||||
}
|
||||
}
|
||||
|
||||
istr.putBack();
|
||||
|
||||
char szBuff[256];
|
||||
Common::sprintf_s(szBuff, "Menu:%d", CBagMasterWin::m_lMenuCount++);
|
||||
Common::sprintf_s(szBuff, "Menu:%d", CBagMasterWin::_menuCount++);
|
||||
CBofString s(szBuff, 256);
|
||||
|
||||
m_pMenu->LoadFileFromStream(istr, s, false);
|
||||
|
@ -50,8 +50,8 @@ CBagPanWindow::CBagPanWindow() : CBagStorageDevWnd() {
|
||||
m_xVeiwPortPos = CBofPoint(0, 20);
|
||||
m_xMovementRect.SetRectEmpty();
|
||||
|
||||
m_nCorrection = CBagMasterWin::GetCorrection();
|
||||
m_nPanSpeed = CBagMasterWin::GetPanSpeed();
|
||||
m_nCorrection = CBagMasterWin::getCorrection();
|
||||
m_nPanSpeed = CBagMasterWin::getPanSpeed();
|
||||
m_pSlideBitmap = nullptr;
|
||||
m_pPalette = nullptr;
|
||||
m_bPaintToBackdrop = true;
|
||||
@ -439,7 +439,7 @@ void CBagPanWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
}
|
||||
m_nCorrection >>= 1;
|
||||
m_pSlideBitmap->setCorrWidth(m_nCorrection);
|
||||
CBagMasterWin::SetCorrection(m_nCorrection);
|
||||
CBagMasterWin::setCorrection(m_nCorrection);
|
||||
break;
|
||||
|
||||
case BKEY_PLUS:
|
||||
@ -450,7 +450,7 @@ void CBagPanWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
m_nCorrection = 0;
|
||||
}
|
||||
m_pSlideBitmap->setCorrWidth(m_nCorrection);
|
||||
CBagMasterWin::SetCorrection(m_nCorrection);
|
||||
CBagMasterWin::setCorrection(m_nCorrection);
|
||||
break;
|
||||
|
||||
case BKEY_LEFT:
|
||||
@ -540,7 +540,7 @@ void CBagPanWindow::onMouseMove(uint32 nFlags, CBofPoint *p, void *) {
|
||||
|
||||
// the logz case is handled by onmousemove in zoompda
|
||||
if (pOverObj->GetRefName().Find("BPDA_WLD") != -1) {
|
||||
CBagPDA *pPda = (CBagPDA *)SDEVMNGR->GetStorageDevice(pOverObj->GetRefName());
|
||||
CBagPDA *pPda = (CBagPDA *)SDEV_MANAGER->GetStorageDevice(pOverObj->GetRefName());
|
||||
if (pPda != nullptr) {
|
||||
CBofRect cRect = pOverObj->getRect();
|
||||
nCursorID = pPda->getProperCursor(xPoint, cRect);
|
||||
|
@ -127,10 +127,10 @@ public:
|
||||
|
||||
int ParseAlertBox(CBagIfstream &istr, const char *sTitle, const char *sFile, int nLine);
|
||||
|
||||
virtual void *GetDataStart() {
|
||||
virtual void *getDataStart() {
|
||||
return &m_bAttached;
|
||||
}
|
||||
virtual void *GetDataEnd() {
|
||||
virtual void *getDataEnd() {
|
||||
return &m_bAttached + sizeof(bool);
|
||||
}
|
||||
};
|
||||
|
@ -129,7 +129,7 @@ ErrorCode CBagPDA::attach() {
|
||||
|
||||
// Calculate the position for the pda
|
||||
CBofRect bmpRect = getBitmap()->getRect();
|
||||
CBofWindow *pGameWin = CBagel::getBagApp()->getMasterWnd()->GetCurrentGameWindow();
|
||||
CBofWindow *pGameWin = CBagel::getBagApp()->getMasterWnd()->getCurrentGameWindow();
|
||||
CBofRect GameRect = pGameWin->getRect();
|
||||
|
||||
// When the pda is active it should sit flush with the bottom of the screen
|
||||
@ -139,7 +139,7 @@ ErrorCode CBagPDA::attach() {
|
||||
|
||||
// Should be allowed to not find one.
|
||||
if (!_mooWnd) {
|
||||
if ((pSDev = SDEVMNGR->GetStorageDevice(MOOWLD)) != nullptr) {
|
||||
if ((pSDev = SDEV_MANAGER->GetStorageDevice(MOOWLD)) != nullptr) {
|
||||
_mooWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_mooWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
_mooWnd->SetTransparent(false);
|
||||
@ -149,7 +149,7 @@ ErrorCode CBagPDA::attach() {
|
||||
}
|
||||
|
||||
if (!_invWnd) {
|
||||
if ((pSDev = SDEVMNGR->GetStorageDevice(INVWLD)) != nullptr) {
|
||||
if ((pSDev = SDEV_MANAGER->GetStorageDevice(INVWLD)) != nullptr) {
|
||||
_invWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_invWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
|
||||
@ -163,7 +163,7 @@ ErrorCode CBagPDA::attach() {
|
||||
}
|
||||
|
||||
if (!_mapWnd) {
|
||||
if ((pSDev = SDEVMNGR->GetStorageDevice(MAPWLD)) != nullptr) {
|
||||
if ((pSDev = SDEV_MANAGER->GetStorageDevice(MAPWLD)) != nullptr) {
|
||||
_mapWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_mapWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
|
||||
@ -176,7 +176,7 @@ ErrorCode CBagPDA::attach() {
|
||||
}
|
||||
}
|
||||
if (!_logWnd) {
|
||||
if ((pSDev = SDEVMNGR->GetStorageDevice(LOGWLD)) != nullptr) {
|
||||
if ((pSDev = SDEV_MANAGER->GetStorageDevice(LOGWLD)) != nullptr) {
|
||||
_logWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_logWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
|
||||
@ -313,7 +313,7 @@ ErrorCode CBagPDA::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, in
|
||||
bool bWandAnimating = CBagCharacterObject::pdaWandAnimating();
|
||||
|
||||
if (isActivating() || bWandAnimating || bMoviePlaying) {
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
((CBagPanWindow *)pMainWin)->SetPreFilterPan(true);
|
||||
} else if (!isActivated() && (SBBasePda::_pdaMode != MAPMODE)) {
|
||||
// If it is not activated, then don't bother redrawing it or the objects
|
||||
@ -343,7 +343,7 @@ bool CBagPDA::isInside(const CBofPoint &xPoint) {
|
||||
}
|
||||
|
||||
void CBagPDA::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info) {
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
|
||||
if (!isActivated() && _pdaMode != INVMODE) { // if the PDA is not active, activate it
|
||||
if (isInside(*xPoint)) {
|
||||
@ -460,7 +460,7 @@ void CBagPDA::HandleZoomButton(bool bButtonDown) {
|
||||
CBofString sDevice(szLocalBuff, 256);
|
||||
sDevice = "BPDA_WLD";
|
||||
|
||||
CBagStorageDev *pPda = SDEVMNGR->GetStorageDevice(sDevice);
|
||||
CBagStorageDev *pPda = SDEV_MANAGER->GetStorageDevice(sDevice);
|
||||
if (pPda) {
|
||||
sDevice = PDA_ZOOMFLASH;
|
||||
pZoomFlash = (CBagButtonObject *)pPda->GetObject(sDevice);
|
||||
|
@ -199,7 +199,7 @@ PARSE_CODES CBagRPObject::setInfo(CBagIfstream &istr) {
|
||||
|
||||
// Get the variable name from the definition line, then find it
|
||||
// in the global list.
|
||||
m_pTouchedVar = VARMNGR->GetVariable(sStr);
|
||||
m_pTouchedVar = VAR_MANAGER->GetVariable(sStr);
|
||||
|
||||
break;
|
||||
}
|
||||
@ -288,7 +288,7 @@ PARSE_CODES CBagRPObject::setInfo(CBagIfstream &istr) {
|
||||
// Get the variable name from the definition line, then find it
|
||||
// in the global list.
|
||||
GetAlphaNumFromStream(istr, sStr);
|
||||
m_pSaveVar = VARMNGR->GetVariable(sStr);
|
||||
m_pSaveVar = VAR_MANAGER->GetVariable(sStr);
|
||||
|
||||
// the variable must have been found, if it wasn't, then
|
||||
// complain violently.
|
||||
@ -356,7 +356,7 @@ PARSE_CODES CBagRPObject::setInfo(CBagIfstream &istr) {
|
||||
// Get the variable name from the definition line, then find it
|
||||
// in the global list.
|
||||
GetAlphaNumFromStream(istr, sStr);
|
||||
m_pVarObj = VARMNGR->GetVariable(sStr);
|
||||
m_pVarObj = VAR_MANAGER->GetVariable(sStr);
|
||||
|
||||
// the variable must have been found, if it wasn't, then
|
||||
// complain violently.
|
||||
@ -604,7 +604,7 @@ int CBagRPObject::RunRPQueue() {
|
||||
|
||||
// Get the turncount variable.
|
||||
if (m_pTurncount == nullptr) {
|
||||
m_pTurncount = VARMNGR->GetVariable("TURNCOUNT");
|
||||
m_pTurncount = VAR_MANAGER->GetVariable("TURNCOUNT");
|
||||
}
|
||||
//
|
||||
Assert(m_pTurncount != nullptr);
|
||||
@ -704,7 +704,7 @@ bool CBagRPObject::AddToMsgQueue(CBagRPObject *pRPObj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CBagLog *pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
CBagLog *pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
|
||||
if (pLogWld) {
|
||||
pRPObj->SetMsgWaiting(true); // mark this guy as waiting
|
||||
@ -808,9 +808,9 @@ bool CBagRPObject::ActivateRPObject() {
|
||||
|
||||
CBagLog *pLogWld;
|
||||
if (Zoomed()) {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
if (pLogWld == nullptr) {
|
||||
@ -868,9 +868,9 @@ void CBagRPObject::DeactivateRPObject() {
|
||||
|
||||
// Get the appropriate storage device
|
||||
if (Zoomed()) {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
// Can't bloody well do much without our storage device
|
||||
@ -930,9 +930,9 @@ void CBagRPObject::DeactivateRPReview() {
|
||||
|
||||
// Get the appropriate storage device
|
||||
if (Zoomed()) {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
// can't bloody well get anywhere without this info.
|
||||
@ -1016,7 +1016,7 @@ void CBagRPObject::EvaluateDossiers() {
|
||||
pDosLObj->m_pDossier->m_sSuspectVar.IsEmpty() == false) {
|
||||
|
||||
if (pLogZWld == nullptr) {
|
||||
pLogZWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogZWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
}
|
||||
|
||||
if (pLogZWld != nullptr) {
|
||||
@ -1038,11 +1038,11 @@ void CBagRPObject::SetLogState(RPSTATES eLogMode) {
|
||||
// Also, so we know where to return to, make sure we set the previous log
|
||||
// state to whatever LOG_STATE is right now.
|
||||
if (m_pLogStateVar == nullptr) {
|
||||
m_pLogStateVar = VARMNGR->GetVariable("LOG_STATE");
|
||||
m_pLogStateVar = VAR_MANAGER->GetVariable("LOG_STATE");
|
||||
}
|
||||
|
||||
if (m_pPrevLogStateVar == nullptr) {
|
||||
m_pPrevLogStateVar = VARMNGR->GetVariable("PREV_LOG_STATE");
|
||||
m_pPrevLogStateVar = VAR_MANAGER->GetVariable("PREV_LOG_STATE");
|
||||
}
|
||||
|
||||
Assert(m_pLogStateVar != nullptr && m_pPrevLogStateVar != nullptr);
|
||||
@ -1084,11 +1084,11 @@ void CBagRPObject::SetLogState(RPSTATES eLogMode) {
|
||||
|
||||
if (bSavePage || bRestorePage) {
|
||||
if (m_pPrevBarPage == nullptr) {
|
||||
m_pPrevBarPage = VARMNGR->GetVariable("PREV_BAR_LOG_PAGE");
|
||||
m_pPrevBarPage = VAR_MANAGER->GetVariable("PREV_BAR_LOG_PAGE");
|
||||
}
|
||||
|
||||
if (m_pCurBarPage == nullptr) {
|
||||
m_pCurBarPage = VARMNGR->GetVariable("CUR_BAR_LOG_PAGE");
|
||||
m_pCurBarPage = VAR_MANAGER->GetVariable("CUR_BAR_LOG_PAGE");
|
||||
}
|
||||
|
||||
if (m_pPrevBarPage && m_pCurBarPage) {
|
||||
@ -1109,7 +1109,7 @@ void CBagRPObject::SetLogState(RPSTATES eLogMode) {
|
||||
// Return the current log state
|
||||
RPSTATES CBagRPObject::GetLogState() {
|
||||
if (m_pLogStateVar == nullptr) {
|
||||
m_pLogStateVar = VARMNGR->GetVariable("LOG_STATE");
|
||||
m_pLogStateVar = VAR_MANAGER->GetVariable("LOG_STATE");
|
||||
}
|
||||
|
||||
m_eRPMode = RP_NOMODE;
|
||||
@ -1137,7 +1137,7 @@ RPSTATES CBagRPObject::GetLogState() {
|
||||
// Set the current number of pages in both script and code.
|
||||
void CBagRPObject::SetLogPages(int nPages) {
|
||||
if (m_pBarLogPages == nullptr) {
|
||||
m_pBarLogPages = VARMNGR->GetVariable("CODE_TOTAL_LOG_PAGES");
|
||||
m_pBarLogPages = VAR_MANAGER->GetVariable("CODE_TOTAL_LOG_PAGES");
|
||||
}
|
||||
|
||||
Assert(m_pBarLogPages != nullptr);
|
||||
@ -1149,9 +1149,9 @@ void CBagRPObject::SetLogPages(int nPages) {
|
||||
// Let the float code know how many pages we have.
|
||||
CBagLog *pLogWld;
|
||||
if (Zoomed()) {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
Assert(pLogWld != nullptr);
|
||||
@ -1341,9 +1341,9 @@ void CBagRPObject::HideRPReview() {
|
||||
CBagLog *pLogWld;
|
||||
|
||||
if (Zoomed()) {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
pRPObj = m_pRPList->GetNodeItem(0);
|
||||
@ -1375,9 +1375,9 @@ void CBagRPObject::ShowRPReview() {
|
||||
CBagLog *pLogWld;
|
||||
|
||||
if (Zoomed()) {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
|
||||
// Count items in this queue.
|
||||
@ -1442,7 +1442,7 @@ int CBagRPObject::RPResultsWaiting() {
|
||||
// Remove all residue print results from the message queue
|
||||
void CBagRPObject::RemoveAllFromMsgQueue(CBagRPObject *pCurRPObj) {
|
||||
// we really only care about the log world, not the logz.
|
||||
CBagLog *pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
CBagLog *pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
Assert(pLogWld != nullptr);
|
||||
int nCount = m_pRPList->GetCount();
|
||||
|
||||
@ -1462,12 +1462,12 @@ void CBagRPObject::RemoveAllFromMsgQueue(CBagRPObject *pCurRPObj) {
|
||||
// We're going to need to switch the PDA to log mode.
|
||||
void CBagRPObject::ShowPDALog() {
|
||||
if (Zoomed()) {
|
||||
SBZoomPda *pZoomPDA = (SBZoomPda *)SDEVMNGR->GetStorageDevice(PDAZWLD);
|
||||
SBZoomPda *pZoomPDA = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice(PDAZWLD);
|
||||
if (pZoomPDA) {
|
||||
pZoomPDA->showLog();
|
||||
}
|
||||
} else {
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice(PDAWLD);
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice(PDAWLD);
|
||||
if (pPDA) {
|
||||
pPDA->showLog();
|
||||
}
|
||||
@ -1475,7 +1475,7 @@ void CBagRPObject::ShowPDALog() {
|
||||
}
|
||||
|
||||
bool CBagRPObject::Zoomed() {
|
||||
SBZoomPda *pPDA = (SBZoomPda *)SDEVMNGR->GetStorageDevice(PDAZWLD);
|
||||
SBZoomPda *pPDA = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice(PDAZWLD);
|
||||
if (pPDA == nullptr) {
|
||||
return false;
|
||||
}
|
||||
@ -1490,9 +1490,9 @@ bool CBagRPObject::initialize() {
|
||||
DossierObj *pDosObj;
|
||||
|
||||
if (Zoomed()) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(LOGZWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(LOGZWLD);
|
||||
} else {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
}
|
||||
Assert(pSDev != nullptr);
|
||||
|
||||
@ -1565,12 +1565,12 @@ bool CBagRPObject::initialize() {
|
||||
// the zoom pda are propagated down to the regular PDA.
|
||||
void CBagRPObject::SynchronizeRPObjects(bool bLogFrontmost) {
|
||||
// only synchronize in the bar
|
||||
CBagVar *pVar = VARMNGR->GetVariable("INBAR");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("INBAR");
|
||||
if (pVar == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
CBagLog *pLogWld = (CBagLog *)SDEVMNGR->GetStorageDevice(LOGWLD);
|
||||
CBagLog *pLogWld = (CBagLog *)SDEV_MANAGER->GetStorageDevice(LOGWLD);
|
||||
if (pLogWld == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ ErrorCode CBagSaveGameFile::WriteSavedGame() {
|
||||
|
||||
// Populate the save data
|
||||
ST_BAGEL_SAVE saveData;
|
||||
g_engine->_masterWin->FillSaveBuffer(&saveData);
|
||||
g_engine->_masterWin->fillSaveBuffer(&saveData);
|
||||
|
||||
Common::String str = "./" + Common::String(saveData.m_szScript);
|
||||
str.replace('/', '\\');
|
||||
@ -211,7 +211,7 @@ ErrorCode CBagSaveGameFile::ReadSavedGame(int32 slotNum) {
|
||||
Common::strcpy_s(saveData.m_szScript, path + 2);
|
||||
|
||||
// Restore the game
|
||||
g_engine->_masterWin->DoRestore(&saveData);
|
||||
g_engine->_masterWin->doRestore(&saveData);
|
||||
}
|
||||
} else {
|
||||
_errCode = ERR_FREAD;
|
||||
|
@ -92,7 +92,7 @@ ErrorCode CBagSoundObject::detach() {
|
||||
}
|
||||
|
||||
bool CBagSoundObject::runObject() {
|
||||
if (((m_wFlags & SOUND_MIDI) && CBagMasterWin::GetMidi()) || (((m_wFlags & SOUND_WAVE) || (m_wFlags & SOUND_MIX)) && CBagMasterWin::GetDigitalAudio())) {
|
||||
if (((m_wFlags & SOUND_MIDI) && CBagMasterWin::getMidi()) || (((m_wFlags & SOUND_WAVE) || (m_wFlags & SOUND_MIX)) && CBagMasterWin::getDigitalAudio())) {
|
||||
|
||||
if (m_pSound && m_pMidiSound != m_pSound) {
|
||||
|
||||
@ -347,7 +347,7 @@ bool CBagSoundObject::IsQueued() {
|
||||
}
|
||||
|
||||
void CBagSoundObject::SetPlaying(bool bVal) {
|
||||
if (((m_wFlags & SOUND_MIDI) && CBagMasterWin::GetMidi()) || (((m_wFlags & SOUND_WAVE) || (m_wFlags & SOUND_MIX)) && CBagMasterWin::GetDigitalAudio())) {
|
||||
if (((m_wFlags & SOUND_MIDI) && CBagMasterWin::getMidi()) || (((m_wFlags & SOUND_WAVE) || (m_wFlags & SOUND_MIX)) && CBagMasterWin::getDigitalAudio())) {
|
||||
|
||||
if (bVal) {
|
||||
|
||||
|
@ -74,7 +74,7 @@ ErrorCode CBagSpriteObject::attach() {
|
||||
setProperty("CURR_CEL", getState());
|
||||
|
||||
// This might add something to the PDA, make sure it gets redrawn.
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
|
||||
if (pMainWin != nullptr) {
|
||||
pMainWin->SetPreFilterPan(true);
|
||||
|
@ -138,7 +138,7 @@ CBagStorageDev::CBagStorageDev() {
|
||||
// Not sure what the hell is going on here...
|
||||
SetLActivity(kMouseNONE);
|
||||
|
||||
SDEVMNGR->RegisterStorageDev(this);
|
||||
SDEV_MANAGER->RegisterStorageDev(this);
|
||||
}
|
||||
|
||||
CBagStorageDev::~CBagStorageDev() {
|
||||
@ -159,7 +159,7 @@ CBagStorageDev::~CBagStorageDev() {
|
||||
}
|
||||
} // If the lists belong to this storage device
|
||||
|
||||
SDEVMNGR->UnRegisterStorageDev(this);
|
||||
SDEV_MANAGER->UnRegisterStorageDev(this);
|
||||
|
||||
if (CBagStorageDevWnd::m_pEvtSDev == this) {
|
||||
CBagStorageDevWnd::m_pEvtSDev = nullptr;
|
||||
@ -482,7 +482,7 @@ ErrorCode CBagStorageDev::OnMouseOver(uint32 /*nFlags*/, CBofPoint * /*xPoint*/,
|
||||
|
||||
|
||||
void CBagStorageDev::onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *vpInfo) {
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::GetActiveCursor() == 6) {
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::getActiveCursor() == 6) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -508,11 +508,11 @@ void CBagStorageDev::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *vpInfo)
|
||||
char szLocalBuff[256];
|
||||
CBofString sCurrSDev(szLocalBuff, 256);
|
||||
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::GetActiveCursor() == 6) {
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::getActiveCursor() == 6) {
|
||||
return;
|
||||
}
|
||||
|
||||
sCurrSDev = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetName();
|
||||
sCurrSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetName();
|
||||
|
||||
*m_xCursorLocation = *xPoint;
|
||||
CBofPoint xCursorLocation = DevPtToViewPort(*xPoint);
|
||||
@ -555,7 +555,7 @@ void CBagStorageDev::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *vpInfo)
|
||||
|
||||
SetLActivity(kMouseNONE);
|
||||
|
||||
if (g_bAAOk && (sCurrSDev == (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetName()))) {
|
||||
if (g_bAAOk && (sCurrSDev == (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetName()))) {
|
||||
AttachActiveObjects();
|
||||
}
|
||||
|
||||
@ -992,7 +992,7 @@ ErrorCode CBagStorageDev::detach() {
|
||||
setBackground(nullptr);
|
||||
|
||||
// Notify the main window that we need to redraw the background filter.
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev());
|
||||
CBagStorageDevWnd *pMainWin = (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev());
|
||||
if (pMainWin != nullptr) {
|
||||
((CBagPanWindow *)pMainWin)->SetPreFilterPan(true);
|
||||
}
|
||||
@ -1216,7 +1216,7 @@ ErrorCode CBagStorageDevWnd::attach() {
|
||||
SetPreFilterPan(true);
|
||||
g_pLastWindow = this;
|
||||
|
||||
CBagStorageDev *pSDev = SDEVMNGR->GetStorageDevice("EVT_WLD");
|
||||
CBagStorageDev *pSDev = SDEV_MANAGER->GetStorageDevice("EVT_WLD");
|
||||
|
||||
if (pSDev != nullptr) {
|
||||
// Have we allocated one yet ?
|
||||
@ -1259,7 +1259,7 @@ void CBagStorageDevWnd::onTimer(uint32 nEventID) {
|
||||
// for the turncount dependent storage device.
|
||||
if (CBagEventSDev::getEvalTurnEvents() == true) {
|
||||
CBagEventSDev::setEvalTurnEvents(false);
|
||||
CBagTurnEventSDev *pSDev = (CBagTurnEventSDev *) SDEVMNGR->GetStorageDevice("TURN_WLD");
|
||||
CBagTurnEventSDev *pSDev = (CBagTurnEventSDev *) SDEV_MANAGER->GetStorageDevice("TURN_WLD");
|
||||
if (pSDev != nullptr) {
|
||||
// If unable to execute event world, try again next time through.
|
||||
if (pSDev->evaluateExpressions() == ERR_UNKNOWN) {
|
||||
@ -1294,7 +1294,7 @@ ErrorCode CBagStorageDevWnd::detach() {
|
||||
}
|
||||
|
||||
ErrorCode CBagStorageDevWnd::close() {
|
||||
CBagel::getBagApp()->getMasterWnd()->SetStorageDev(GetPrevSDev(), false);
|
||||
CBagel::getBagApp()->getMasterWnd()->setStorageDev(GetPrevSDev(), false);
|
||||
|
||||
return _errCode;
|
||||
}
|
||||
@ -1530,7 +1530,7 @@ void CBagStorageDevWnd::onMouseMove(uint32 n, CBofPoint *pPoint, void *) {
|
||||
void CBagStorageDevWnd::onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *) {
|
||||
// If asynch movie playing in PDA don't react to mouse down (8033)
|
||||
// if it's not a wait cursor, then allow the user to access that hotspot.
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::GetActiveCursor() == 6) {
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::getActiveCursor() == 6) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1541,7 +1541,7 @@ void CBagStorageDevWnd::onLButtonDown(uint32 nFlags, CBofPoint *xPoint, void *)
|
||||
void CBagStorageDevWnd::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *) {
|
||||
// If asynch movie playing in PDA don't react to mouse down (8033)
|
||||
// if it's not a wait cursor, then allow the user to access that hotspot.
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::GetActiveCursor() == 6) {
|
||||
if (CBagPDA::IsMoviePlaying() && CBagMasterWin::getActiveCursor() == 6) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1891,13 +1891,13 @@ CBagStorageDev *CBagStorageDevManager::GetStorageDevice(const CBofString &sName)
|
||||
bool CBagStorageDevManager::MoveObject(const CBofString &sDstName, const CBofString &sSrcName, const CBofString &sObjName) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
CBagStorageDev *pDstSDev = SDEVMNGR->GetStorageDevice(sDstName);
|
||||
CBagStorageDev *pDstSDev = SDEV_MANAGER->GetStorageDevice(sDstName);
|
||||
|
||||
// Find the storage device
|
||||
if (pDstSDev == nullptr)
|
||||
return false;
|
||||
|
||||
CBagStorageDev *pSrcSDev = SDEVMNGR->GetStorageDevice(sSrcName);
|
||||
CBagStorageDev *pSrcSDev = SDEV_MANAGER->GetStorageDevice(sSrcName);
|
||||
if (pSrcSDev == nullptr)
|
||||
return false;
|
||||
|
||||
@ -1915,7 +1915,7 @@ bool CBagStorageDevManager::MoveObject(const CBofString &sDstName, const CBofStr
|
||||
bool CBagStorageDevManager::AddObject(const CBofString &sDstName, const CBofString &sObjName) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
CBagStorageDev *pDstSDev = SDEVMNGR->GetStorageDevice(sDstName);
|
||||
CBagStorageDev *pDstSDev = SDEV_MANAGER->GetStorageDevice(sDstName);
|
||||
|
||||
// Find the storage device
|
||||
if (pDstSDev == nullptr)
|
||||
@ -1932,7 +1932,7 @@ bool CBagStorageDevManager::AddObject(const CBofString &sDstName, const CBofStri
|
||||
bool CBagStorageDevManager::RemoveObject(const CBofString &sSrcName, const CBofString &sObjName) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
CBagStorageDev *pSrcSDev = SDEVMNGR->GetStorageDevice(sSrcName);
|
||||
CBagStorageDev *pSrcSDev = SDEV_MANAGER->GetStorageDevice(sSrcName);
|
||||
|
||||
// Find the storage device
|
||||
if (pSrcSDev == nullptr)
|
||||
@ -2064,7 +2064,7 @@ bool CBagStorageDev::IsCIC() {
|
||||
|
||||
sStr = "BPDAZ_WLD";
|
||||
if (m_sName == sStr) {
|
||||
return GetCICStatus();
|
||||
return getCICStatus();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -324,7 +324,6 @@ public:
|
||||
return xPoint;
|
||||
}
|
||||
|
||||
// virtual ErrorCode SaveFile(ostream& fpOutput);
|
||||
virtual ErrorCode LoadFile(const CBofString &sFile);
|
||||
virtual ErrorCode LoadFileFromStream(CBagIfstream &fpInput, const CBofString &sWldName, bool bAttach = true);
|
||||
|
||||
|
@ -157,7 +157,7 @@ ErrorCode CBagTextObject::attach() {
|
||||
*m_psText += pTextBuff;
|
||||
|
||||
if (m_psInitInfo != nullptr) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable(*m_psInitInfo);
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(*m_psInitInfo);
|
||||
|
||||
if (pVar != nullptr) {
|
||||
m_bReAttach = true;
|
||||
@ -475,7 +475,7 @@ bool CBagTextObject::runObject() {
|
||||
if (pApp != nullptr) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
CBagStorageDevWnd *pParent = pWin->GetCurrentStorageDev();
|
||||
CBagStorageDevWnd *pParent = pWin->getCurrentStorageDev();
|
||||
|
||||
CBofRect cRect(80, 10, 80 + 480 /*- 1 */, 10 + getRect().height() - 1 + 5);
|
||||
CBofPoint cPoint(0, 0);
|
||||
@ -492,13 +492,13 @@ bool CBagTextObject::runObject() {
|
||||
|
||||
CBagPDA *pPDA = nullptr;
|
||||
sStr = "BPDA_WLD";
|
||||
pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice(sStr);
|
||||
pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice(sStr);
|
||||
|
||||
// If we're in the zoom pda then put this box at the
|
||||
// bottom of the zoom rect.
|
||||
SBZoomPda *pPDAZ = nullptr;
|
||||
sStr = "BPDAZ_WLD";
|
||||
pPDAZ = (SBZoomPda *)SDEVMNGR->GetStorageDevice(sStr);
|
||||
pPDAZ = (SBZoomPda *)SDEV_MANAGER->GetStorageDevice(sStr);
|
||||
|
||||
if (pPDAZ && pPDAZ->getZoomed() == true) {
|
||||
CBofRect zRect = pPDAZ->getViewRect();
|
||||
@ -550,7 +550,7 @@ void CBagTextObject::RecalcTextRect(bool bTextFromFile) {
|
||||
Assert(m_psText != nullptr);
|
||||
|
||||
// The window where the object are displayed
|
||||
CBagPanWindow *pPanWin = (CBagPanWindow *)(CBagel::getBagApp()->getMasterWnd()->GetCurrentGameWindow());
|
||||
CBagPanWindow *pPanWin = (CBagPanWindow *)(CBagel::getBagApp()->getMasterWnd()->getCurrentGameWindow());
|
||||
if (bTextFromFile) {
|
||||
if (pPanWin->GetDeviceType() == SDEV_GAMEWIN) {
|
||||
ViewRect = pPanWin->GetViewPort();
|
||||
|
@ -260,7 +260,7 @@ ErrorCode CBagTimeObject::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect * /*pS
|
||||
CBofString sTimeString(szLocalBuff, 256);
|
||||
ErrorCode rc = ERR_NONE;
|
||||
|
||||
CBagVar *xVar = VARMNGR->GetVariable(m_sVariable);
|
||||
CBagVar *xVar = VAR_MANAGER->GetVariable(m_sVariable);
|
||||
|
||||
// If everything looks good
|
||||
if (isAttached() && xVar && !(xVar->GetValue().IsEmpty())) {
|
||||
@ -311,7 +311,7 @@ ErrorCode CBagTimeObject::Update(CBofWindow *pWnd, CBofPoint pt, CBofRect *, int
|
||||
|
||||
ErrorCode rc = ERR_NONE;
|
||||
|
||||
CBagVar *xVar = VARMNGR->GetVariable(m_sVariable);
|
||||
CBagVar *xVar = VAR_MANAGER->GetVariable(m_sVariable);
|
||||
|
||||
// If everything looks good
|
||||
if (isAttached() && xVar && !(xVar->GetValue().IsEmpty())) {
|
||||
|
@ -42,7 +42,7 @@ CBagVar::CBagVar() {
|
||||
setTimer(false);
|
||||
SetString();
|
||||
SetRandom(false);
|
||||
VARMNGR->RegisterVariable(this);
|
||||
VAR_MANAGER->RegisterVariable(this);
|
||||
}
|
||||
|
||||
CBagVar::CBagVar(const CBofString &sName, const CBofString &sValue, bool bAddToList) {
|
||||
@ -57,14 +57,14 @@ CBagVar::CBagVar(const CBofString &sName, const CBofString &sValue, bool bAddToL
|
||||
SetGlobal(false);
|
||||
|
||||
if (bAddToList)
|
||||
VARMNGR->RegisterVariable(this);
|
||||
VAR_MANAGER->RegisterVariable(this);
|
||||
}
|
||||
|
||||
CBagVar::~CBagVar() {
|
||||
if (CBagel::getBagApp() &&
|
||||
CBagel::getBagApp()->getMasterWnd() &&
|
||||
CBagel::getBagApp()->getMasterWnd()->GetVariableManager())
|
||||
VARMNGR->UnRegisterVariable(this);
|
||||
CBagel::getBagApp()->getMasterWnd()->getVariableManager())
|
||||
VAR_MANAGER->UnRegisterVariable(this);
|
||||
}
|
||||
|
||||
void CBagVar::SetValue(const CBofString &s) {
|
||||
@ -85,7 +85,7 @@ const CBofString &CBagVar::GetValue() {
|
||||
// asked him about betting, it hangs him. Work around this by force setting
|
||||
// betting to have been discussed
|
||||
if (m_sVarName == "BETWITHDEVEN") {
|
||||
if (VARMNGR->GetVariable("DEVENCODE1")->GetValue() != "NOTSETYET")
|
||||
if (VAR_MANAGER->GetVariable("DEVENCODE1")->GetValue() != "NOTSETYET")
|
||||
// Finished flashback, so ensure betting flag is set
|
||||
m_sVarValue = "1";
|
||||
}
|
||||
@ -93,16 +93,16 @@ const CBofString &CBagVar::GetValue() {
|
||||
// Check if these items should be replaced by the current sdev
|
||||
if (!m_sVarName.IsEmpty() && !m_sVarName.Find(CURRSDEV_TOKEN)) {
|
||||
CBofString CurrSDev;
|
||||
if (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()) {
|
||||
m_sVarValue = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetName();
|
||||
if (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()) {
|
||||
m_sVarValue = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetName();
|
||||
}
|
||||
} else {
|
||||
|
||||
// Check if these items should be replaced by the previous sdev
|
||||
if (!m_sVarName.IsEmpty() && !m_sVarName.Find(PREVSDEV_TOKEN)) {
|
||||
CBofString CurrSDev;
|
||||
if (CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()) {
|
||||
m_sVarValue = CBagel::getBagApp()->getMasterWnd()->GetCurrentStorageDev()->GetPrevSDev();
|
||||
if (CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()) {
|
||||
m_sVarValue = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev()->GetPrevSDev();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -168,13 +168,13 @@ PARSE_CODES CBagVar::setInfo(CBagIfstream &istr) {
|
||||
GetAlphaNumFromStream(istr, sStr);
|
||||
if (!sStr.Find("TIMER")) {
|
||||
setTimer();
|
||||
VARMNGR->UpdateRegistration();
|
||||
VAR_MANAGER->UpdateRegistration();
|
||||
} else if (!sStr.Find("RANDOM")) {
|
||||
SetRandom(true);
|
||||
VARMNGR->UpdateRegistration();
|
||||
VAR_MANAGER->UpdateRegistration();
|
||||
} else if (!sStr.Find("GLOBAL")) {
|
||||
SetGlobal(true);
|
||||
VARMNGR->UpdateRegistration();
|
||||
VAR_MANAGER->UpdateRegistration();
|
||||
} else {
|
||||
PutbackStringOnStream(istr, sStr);
|
||||
PutbackStringOnStream(istr, "AS ");
|
||||
@ -367,12 +367,12 @@ void CBagVar::SetName(const CBofString &s) {
|
||||
if (pApp) {
|
||||
CBagMasterWin *pMainWin = pApp->getMasterWnd();
|
||||
|
||||
if (!s.IsEmpty() && pMainWin && pMainWin->GetVariableManager()) {
|
||||
if (!s.IsEmpty() && pMainWin && pMainWin->getVariableManager()) {
|
||||
char szLocalBuff[256];
|
||||
CBofString varStr(szLocalBuff, 256);
|
||||
varStr = m_sVarName;
|
||||
int nHashVal = HASHVAR(szLocalBuff, varStr.GetLength());
|
||||
VARMNGR->m_xVarHashList[nHashVal].addToTail(this);
|
||||
VAR_MANAGER->m_xVarHashList[nHashVal].addToTail(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ CBagVariableObject::~CBagVariableObject() {
|
||||
}
|
||||
|
||||
ErrorCode CBagVariableObject::attach() {
|
||||
CBagVar *xVar = VARMNGR->GetVariable(getFileName());
|
||||
CBagVar *xVar = VAR_MANAGER->GetVariable(getFileName());
|
||||
|
||||
if (xVar && !GetRefName().IsEmpty())
|
||||
xVar->SetValue(GetRefName());
|
||||
@ -152,7 +152,7 @@ PARSE_CODES CBagVariableObject::setInfo(CBagIfstream &istr) {
|
||||
|
||||
ErrorCode CBagVariableObject::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *pSrcRect, int) {
|
||||
ErrorCode rc = ERR_NONE;
|
||||
CBagVar *xVar = VARMNGR->GetVariable(getFileName());
|
||||
CBagVar *xVar = VAR_MANAGER->GetVariable(getFileName());
|
||||
|
||||
if (isAttached() && xVar && !(xVar->GetValue().IsEmpty())) {
|
||||
// FIXME: Offset for the last accessed time and # times counter in
|
||||
@ -178,7 +178,7 @@ ErrorCode CBagVariableObject::update(CBofBitmap *pBmp, CBofPoint pt, CBofRect *p
|
||||
|
||||
ErrorCode CBagVariableObject::Update(CBofWindow *pWnd, CBofPoint pt, CBofRect *pSrcRect, int) {
|
||||
ErrorCode rc = ERR_NONE;
|
||||
CBagVar *xVar = VARMNGR->GetVariable(getFileName());
|
||||
CBagVar *xVar = VAR_MANAGER->GetVariable(getFileName());
|
||||
|
||||
if (isAttached() && xVar && !(xVar->GetValue().IsEmpty())) {
|
||||
CBofRect r(pt, pSrcRect->Size());
|
||||
|
@ -105,7 +105,7 @@ ErrorCode CBagWield::activateLocalObject(CBagObject *pObj) {
|
||||
|
||||
if (pPrevObj != nullptr) {
|
||||
// Move current object to stash
|
||||
SDEVMNGR->MoveObject("INV_WLD", GetName(), pPrevObj->GetRefName());
|
||||
SDEV_MANAGER->MoveObject("INV_WLD", GetName(), pPrevObj->GetRefName());
|
||||
|
||||
} else {
|
||||
ReportError(ERR_UNKNOWN, "Wielded Object has been lost");
|
||||
|
@ -142,7 +142,7 @@ ErrorCode SBZoomPda::attach() {
|
||||
if (rc == ERR_NONE) {
|
||||
CBagStorageDev *pSDev;
|
||||
if (!_mooWnd) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(ZOOMMOOWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(ZOOMMOOWLD);
|
||||
|
||||
if (pSDev != nullptr) {
|
||||
_mooWnd = (CBagStorageDevBmp *)pSDev;
|
||||
@ -157,7 +157,7 @@ ErrorCode SBZoomPda::attach() {
|
||||
}
|
||||
|
||||
if (!_invWnd) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(ZOOMINVWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(ZOOMINVWLD);
|
||||
if (pSDev != nullptr) {
|
||||
_invWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_invWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
@ -175,7 +175,7 @@ ErrorCode SBZoomPda::attach() {
|
||||
}
|
||||
|
||||
if (!_mapWnd) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(ZOOMMAPWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(ZOOMMAPWLD);
|
||||
if (pSDev != nullptr) {
|
||||
_mapWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_mapWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
@ -193,7 +193,7 @@ ErrorCode SBZoomPda::attach() {
|
||||
}
|
||||
|
||||
if (!_logWnd) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(ZOOMLOGWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(ZOOMLOGWLD);
|
||||
if (pSDev != nullptr) {
|
||||
_logWnd = (CBagStorageDevBmp *)pSDev;
|
||||
_logWnd->SetAssociateWnd(GetAssociateWnd());
|
||||
|
@ -43,7 +43,7 @@ bool EventLoop::frame() {
|
||||
|
||||
// Update the screen
|
||||
if (_mode == FORCE_REPAINT)
|
||||
CBagMasterWin::ForcePaintScreen();
|
||||
CBagMasterWin::forcePaintScreen();
|
||||
g_engine->_screen->update();
|
||||
|
||||
_limiter.startFrame();
|
||||
|
@ -46,7 +46,7 @@ bool Console::cmdVar(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
CBagVar *var = VARMNGR->GetVariable(argv[1]);
|
||||
CBagVar *var = VAR_MANAGER->GetVariable(argv[1]);
|
||||
assert(var);
|
||||
|
||||
if (argc == 2) {
|
||||
@ -60,8 +60,8 @@ bool Console::cmdVar(int argc, const char **argv) {
|
||||
}
|
||||
|
||||
bool Console::cmdVars(int argc, const char **argv) {
|
||||
for (int i = 0; i < VARMNGR->GetNumVars(); i++) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable(i);
|
||||
for (int i = 0; i < VAR_MANAGER->GetNumVars(); i++) {
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(i);
|
||||
if (pVar != nullptr) {
|
||||
debugPrintf("VAR[%d]: %s = %s\n", i, (const char *)pVar->GetName(),
|
||||
(const char *)pVar->GetValue());
|
||||
@ -72,8 +72,8 @@ bool Console::cmdVars(int argc, const char **argv) {
|
||||
}
|
||||
|
||||
bool Console::cmdFleebix(int argc, const char **argv) {
|
||||
CBofString inner = VARMNGR->GetVariable("NDJAM_INNERDIAL_DISPLAY")->GetValue();
|
||||
CBofString outer = VARMNGR->GetVariable("NDJAM_OUTERDIAL_DISPLAY")->GetValue();
|
||||
CBofString inner = VAR_MANAGER->GetVariable("NDJAM_INNERDIAL_DISPLAY")->GetValue();
|
||||
CBofString outer = VAR_MANAGER->GetVariable("NDJAM_OUTERDIAL_DISPLAY")->GetValue();
|
||||
|
||||
debugPrintf("Frequency is %s.%s\n", inner.GetBuffer(), outer.GetBuffer());
|
||||
return true;
|
||||
|
@ -406,8 +406,8 @@ void CBagOptWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->GetCurrentGameWindow() != nullptr) {
|
||||
pWin->OnHelp(((CBagStorageDevWnd *)pWin->GetCurrentGameWindow())->GetHelpFilename(), false, this);
|
||||
if ((pWin != nullptr) && pWin->getCurrentGameWindow() != nullptr) {
|
||||
pWin->onHelp(((CBagStorageDevWnd *)pWin->getCurrentGameWindow())->GetHelpFilename(), false, this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -417,7 +417,7 @@ void CBagOptWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
pWin->ShowCreditsDialog(this);
|
||||
pWin->showCreditsDialog(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -434,7 +434,7 @@ void CBagOptWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->ShowQuitDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showQuitDialog(this)) {
|
||||
_nReturnValue = 0;
|
||||
killBackground();
|
||||
close();
|
||||
@ -450,7 +450,7 @@ void CBagOptWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
pWin->ShowSaveDialog(this);
|
||||
pWin->showSaveDialog(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -461,7 +461,7 @@ void CBagOptWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->ShowRestoreDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showRestoreDialog(this)) {
|
||||
// Can't restore a deleted palette
|
||||
_pSavePalette = nullptr;
|
||||
|
||||
@ -476,7 +476,7 @@ void CBagOptWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->ShowRestartDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showRestartDialog(this)) {
|
||||
// Can't restore a deleted palette
|
||||
_pSavePalette = nullptr;
|
||||
|
||||
@ -555,8 +555,8 @@ void CBagOptWindow::saveOutNewSettings() {
|
||||
// Set current Pan correction
|
||||
if (pWin != nullptr) {
|
||||
|
||||
int n = pWin->GetCorrection();
|
||||
CBagStorageDevWnd *pSDev = pWin->GetCurrentStorageDev();
|
||||
int n = pWin->getCorrection();
|
||||
CBagStorageDevWnd *pSDev = pWin->getCurrentStorageDev();
|
||||
if ((pSDev != nullptr) && pSDev->GetDeviceType() == SDEV_GAMEWIN) {
|
||||
CBagPanWindow *pPan = (CBagPanWindow *)pSDev;
|
||||
|
||||
@ -642,8 +642,8 @@ void CBagOptWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && (pWin->GetCurrentGameWindow() != nullptr)) {
|
||||
pWin->OnHelp(((CBagStorageDevWnd *)pWin->GetCurrentGameWindow())->GetHelpFilename(), false, this);
|
||||
if ((pWin != nullptr) && (pWin->getCurrentGameWindow() != nullptr)) {
|
||||
pWin->onHelp(((CBagStorageDevWnd *)pWin->getCurrentGameWindow())->GetHelpFilename(), false, this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -656,7 +656,7 @@ void CBagOptWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
pWin->ShowSaveDialog(this);
|
||||
pWin->showSaveDialog(this);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -667,7 +667,7 @@ void CBagOptWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->ShowRestoreDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showRestoreDialog(this)) {
|
||||
// Can't restore a deleted palette
|
||||
_pSavePalette = nullptr;
|
||||
|
||||
@ -682,7 +682,7 @@ void CBagOptWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->ShowRestartDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showRestartDialog(this)) {
|
||||
// Can't restore a deleted palette
|
||||
_pSavePalette = nullptr;
|
||||
|
||||
@ -698,7 +698,7 @@ void CBagOptWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
pApp = CBagel::getBagApp();
|
||||
if (pApp != nullptr) {
|
||||
pWin = pApp->getMasterWnd();
|
||||
if ((pWin != nullptr) && pWin->ShowQuitDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showQuitDialog(this)) {
|
||||
_nReturnValue = 0;
|
||||
killBackground();
|
||||
close();
|
||||
|
@ -159,7 +159,7 @@ void CBagQuitDialog::onBofButton(CBofObject *pObject, int nFlags) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
|
||||
bQuit = pWin->ShowSaveDialog(this, false);
|
||||
bQuit = pWin->showSaveDialog(this, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ void CBagRestartDialog::onKeyHit(uint32 lKey, uint32 nRepCount) {
|
||||
CBofCursor::hide();
|
||||
paintBitmap(this, cStr, &cRect);
|
||||
|
||||
pWin->NewGame();
|
||||
pWin->newGame();
|
||||
CBofCursor::show();
|
||||
|
||||
killBackground();
|
||||
@ -228,7 +228,7 @@ void CBagRestartDialog::onBofButton(CBofObject *pObject, int nFlags) {
|
||||
CBofCursor::hide();
|
||||
paintBitmap(this, cStr, &cRect);
|
||||
|
||||
pWin->NewGame();
|
||||
pWin->newGame();
|
||||
CBofCursor::show();
|
||||
|
||||
killBackground();
|
||||
|
@ -161,7 +161,7 @@ void CBagStartDialog::onBofButton(CBofObject *pObject, int nFlags) {
|
||||
if (pApp != nullptr) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
|
||||
if ((pWin != nullptr) && pWin->ShowRestoreDialog(this)) {
|
||||
if ((pWin != nullptr) && pWin->showRestoreDialog(this)) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ ErrorCode SBarBibOddsWnd::detach() {
|
||||
}
|
||||
|
||||
if (_wieldedObject) {
|
||||
SDEVMNGR->AddObject(CBagPanWindow::_pWieldBmp->GetName(), _wieldedObject->GetRefName());
|
||||
SDEV_MANAGER->AddObject(CBagPanWindow::_pWieldBmp->GetName(), _wieldedObject->GetRefName());
|
||||
_wieldedObject = nullptr;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ ErrorCode SBarBibOddsWnd::detach() {
|
||||
}
|
||||
|
||||
void SBarBibOddsWnd::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable("TORSOSTATE");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("TORSOSTATE");
|
||||
|
||||
if (pVar != nullptr) {
|
||||
CBofString StateStr = pVar->GetValue();
|
||||
@ -122,7 +122,7 @@ ErrorCode SBarBibOddsWnd::attach() {
|
||||
// If we have something wielded, put it on hold for now.
|
||||
if (CBagPanWindow::_pWieldBmp != nullptr) {
|
||||
if ((_wieldedObject = CBagPanWindow::_pWieldBmp->GetCurrObj()) != nullptr) {
|
||||
SDEVMNGR->RemoveObject(CBagPanWindow::_pWieldBmp->GetName(), _wieldedObject->GetRefName());
|
||||
SDEV_MANAGER->RemoveObject(CBagPanWindow::_pWieldBmp->GetName(), _wieldedObject->GetRefName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -267,13 +267,13 @@ ErrorCode CBibbleWindow::attach() {
|
||||
|
||||
CBagVar *pVar;
|
||||
|
||||
if ((pVar = VARMNGR->GetVariable("NUGGETS")) != nullptr) {
|
||||
if ((pVar = VAR_MANAGER->GetVariable("NUGGETS")) != nullptr) {
|
||||
_nNumCredits = pVar->GetNumValue();
|
||||
}
|
||||
LogInfo(BuildString("\tCredits: %d", _nNumCredits));
|
||||
|
||||
g_bBibbleHack = false;
|
||||
if ((pVar = VARMNGR->GetVariable("BIBBLEHACK")) != nullptr) {
|
||||
if ((pVar = VAR_MANAGER->GetVariable("BIBBLEHACK")) != nullptr) {
|
||||
if (pVar->GetNumValue() != 0) {
|
||||
g_bBibbleHack = true;
|
||||
}
|
||||
@ -281,7 +281,7 @@ ErrorCode CBibbleWindow::attach() {
|
||||
|
||||
// If player has modified the payoffs, then load new payoffs from Bar script
|
||||
if (g_bBibbleHack) {
|
||||
CBagStorageDev *pSDev = SDEVMNGR->GetStorageDevice("BGNM_WLD");
|
||||
CBagStorageDev *pSDev = SDEV_MANAGER->GetStorageDevice("BGNM_WLD");
|
||||
|
||||
if (pSDev != nullptr) {
|
||||
for (int i = 0; i < BIBBLE_NUM_BET_AREAS; i++) {
|
||||
@ -446,7 +446,7 @@ ErrorCode CBibbleWindow::detach() {
|
||||
|
||||
// Write out new value of nuggets
|
||||
CBagVar *pVar;
|
||||
if ((pVar = VARMNGR->GetVariable("NUGGETS")) != nullptr) {
|
||||
if ((pVar = VAR_MANAGER->GetVariable("NUGGETS")) != nullptr) {
|
||||
pVar->SetValue(_nNumCredits);
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ ErrorCode CBibbleWindow::detach() {
|
||||
CBagStorageDevWnd::detach();
|
||||
|
||||
// Playing BibbleBonk has made 1 turn go by.
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
|
||||
return _errCode;
|
||||
}
|
||||
@ -658,7 +658,7 @@ void CBibbleWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
if (pApp != nullptr) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
pWin->OnHelp(BuildDir("BIBBLE.TXT"));
|
||||
pWin->onHelp(BuildDir("BIBBLE.TXT"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -690,8 +690,8 @@ 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);
|
||||
WaitForInput();
|
||||
paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
|
||||
waitForInput();
|
||||
|
||||
cBmp.paint(this, &cRect);
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ ErrorCode SBarComputer::detach() {
|
||||
CBagStorageDevWnd::detach();
|
||||
|
||||
// Going into mr drinkmaster makes 1 turn go by
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
|
||||
LogInfo("Detached SBarComputer");
|
||||
|
||||
@ -706,8 +706,8 @@ void SBarComputer::order() {
|
||||
|
||||
// Deduct 1 Nugget from the player
|
||||
// Read in their total nuggets from game
|
||||
CBagVar *pVar = VARMNGR->GetVariable("NUGGETS");
|
||||
CBagVar *pVar2 = VARMNGR->GetVariable("HAVEDRINK");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("NUGGETS");
|
||||
CBagVar *pVar2 = VAR_MANAGER->GetVariable("HAVEDRINK");
|
||||
|
||||
if (pVar) {
|
||||
int nCredits = pVar->GetNumValue();
|
||||
@ -717,15 +717,15 @@ 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, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
|
||||
|
||||
WaitForInput();
|
||||
waitForInput();
|
||||
|
||||
saveBackground.paint(this, &_compTextWindow);
|
||||
|
||||
} else {
|
||||
CBagStorageDev *pSoldierSDev = nullptr;
|
||||
pSoldierSDev = SDEVMNGR->GetStorageDevice("SOLDIER_WLD");
|
||||
pSoldierSDev = SDEV_MANAGER->GetStorageDevice("SOLDIER_WLD");
|
||||
|
||||
CBofBitmap saveBackgroundTwo(640, 480, (CBofPalette *)nullptr, false);
|
||||
saveBackgroundTwo.captureScreen(this, &_compTextWindow);
|
||||
@ -757,8 +757,8 @@ void SBarComputer::order() {
|
||||
}
|
||||
|
||||
if (bRefuse) {
|
||||
PaintBeveledText(this, &_compTextWindow, szRefuse, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
|
||||
WaitForInput();
|
||||
paintBeveledText(this, &_compTextWindow, szRefuse, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
|
||||
waitForInput();
|
||||
|
||||
saveBackgroundTwo.paint(this, &_compTextWindow);
|
||||
}
|
||||
@ -842,7 +842,7 @@ void SBarComputer::onBofButton(CBofObject *pObject, int nState) {
|
||||
if (pApp != nullptr) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
pWin->OnHelp(BuildBarcDir("BARCOMP.TXT"));
|
||||
pWin->onHelp(BuildBarcDir("BARCOMP.TXT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -236,43 +236,43 @@ static void GetVilVars() {
|
||||
|
||||
// check if HUD is on
|
||||
cStr = "HUDON";
|
||||
g_pHudOn = VARMNGR->GetVariable(cStr);
|
||||
g_pHudOn = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "DGRAFITTI";
|
||||
g_pDGrafiti = VARMNGR->GetVariable(cStr);
|
||||
g_pDGrafiti = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "DRADIO";
|
||||
g_pDRadio = VARMNGR->GetVariable(cStr);
|
||||
g_pDRadio = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "PRECIPITATION";
|
||||
g_pPrecip = VARMNGR->GetVariable(cStr);
|
||||
g_pPrecip = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "PRECDECIMAL";
|
||||
g_pPrecDecimal = VARMNGR->GetVariable(cStr);
|
||||
g_pPrecDecimal = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "DUST";
|
||||
g_pDust = VARMNGR->GetVariable(cStr);
|
||||
g_pDust = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "DUSTDECIMAL";
|
||||
g_pDustDecimal = VARMNGR->GetVariable(cStr);
|
||||
g_pDustDecimal = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "DVOICEID";
|
||||
g_pDVoiceID = VARMNGR->GetVariable(cStr);
|
||||
g_pDVoiceID = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "DCHIPID";
|
||||
g_pDChipID = VARMNGR->GetVariable(cStr);
|
||||
g_pDChipID = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "TDIG1";
|
||||
g_pTDig1 = VARMNGR->GetVariable(cStr);
|
||||
g_pTDig1 = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "TDIG2";
|
||||
g_pTDig2 = VARMNGR->GetVariable(cStr);
|
||||
g_pTDig2 = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "TDIG3";
|
||||
g_pTDig3 = VARMNGR->GetVariable(cStr);
|
||||
g_pTDig3 = VAR_MANAGER->GetVariable(cStr);
|
||||
|
||||
cStr = "TDIG4";
|
||||
g_pTDig4 = VARMNGR->GetVariable(cStr);
|
||||
g_pTDig4 = VAR_MANAGER->GetVariable(cStr);
|
||||
}
|
||||
|
||||
|
||||
@ -574,7 +574,7 @@ static bool VildroidFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
MACROREPLACE(cString);
|
||||
BofPlaySound(cString, SOUND_WAVE | SOUND_MIX);
|
||||
CBagStorageDev *pWieldSDev = nullptr;
|
||||
pWieldSDev = SDEVMNGR->GetStorageDevice("BWIELD_WLD");
|
||||
pWieldSDev = SDEV_MANAGER->GetStorageDevice("BWIELD_WLD");
|
||||
if (chipID == 1)
|
||||
pWieldSDev->activateLocalObject("GREENCHIP");
|
||||
else
|
||||
@ -606,7 +606,7 @@ static bool TriFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
g_engine->viewRect.IntersectRect(pBmp->getRect(), g_engine->viewPortRect);
|
||||
}
|
||||
|
||||
if (VARMNGR->GetVariable("GLASSESON")->GetNumValue()) {
|
||||
if (VAR_MANAGER->GetVariable("GLASSESON")->GetNumValue()) {
|
||||
CBofRect SrcRect(pTriBmp->getRect());
|
||||
pTriBmp->paint(pBmp, g_engine->viewRect.left, g_engine->viewRect.top, &SrcRect, 1);
|
||||
}
|
||||
@ -632,7 +632,7 @@ static bool ZzazzlFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
}
|
||||
|
||||
zStr = "ZZAZZLVISION";
|
||||
CBagVar *pVar = VARMNGR->GetVariable(zStr);
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(zStr);
|
||||
if (pVar != nullptr) {
|
||||
|
||||
bZzazzlVision = true;
|
||||
@ -697,7 +697,7 @@ static bool HalucinateFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
|
||||
hStr = "HALLUCINATE";
|
||||
|
||||
if (VARMNGR->GetVariable(hStr)->GetNumValue() > 0) {
|
||||
if (VAR_MANAGER->GetVariable(hStr)->GetNumValue() > 0) {
|
||||
bHallucinating = true;
|
||||
CBofPalette *pPal = pBmp->getPalette();
|
||||
CBofBitmap *pTempBitmap = new CBofBitmap(g_engine->viewRect.width(), g_engine->viewRect.height(), pPal);
|
||||
@ -749,7 +749,7 @@ static bool LightningFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
char szVBuf[256];
|
||||
CBofString vStr(szVBuf, 256);
|
||||
vStr = "LIGHTNINGDELAY";
|
||||
CBagVar *pVar = VARMNGR->GetVariable(vStr);
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(vStr);
|
||||
int nLightningDelay = 0;
|
||||
|
||||
if (pVar != nullptr) {
|
||||
|
@ -40,7 +40,7 @@ ErrorCode SBarFullWnd::attach() {
|
||||
if (CBagPanWindow::_pWieldBmp != nullptr) {
|
||||
_pWieldedObject = CBagPanWindow::_pWieldBmp->GetCurrObj();
|
||||
if (_pWieldedObject != nullptr) {
|
||||
SDEVMNGR->RemoveObject(CBagPanWindow::_pWieldBmp->GetName(), _pWieldedObject->GetRefName());
|
||||
SDEV_MANAGER->RemoveObject(CBagPanWindow::_pWieldBmp->GetName(), _pWieldedObject->GetRefName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ ErrorCode SBarFullWnd::detach() {
|
||||
CBagStorageDevWnd::detach();
|
||||
|
||||
if (_pWieldedObject) {
|
||||
SDEVMNGR->AddObject(CBagPanWindow::_pWieldBmp->GetName(), _pWieldedObject->GetRefName());
|
||||
SDEV_MANAGER->AddObject(CBagPanWindow::_pWieldBmp->GetName(), _pWieldedObject->GetRefName());
|
||||
_pWieldedObject = nullptr;
|
||||
}
|
||||
|
||||
|
@ -37,12 +37,12 @@ void CMainLinkObject::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info)
|
||||
CMainWindow *pWnd = (CMainWindow *)info;
|
||||
|
||||
if (pWnd && pWnd->GameMode() == CMainWindow::VRPLAYMODE) {
|
||||
if (CBagMasterWin::GetFlyThru()) {
|
||||
if (CBagMasterWin::getFlyThru()) {
|
||||
pWnd->RotateTo(getSrcLoc(), 12);
|
||||
}
|
||||
|
||||
// Set the link position for the storage device we are about to jump to
|
||||
CBagStorageDev *pDestWin = SDEVMNGR->GetStorageDevice(getFileName());
|
||||
CBagStorageDev *pDestWin = SDEV_MANAGER->GetStorageDevice(getFileName());
|
||||
if (pDestWin != nullptr) {
|
||||
pDestWin->SetLoadFilePos(getDestLoc());
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ ErrorCode CMainWindow::attach() {
|
||||
|
||||
g_allowPaintFl = true;
|
||||
|
||||
CBagStorageDev *pSDev = SDEVMNGR->GetStorageDevice(GetPrevSDev());
|
||||
CBagStorageDev *pSDev = SDEV_MANAGER->GetStorageDevice(GetPrevSDev());
|
||||
if (pSDev && pSDev->GetDeviceType() == SDEV_ZOOMPDA) {
|
||||
bForegroundObj = false;
|
||||
}
|
||||
@ -133,7 +133,7 @@ ErrorCode CMainWindow::attach() {
|
||||
|
||||
if (m_nGameMode == VRPLAYMODE && bForegroundObj == true) {
|
||||
if (!m_pThudBmp) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(THUDWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(THUDWLD);
|
||||
if (pSDev != nullptr) {
|
||||
m_pThudBmp = (SBarThud *)pSDev;
|
||||
m_pThudBmp->SetAssociateWnd(this);
|
||||
@ -151,7 +151,7 @@ ErrorCode CMainWindow::attach() {
|
||||
}
|
||||
|
||||
if (!_pWieldBmp) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(WIELDWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(WIELDWLD);
|
||||
if (pSDev != nullptr) {
|
||||
_pWieldBmp = (CBagWield *)pSDev;
|
||||
_pWieldBmp->SetAssociateWnd(this);
|
||||
@ -179,7 +179,7 @@ ErrorCode CMainWindow::attach() {
|
||||
|
||||
// Create the PDA for the game
|
||||
if (!m_pPDABmp) {
|
||||
pSDev = SDEVMNGR->GetStorageDevice(PDAWLD);
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice(PDAWLD);
|
||||
if (pSDev != nullptr) {
|
||||
m_pPDABmp = (CBagPDA *)pSDev;
|
||||
CBofRect r(0, 0, 300, 200);
|
||||
@ -190,7 +190,7 @@ ErrorCode CMainWindow::attach() {
|
||||
m_pPDABmp->attach();
|
||||
|
||||
// Allow the script to specify the increment height.
|
||||
CBagVar *pVar = VARMNGR->GetVariable("PDAINCREMENT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("PDAINCREMENT");
|
||||
if (pVar) {
|
||||
g_nPDAIncrement = pVar->GetNumValue();
|
||||
m_pPDABmp->setPosInWindow(r.width(), r.height(), g_nPDAIncrement);
|
||||
@ -218,7 +218,7 @@ ErrorCode CMainWindow::attach() {
|
||||
m_pPDABmp->attachActiveObjects();
|
||||
|
||||
// If this world file contains an evt_wld
|
||||
pSDev = SDEVMNGR->GetStorageDevice("EVT_WLD");
|
||||
pSDev = SDEV_MANAGER->GetStorageDevice("EVT_WLD");
|
||||
if (pSDev != nullptr) {
|
||||
// Have we allocated one yet ?
|
||||
if (m_pEvtSDev == nullptr) {
|
||||
@ -338,7 +338,7 @@ void CMainWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
if (lKey == BKEY_SCRL_LOCK) { // Get a scroll lock hit
|
||||
if (GetFilterId() == 0x08) { // If we're in zzazzl filter
|
||||
m_bZzazzlVision = !m_bZzazzlVision; // toggle the paint zzazzl flag
|
||||
CBagVar *pVar = VARMNGR->GetVariable("ZZAZZLVISION");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("ZZAZZLVISION");
|
||||
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(m_bZzazzlVision ? 1 : 0);
|
||||
@ -353,7 +353,7 @@ void CMainWindow::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
|
||||
void CMainWindow::CorrectZzazzlePoint(CBofPoint *p) {
|
||||
// Don't correct this boy if he's inside the PDA.
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEVMNGR->GetStorageDevice("BPDA_WLD");
|
||||
CBagPDA *pPDA = (CBagPDA *)SDEV_MANAGER->GetStorageDevice("BPDA_WLD");
|
||||
if (pPDA && pPDA->isInside(*p)) {
|
||||
return;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ static const char *GetBuildVersion() {
|
||||
return BuildString("Version: %s, %s", __DATE__, __TIME__);
|
||||
}
|
||||
|
||||
CBagStorageDev *CSBarMasterWin::OnNewStorageDev(const CBofString &typestr) {
|
||||
CBagStorageDev *CSBarMasterWin::onNewStorageDev(const CBofString &typestr) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
CBagStorageDev *pSDev;
|
||||
@ -152,7 +152,7 @@ CBagStorageDev *CSBarMasterWin::OnNewStorageDev(const CBofString &typestr) {
|
||||
}
|
||||
|
||||
|
||||
CBagStorageDev *CSBarMasterWin::OnNewStorageDev(int nType) {
|
||||
CBagStorageDev *CSBarMasterWin::onNewStorageDev(int nType) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
CBagStorageDev *pSDev = nullptr;
|
||||
@ -202,7 +202,7 @@ void CSBarMasterWin::onKeyHit(uint32 lKey, uint32 lRepCount) {
|
||||
}
|
||||
}
|
||||
|
||||
void CSBarMasterWin::OnNewFilter(CBagStorageDev *pSDev, const CBofString &typestr) {
|
||||
void CSBarMasterWin::onNewFilter(CBagStorageDev *pSDev, const CBofString &typestr) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
FilterFxn filterFunction = nullptr;
|
||||
@ -241,7 +241,7 @@ void CSBarMasterWin::OnNewFilter(CBagStorageDev *pSDev, const CBofString &typest
|
||||
}
|
||||
}
|
||||
|
||||
void CSBarMasterWin::OnNewFilter(CBagStorageDev *pSDev, const int nType) {
|
||||
void CSBarMasterWin::onNewFilter(CBagStorageDev *pSDev, const int nType) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
FilterFxn filterFunction = nullptr;
|
||||
|
@ -36,13 +36,13 @@ namespace SpaceBar {
|
||||
*/
|
||||
class CSBarMasterWin : public CBagMasterWin {
|
||||
public:
|
||||
virtual CBagStorageDev *OnNewStorageDev(const CBofString &typestr);
|
||||
virtual CBagStorageDev *OnNewStorageDev(int nType);
|
||||
virtual CBagStorageDev *onNewStorageDev(const CBofString &typestr);
|
||||
virtual CBagStorageDev *onNewStorageDev(int nType);
|
||||
|
||||
virtual void onKeyHit(uint32 lKey, uint32 lRepCount);
|
||||
|
||||
void OnNewFilter(CBagStorageDev *pSDev, const CBofString &typestr);
|
||||
void OnNewFilter(CBagStorageDev *pSDev, const int nType);
|
||||
void onNewFilter(CBagStorageDev *pSDev, const CBofString &typestr);
|
||||
void onNewFilter(CBagStorageDev *pSDev, const int nType);
|
||||
};
|
||||
|
||||
} // namespace SpaceBar
|
||||
|
@ -314,7 +314,7 @@ ErrorCode CNavWindow::detach() {
|
||||
CBagCursor::hideSystemCursor();
|
||||
|
||||
// One turn has gone by
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
|
||||
m_bNavAttached = false;
|
||||
}
|
||||
@ -685,7 +685,7 @@ void CNavWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
switch (pButton->getControlID()) {
|
||||
case QUIT: {
|
||||
LogInfo("\tClicked Quit");
|
||||
VARMNGR->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
VAR_MANAGER->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
close();
|
||||
break;
|
||||
}
|
||||
@ -697,7 +697,7 @@ void CNavWindow::onBofButton(CBofObject *pObject, int nState) {
|
||||
if (pApp != nullptr) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
pWin->OnHelp(MakeDir("NAVHELP.TXT"));
|
||||
pWin->onHelp(MakeDir("NAVHELP.TXT"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -845,7 +845,7 @@ void CNavWindow::onKeyHit(uint32 lKey, uint32 /*lRepCount*/) {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
if (lKey == BKEY_ALT_q || lKey == BKEY_ALT_F4) {
|
||||
VARMNGR->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
VAR_MANAGER->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
close();
|
||||
}
|
||||
}
|
||||
@ -1386,8 +1386,8 @@ void CNavWindow::CalcFuel(double hf) {
|
||||
bool isDone = (m_level == 3);
|
||||
|
||||
if (m_level == 3) {
|
||||
VARMNGR->GetVariable("NPASSEDTEST")->SetBoolValue(true);
|
||||
VARMNGR->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
VAR_MANAGER->GetVariable("NPASSEDTEST")->SetBoolValue(true);
|
||||
VAR_MANAGER->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
close();
|
||||
}
|
||||
|
||||
@ -1454,7 +1454,7 @@ void CNavWindow::CalcFuel(double hf) {
|
||||
}
|
||||
|
||||
if (m_fuel <= 0) {
|
||||
VARMNGR->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
VAR_MANAGER->GetVariable("NPLAYEDNAV")->SetBoolValue(true);
|
||||
killTimer(777);
|
||||
close();
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ ErrorCode SBarSlotWnd::attach() {
|
||||
// Read in their total nuggets from game
|
||||
CBagVar *pVar = nullptr;
|
||||
|
||||
pVar = VARMNGR->GetVariable("NUGGETS");
|
||||
pVar = VAR_MANAGER->GetVariable("NUGGETS");
|
||||
|
||||
if (pVar)
|
||||
m_nCredit = pVar->GetNumValue();
|
||||
@ -311,7 +311,7 @@ ErrorCode SBarSlotWnd::detach() {
|
||||
}
|
||||
|
||||
// Write out new value of nuggets
|
||||
CBagVar *pVar = VARMNGR->GetVariable("NUGGETS");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("NUGGETS");
|
||||
if (pVar)
|
||||
pVar->SetValue(m_nCredit);
|
||||
|
||||
@ -379,7 +379,7 @@ ErrorCode SBarSlotWnd::detach() {
|
||||
CBagStorageDevWnd::detach();
|
||||
|
||||
// One turn has gone by
|
||||
VARMNGR->IncrementTimers();
|
||||
VAR_MANAGER->IncrementTimers();
|
||||
|
||||
return _errCode;
|
||||
}
|
||||
@ -411,8 +411,8 @@ 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);
|
||||
WaitForInput();
|
||||
paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
|
||||
waitForInput();
|
||||
|
||||
cBmp.paint(this, &cRect);
|
||||
}
|
||||
@ -441,8 +441,8 @@ 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);
|
||||
WaitForInput();
|
||||
paintBeveledText(this, &cRect, cString, FONT_15POINT, TEXT_NORMAL, RGB(255, 255, 255), JUSTIFY_WRAP, FORMAT_TOP_LEFT);
|
||||
waitForInput();
|
||||
|
||||
cBmp.paint(this, &cRect);
|
||||
}
|
||||
@ -889,7 +889,7 @@ void SBarSlotWnd::onBofButton(CBofObject *pObject, int nState) {
|
||||
CBagMasterWin *pWin = pApp->getMasterWnd();
|
||||
if (pWin != nullptr) {
|
||||
m_bPaused = true;
|
||||
pWin->OnHelp(BuildSlotDir("SLOT.TXT"));
|
||||
pWin->onHelp(BuildSlotDir("SLOT.TXT"));
|
||||
m_bPaused = false;
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ ErrorCode SpaceBarEngine::initialize() {
|
||||
goto exit;
|
||||
|
||||
// Start a new game (In entry vestibule)
|
||||
_masterWin->NewGame();
|
||||
_masterWin->newGame();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -745,7 +745,7 @@ bool SrafComputer::VerifyDispatchTeam() {
|
||||
|
||||
pTeamItem->m_nFlags = nTeam | nDispatchFlags;
|
||||
pTeamItem->m_nMeetWithID = nMeetingWith;
|
||||
CBagVar *pVar = VARMNGR->GetVariable("SRATURNCOUNT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("SRATURNCOUNT");
|
||||
Assert(pVar != nullptr);
|
||||
|
||||
pTeamItem->m_nDispatchTime = pVar->GetNumValue();
|
||||
@ -942,7 +942,7 @@ ErrorCode SrafComputer::attach() {
|
||||
|
||||
// Set the starting time...
|
||||
if (m_nStartingTime == 0) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable("SRATURNCOUNT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("SRATURNCOUNT");
|
||||
Assert(pVar != nullptr);
|
||||
m_nStartingTime = pVar->GetNumValue();
|
||||
}
|
||||
@ -962,7 +962,7 @@ ErrorCode SrafComputer::attach() {
|
||||
RestoreSraffanVars();
|
||||
|
||||
// Finally, if we're hallucinating, turn off the hallucination filter.
|
||||
CBagVar *pVar = VARMNGR->GetVariable("HALLUCINATE");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("HALLUCINATE");
|
||||
if (pVar && pVar->GetNumValue() > 0) {
|
||||
pVar->SetValue(0);
|
||||
}
|
||||
@ -1283,12 +1283,12 @@ void SrafComputer::ActivateDealSummary() {
|
||||
}
|
||||
|
||||
// Retrieve IRK's and QUOSH's terms
|
||||
CBagVar *pVar = VARMNGR->GetVariable("IRKSTERMS");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("IRKSTERMS");
|
||||
if (pVar != nullptr) {
|
||||
g_stSellerNames[IRK4].m_nAmount = pVar->GetNumValue();
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable("QUOSHSTERMS");
|
||||
pVar = VAR_MANAGER->GetVariable("QUOSHSTERMS");
|
||||
if (pVar != nullptr) {
|
||||
g_stSellerNames[QUOSH23].m_nAmount = pVar->GetNumValue();
|
||||
}
|
||||
@ -2057,7 +2057,7 @@ void SrafComputer::DoShowChowButtons() {
|
||||
bool bAllowBeverage = true;
|
||||
bool bAllowSnack = true;
|
||||
|
||||
CBagStorageDev *pSDev = SDEVMNGR->GetStorageDevice("INV_WLD");
|
||||
CBagStorageDev *pSDev = SDEV_MANAGER->GetStorageDevice("INV_WLD");
|
||||
if (pSDev) {
|
||||
CBagObject *pBevObj = pSDev->GetObject("SZTB", true);
|
||||
CBagObject *pSnackObj = pSDev->GetObject("SZTA", true);
|
||||
@ -3038,7 +3038,7 @@ void SrafComputer::OnListAudioSettings() {
|
||||
// Add a selection for random play.
|
||||
if (g_stAudioSetting[nTrackSelection]->m_pszAudioFile == nullptr) {
|
||||
m_bRandomAudio = true;
|
||||
CBagVar *pVar = VARMNGR->GetVariable("SRATURNCOUNT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("SRATURNCOUNT");
|
||||
m_nRandomTime = pVar->GetNumValue();
|
||||
nTrackSelection = g_engine->getRandomNumber() % (NUM_MUSICAL_SCORES - 1);
|
||||
} else {
|
||||
@ -3134,7 +3134,7 @@ bool SrafComputer::ReportMeetingStatus(int nTeamNumber) {
|
||||
}
|
||||
|
||||
// Get the current time...
|
||||
CBagVar *pVar = VARMNGR->GetVariable("SRATURNCOUNT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("SRATURNCOUNT");
|
||||
Assert(pVar != nullptr);
|
||||
int nCurTime = pVar->GetNumValue();
|
||||
|
||||
@ -4290,8 +4290,8 @@ void SrafComputer::DoOrderBeverage() {
|
||||
szLocalBuff[0] = '\0';
|
||||
CBofString sStr(szLocalBuff, 256);
|
||||
|
||||
SDEVMNGR->AddObject("INV_WLD", "SZTB");
|
||||
SDEVMNGR->AddObject("INVZ_WLD", "SZTB");
|
||||
SDEV_MANAGER->AddObject("INV_WLD", "SZTB");
|
||||
SDEV_MANAGER->AddObject("INVZ_WLD", "SZTB");
|
||||
|
||||
// Build the string to indicate that the beverage has been stashed
|
||||
sStr = BuildSrafDir(g_stOfferings[0].m_pszRcvOfferingFile);
|
||||
@ -4306,8 +4306,8 @@ void SrafComputer::DoOrderSnack() {
|
||||
szLocalBuff[0] = '\0';
|
||||
CBofString sStr(szLocalBuff, 256);
|
||||
|
||||
SDEVMNGR->AddObject("INV_WLD", "SZTA");
|
||||
SDEVMNGR->AddObject("INVZ_WLD", "SZTA");
|
||||
SDEV_MANAGER->AddObject("INV_WLD", "SZTA");
|
||||
SDEV_MANAGER->AddObject("INVZ_WLD", "SZTA");
|
||||
|
||||
// Build the string to indicate that the beverage has been stashed
|
||||
sStr = BuildSrafDir(g_stOfferings[1].m_pszRcvOfferingFile);
|
||||
@ -4344,13 +4344,13 @@ void SrafComputer::OnButtonFinished(bool bVictorious) {
|
||||
}
|
||||
|
||||
// Pass our codewords back to the bar...
|
||||
pVar = VARMNGR->GetVariable("DEVENCODE1");
|
||||
pVar = VAR_MANAGER->GetVariable("DEVENCODE1");
|
||||
Assert(pVar != nullptr);
|
||||
|
||||
if (pVar)
|
||||
pVar->SetValue(m_pszGroup1Word->GetBuffer());
|
||||
|
||||
pVar = VARMNGR->GetVariable("DEVENCODE2");
|
||||
pVar = VAR_MANAGER->GetVariable("DEVENCODE2");
|
||||
Assert(pVar != nullptr);
|
||||
if (pVar)
|
||||
pVar->SetValue(m_pszGroup2Word->GetBuffer());
|
||||
@ -4358,7 +4358,7 @@ void SrafComputer::OnButtonFinished(bool bVictorious) {
|
||||
|
||||
// Setting the flashback variable will trigger the
|
||||
// event world condition which gets us back to the bar.
|
||||
pVar = VARMNGR->GetVariable("RFLASHBACK");
|
||||
pVar = VAR_MANAGER->GetVariable("RFLASHBACK");
|
||||
Assert(pVar != nullptr);
|
||||
|
||||
if (pVar) {
|
||||
@ -4411,7 +4411,7 @@ void SrafComputer::SetMainScreen() {
|
||||
}
|
||||
|
||||
void SrafComputer::IncrementTurnCount() {
|
||||
CBagVar *pVar = VARMNGR->GetVariable("SRATURNCOUNT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("SRATURNCOUNT");
|
||||
int nTurncount = 0;
|
||||
|
||||
Assert(pVar != nullptr);
|
||||
@ -4506,7 +4506,7 @@ void SrafComputer::IncrementTurnCount() {
|
||||
}
|
||||
|
||||
void SrafComputer::DisplayTurnCount(int nLineNo) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable("SRATURNCOUNT");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("SRATURNCOUNT");
|
||||
Assert(pVar != nullptr);
|
||||
|
||||
char szLocalBuff[256];
|
||||
@ -4723,7 +4723,7 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
break;
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(pVarName);
|
||||
pVar = VAR_MANAGER->GetVariable(pVarName);
|
||||
if (pVar != nullptr) {
|
||||
g_stSellerNames[nSellerID].m_nAmount = pVar->GetNumValue();
|
||||
}
|
||||
@ -4764,7 +4764,7 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
break;
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(pVarName);
|
||||
pVar = VAR_MANAGER->GetVariable(pVarName);
|
||||
if (pVar != nullptr) {
|
||||
g_stBuyerBids[nBuyerID].m_nMineralVal[nMineralID] = pVar->GetNumValue();
|
||||
|
||||
@ -4781,7 +4781,7 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
// Save the list of who is in on this deal... use a bit to indicate if they are in or not.
|
||||
uint32 nBuyersMask = 0;
|
||||
|
||||
pVar = VARMNGR->GetVariable("BUYERSMASK");
|
||||
pVar = VAR_MANAGER->GetVariable("BUYERSMASK");
|
||||
if (pVar != nullptr) {
|
||||
nBuyersMask = pVar->GetNumValue();
|
||||
}
|
||||
@ -4799,7 +4799,7 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
uint32 nAvailMask = 0;
|
||||
uint32 nIndex = 0;
|
||||
|
||||
pVar = VARMNGR->GetVariable("AVAILABLEMASK");
|
||||
pVar = VAR_MANAGER->GetVariable("AVAILABLEMASK");
|
||||
if (pVar != nullptr) {
|
||||
nAvailMask = pVar->GetNumValue();
|
||||
}
|
||||
@ -4850,14 +4850,14 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
break;
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(pVarName);
|
||||
pVar = VAR_MANAGER->GetVariable(pVarName);
|
||||
if (pVar != nullptr) {
|
||||
g_stOtherPartys[nOtherID].m_nPaymentAmount = pVar->GetNumValue();
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve swonza's state
|
||||
pVar = VARMNGR->GetVariable("SWONZAENLIGHTENED");
|
||||
pVar = VAR_MANAGER->GetVariable("SWONZAENLIGHTENED");
|
||||
if (pVar != nullptr) {
|
||||
m_bSwonzaEnlightened = pVar->GetNumValue();
|
||||
}
|
||||
@ -4886,7 +4886,7 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
Common::sprintf_s(szMEETINGTIME, "%s%d%s", "TEAM", i + 1, "MEETINGTIME");
|
||||
|
||||
// Restore the whole block...
|
||||
pVar = VARMNGR->GetVariable(szFLAGS);
|
||||
pVar = VAR_MANAGER->GetVariable(szFLAGS);
|
||||
if (pVar != nullptr) {
|
||||
teamListItem.m_nFlags = pVar->GetNumValue();
|
||||
|
||||
@ -4900,19 +4900,19 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
}
|
||||
}
|
||||
}
|
||||
pVar = VARMNGR->GetVariable(szMEETWITH);
|
||||
pVar = VAR_MANAGER->GetVariable(szMEETWITH);
|
||||
if (pVar != nullptr) {
|
||||
teamListItem.m_nMeetWithID = pVar->GetNumValue();
|
||||
}
|
||||
pVar = VARMNGR->GetVariable(szDISPATCHTIME);
|
||||
pVar = VAR_MANAGER->GetVariable(szDISPATCHTIME);
|
||||
if (pVar != nullptr) {
|
||||
teamListItem.m_nDispatchTime = pVar->GetNumValue();
|
||||
}
|
||||
pVar = VARMNGR->GetVariable(szCAPTAIN);
|
||||
pVar = VAR_MANAGER->GetVariable(szCAPTAIN);
|
||||
if (pVar != nullptr) {
|
||||
teamListItem.m_nTeamCaptain = pVar->GetNumValue();
|
||||
}
|
||||
pVar = VARMNGR->GetVariable(szMEETINGTIME);
|
||||
pVar = VAR_MANAGER->GetVariable(szMEETINGTIME);
|
||||
if (pVar != nullptr) {
|
||||
teamListItem.m_nMeetingTime = pVar->GetNumValue();
|
||||
}
|
||||
@ -4941,12 +4941,12 @@ void SrafComputer::RestoreSraffanVars() {
|
||||
int nMetWithVal = 0;
|
||||
int nMeetingResultVal = 0;
|
||||
|
||||
pVar = VARMNGR->GetVariable("METWITH");
|
||||
pVar = VAR_MANAGER->GetVariable("METWITH");
|
||||
if (pVar != nullptr) {
|
||||
nMetWithVal = pVar->GetNumValue();
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable("MEETINGRESULTS");
|
||||
pVar = VAR_MANAGER->GetVariable("MEETINGRESULTS");
|
||||
if (pVar != nullptr) {
|
||||
nMeetingResultVal = pVar->GetNumValue();
|
||||
}
|
||||
@ -5005,7 +5005,7 @@ void SrafComputer::SaveSraffanVars() {
|
||||
break;
|
||||
}
|
||||
|
||||
CBagVar *pVar = VARMNGR->GetVariable(pVarName);
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable(pVarName);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(g_stSellerNames[nSellerID].m_nAmount);
|
||||
}
|
||||
@ -5046,7 +5046,7 @@ void SrafComputer::SaveSraffanVars() {
|
||||
break;
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(pVarName);
|
||||
pVar = VAR_MANAGER->GetVariable(pVarName);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(g_stBuyerBids[nBuyerID].m_nMineralVal[nMineralID]);
|
||||
}
|
||||
@ -5060,7 +5060,7 @@ void SrafComputer::SaveSraffanVars() {
|
||||
}
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable("BUYERSMASK");
|
||||
pVar = VAR_MANAGER->GetVariable("BUYERSMASK");
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(nBuyersMask);
|
||||
}
|
||||
@ -5089,7 +5089,7 @@ void SrafComputer::SaveSraffanVars() {
|
||||
|
||||
Assert(nIndex < 32);
|
||||
|
||||
pVar = VARMNGR->GetVariable("AVAILABLEMASK");
|
||||
pVar = VAR_MANAGER->GetVariable("AVAILABLEMASK");
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(nAvailMask);
|
||||
}
|
||||
@ -5114,13 +5114,13 @@ void SrafComputer::SaveSraffanVars() {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((pVar = VARMNGR->GetVariable(pVarName)) != nullptr) {
|
||||
if ((pVar = VAR_MANAGER->GetVariable(pVarName)) != nullptr) {
|
||||
pVar->SetValue(g_stOtherPartys[nOtherID].m_nPaymentAmount);
|
||||
}
|
||||
}
|
||||
|
||||
// Save swonza's state
|
||||
pVar = VARMNGR->GetVariable("SWONZAENLIGHTENED");
|
||||
pVar = VAR_MANAGER->GetVariable("SWONZAENLIGHTENED");
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(m_bSwonzaEnlightened);
|
||||
}
|
||||
@ -5159,27 +5159,27 @@ void SrafComputer::SaveSraffanVars() {
|
||||
teamListItem.m_nMeetingTime = 0;
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(szFLAGS);
|
||||
pVar = VAR_MANAGER->GetVariable(szFLAGS);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(teamListItem.m_nFlags);
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(szMEETWITH);
|
||||
pVar = VAR_MANAGER->GetVariable(szMEETWITH);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(teamListItem.m_nMeetWithID);
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(szDISPATCHTIME);
|
||||
pVar = VAR_MANAGER->GetVariable(szDISPATCHTIME);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(teamListItem.m_nDispatchTime);
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(szCAPTAIN);
|
||||
pVar = VAR_MANAGER->GetVariable(szCAPTAIN);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(teamListItem.m_nTeamCaptain);
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable(szMEETINGTIME);
|
||||
pVar = VAR_MANAGER->GetVariable(szMEETINGTIME);
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(teamListItem.m_nMeetingTime);
|
||||
}
|
||||
@ -5226,12 +5226,12 @@ void SrafComputer::SaveSraffanVars() {
|
||||
}
|
||||
|
||||
// Now save the variables
|
||||
pVar = VARMNGR->GetVariable("METWITH");
|
||||
pVar = VAR_MANAGER->GetVariable("METWITH");
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(nMetWithVal);
|
||||
}
|
||||
|
||||
pVar = VARMNGR->GetVariable("MEETINGRESULTS");
|
||||
pVar = VAR_MANAGER->GetVariable("MEETINGRESULTS");
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(nMeetingResultVal);
|
||||
}
|
||||
|
@ -86,11 +86,11 @@ ErrorCode SBarVidWnd::attach() {
|
||||
Assert(IsValidObject(this));
|
||||
|
||||
if (CMainWindow::attach() == ERR_NONE) {
|
||||
m_pDiscVar = VARMNGR->GetVariable("CUR_VDISC");
|
||||
m_pTimerVar = VARMNGR->GetVariable("CUR_VTIME");
|
||||
m_pDiscVar = VAR_MANAGER->GetVariable("CUR_VDISC");
|
||||
m_pTimerVar = VAR_MANAGER->GetVariable("CUR_VTIME");
|
||||
|
||||
// What time does the murder occur?
|
||||
CBagVar *pVar = VARMNGR->GetVariable("VDISC_EVTIME");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("VDISC_EVTIME");
|
||||
if (pVar != nullptr) {
|
||||
m_nStartTime = pVar->GetNumValue();
|
||||
m_nStartTime -= 180;
|
||||
@ -118,7 +118,7 @@ ErrorCode SBarVidWnd::attach() {
|
||||
|
||||
m_fTimerDiff = 0;
|
||||
|
||||
m_pPlayingVar = VARMNGR->GetVariable("VDISC_PLAYING");
|
||||
m_pPlayingVar = VAR_MANAGER->GetVariable("VDISC_PLAYING");
|
||||
if (m_pPlayingVar != nullptr) {
|
||||
int nMode = m_pPlayingVar->GetNumValue();
|
||||
|
||||
@ -155,7 +155,7 @@ ErrorCode SBarVidWnd::detach() {
|
||||
m_pMovie = nullptr;
|
||||
}
|
||||
|
||||
CBagVar *pTimerVar = VARMNGR->GetVariable("CUR_VTIME");
|
||||
CBagVar *pTimerVar = VAR_MANAGER->GetVariable("CUR_VTIME");
|
||||
if (pTimerVar != nullptr) {
|
||||
pTimerVar->SetValue((int)m_fTimer);
|
||||
}
|
||||
@ -181,7 +181,7 @@ void SBarVidWnd::SetPlayMode(int nMode) {
|
||||
// reflect that in the script.
|
||||
if (nMode != 0 && m_pDiscVar != nullptr) {
|
||||
if (m_pDiscVar->GetNumValue() == 2) {
|
||||
CBagVar *pVar = VARMNGR->GetVariable("VIDDISC_SEEN");
|
||||
CBagVar *pVar = VAR_MANAGER->GetVariable("VIDDISC_SEEN");
|
||||
if (pVar != nullptr) {
|
||||
pVar->SetValue(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user