mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-06 01:31:39 +00:00
BAGEL: Add some missing const, remove some unused code, rename a couple of functions
This commit is contained in:
parent
938d267cc0
commit
a8f77dd254
@ -34,11 +34,11 @@ CBofSize CBagAreaObject::getSize() const {
|
||||
CBagAreaObject::CBagAreaObject() {
|
||||
_xObjType = AREA_OBJ;
|
||||
setVisible(false);
|
||||
setOverCursor(4);
|
||||
CBagObject::setOverCursor(4);
|
||||
}
|
||||
|
||||
CBagAreaObject::~CBagAreaObject() {
|
||||
detach();
|
||||
CBagAreaObject::detach();
|
||||
}
|
||||
|
||||
ErrorCode CBagAreaObject::attach() {
|
||||
|
@ -35,19 +35,12 @@
|
||||
|
||||
namespace Bagel {
|
||||
|
||||
// Static member variables.
|
||||
static unsigned stringHashFunction(const CBofString &s) {
|
||||
return s.hash();
|
||||
}
|
||||
CBofVHashTable<CBofString, HASH_TABLE_SIZE> *CBagel::_cacheFileList;
|
||||
|
||||
// Initialize global variables.
|
||||
//
|
||||
CBofWindow *g_hackWindow;
|
||||
|
||||
CBagel::CBagel(const BagelReg *gameReg) {
|
||||
assert(gameReg != nullptr);
|
||||
_cacheFileList = new CBofVHashTable<CBofString, HASH_TABLE_SIZE>(&stringHashFunction);
|
||||
|
||||
registerGame(gameReg);
|
||||
}
|
||||
@ -58,10 +51,6 @@ CBagel::~CBagel() {
|
||||
// Release options file
|
||||
release();
|
||||
|
||||
// Empty the file cache.
|
||||
delete _cacheFileList;
|
||||
_cacheFileList = nullptr;
|
||||
|
||||
_szAppName[0] = '\0';
|
||||
_pMainWnd = nullptr;
|
||||
_gameReg = nullptr;
|
||||
@ -149,9 +138,6 @@ ErrorCode CBagel::initialize() {
|
||||
// Initialize local game paths
|
||||
initLocalFilePaths();
|
||||
|
||||
// Check for adequate system resources
|
||||
verifyRequirements();
|
||||
|
||||
// Child class must instantiate the Main Window
|
||||
return _errCode;
|
||||
}
|
||||
@ -199,7 +185,7 @@ ErrorCode CBagel::verifyCDInDrive(int diskId, const char *waveFile) {
|
||||
Common::sprintf_s(szBuf, "$SBARDIR%sDISK%d", PATH_DELIMETER, diskId);
|
||||
|
||||
CBofString cString(szBuf, MAX_DIRPATH);
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
|
||||
// If the disk is not in drive, then inform the user
|
||||
int i = 0;
|
||||
@ -229,14 +215,7 @@ ErrorCode CBagel::verifyCDInDrive(int diskId, const char *waveFile) {
|
||||
return _errCode;
|
||||
}
|
||||
|
||||
ErrorCode CBagel::verifyRequirements() {
|
||||
assert(isValidObject(this));
|
||||
assert(_gameReg != nullptr);
|
||||
|
||||
return _errCode;
|
||||
}
|
||||
|
||||
void MACROREPLACE(CBofString &s) {
|
||||
void fixPathName(CBofString &s) {
|
||||
// Remove any homedir prefix. In ScummVM, all paths are relative
|
||||
// to the game folder automatically
|
||||
char *p = strstr(s.getBuffer(), HOMEDIR_TOKEN);
|
||||
|
@ -51,7 +51,7 @@ namespace Bagel {
|
||||
// Defines default chroma color to be palette index 1
|
||||
#define DEFAULT_CHROMA_COLOR 1
|
||||
|
||||
extern void MACROREPLACE(CBofString &s);
|
||||
extern void fixPathName(CBofString &s);
|
||||
|
||||
class CBagMasterWin;
|
||||
|
||||
@ -187,13 +187,6 @@ protected:
|
||||
*/
|
||||
ErrorCode initLocalFilePaths();
|
||||
|
||||
/**
|
||||
* Checks system resources, determining if user has the minimum
|
||||
* system requirements to play this game.
|
||||
* @return Error return code
|
||||
*/
|
||||
ErrorCode verifyRequirements();
|
||||
|
||||
// Data members
|
||||
const BagelReg *_gameReg = nullptr;
|
||||
|
||||
|
@ -85,10 +85,10 @@ public:
|
||||
static PdaMode getPdaMode() {
|
||||
return _pdaMode;
|
||||
}
|
||||
bool isActivated() {
|
||||
bool isActivated() const {
|
||||
return _activating ? !_activated : _activated;
|
||||
}
|
||||
bool isActivating() {
|
||||
bool isActivating() const {
|
||||
return _activating;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ public:
|
||||
_deactivateFl = b;
|
||||
}
|
||||
|
||||
bool getDeactivate() {
|
||||
bool getDeactivate() const {
|
||||
return _deactivateFl;
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
void setZoomed(bool newVal) {
|
||||
_zoomedFl = newVal;
|
||||
}
|
||||
bool getZoomed() {
|
||||
bool getZoomed() const {
|
||||
return _zoomedFl;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
|
||||
bool isInside(const CBofPoint &pt) override;
|
||||
|
||||
CBofBitmap *getBitmap() {
|
||||
CBofBitmap *getBitmap() const {
|
||||
return _bmp;
|
||||
}
|
||||
CBofRect getRect() override;
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
ErrorCode attach() override;
|
||||
ErrorCode detach() override;
|
||||
|
||||
BUTTON_TYPE getButtonType() {
|
||||
BUTTON_TYPE getButtonType() const {
|
||||
return _buttonType;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ public:
|
||||
return _callbackFct;
|
||||
}
|
||||
|
||||
void *getCallBackInfo() {
|
||||
void *getCallBackInfo() const {
|
||||
return _callbackInfo;
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "ENTRYTHUD") { // Thud
|
||||
CBofRect tmpRect(60, 50, 137, 70);
|
||||
CBofString bmpName("$SBARDIR\\GENERAL\\POPUP\\THUDPOP.BMP");
|
||||
MACROREPLACE(bmpName);
|
||||
fixPathName(bmpName);
|
||||
CDevDlg dlg;
|
||||
dlg.create(bmpName, CBagel::getBagApp()->getMasterWnd(), CBofApp::getApp()->getPalette(), &tmpRect);
|
||||
dlg.doModal();
|
||||
@ -270,7 +270,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "ENTRYFLEE") { // Fleebix
|
||||
CBofRect tmpRect(35, 48, 114, 69);
|
||||
CBofString bmpName("$SBARDIR\\GENERAL\\POPUP\\FLEEDAT.BMP");
|
||||
MACROREPLACE(bmpName);
|
||||
fixPathName(bmpName);
|
||||
CDevDlg dlg;
|
||||
dlg.create(bmpName, CBagel::getBagApp()->getMasterWnd(), CBofApp::getApp()->getPalette(), &tmpRect);
|
||||
dlg.doModal();
|
||||
@ -279,7 +279,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "ENTRYCLICK") { // Click's locker combo
|
||||
CBofRect tmpRect(60, 49, 138, 68);
|
||||
CBofString bmpName("$SBARDIR\\GENERAL\\POPUP\\CLICKPOP.BMP");
|
||||
MACROREPLACE(bmpName);
|
||||
fixPathName(bmpName);
|
||||
CDevDlg dlg;
|
||||
dlg.create(bmpName, CBagel::getBagApp()->getMasterWnd(), CBofApp::getApp()->getPalette(), &tmpRect);
|
||||
dlg.doModal();
|
||||
@ -288,7 +288,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "ENTRYFRUIT") { // MegaWave the fruit
|
||||
CBofRect tmpRect(35, 49, 114, 68);
|
||||
CBofString bmpName("$SBARDIR\\GENERAL\\POPUP\\CLICKDAT.BMP");
|
||||
MACROREPLACE(bmpName);
|
||||
fixPathName(bmpName);
|
||||
CDevDlg dlg;
|
||||
dlg.create(bmpName, CBagel::getBagApp()->getMasterWnd(), CBofApp::getApp()->getPalette(), &tmpRect);
|
||||
dlg.doModal();
|
||||
@ -297,7 +297,7 @@ bool CBagCommandObject::runObject() {
|
||||
} else if (getFileName() == "D7CODE1DLG") { // Deven-7 code word
|
||||
CBofRect tmpRect(10, 48, 189, 69);
|
||||
CBofString bmpName("$SBARDIR\\GENERAL\\POPUP\\DEVENPOP.BMP");
|
||||
MACROREPLACE(bmpName);
|
||||
fixPathName(bmpName);
|
||||
CDevDlg dlg;
|
||||
dlg.create(bmpName, CBagel::getBagApp()->getMasterWnd(), CBofApp::getApp()->getPalette(), &tmpRect, true);
|
||||
dlg.doModal();
|
||||
@ -364,7 +364,7 @@ bool CBagCommandObject::runObject() {
|
||||
g_allowPaintFl = false;
|
||||
|
||||
CBofString smkName("$SBARDIR\\BAR\\EVGAMWIN.SMK");
|
||||
MACROREPLACE(smkName);
|
||||
fixPathName(smkName);
|
||||
|
||||
// Play the movie only if it exists
|
||||
if (fileExists(smkName.getBuffer())) {
|
||||
|
@ -33,14 +33,14 @@ namespace Bagel {
|
||||
|
||||
class CBagFMovie : public CBofDialog {
|
||||
public:
|
||||
enum MVSTATUS { MOVIE_STOPPED, MOVIE_PAUSED, MOVIE_FOREWARD, MOVIE_REVERSE };
|
||||
enum MovieStatus { MOVIE_STOPPED, MOVIE_PAUSED, MOVIE_FOREWARD, MOVIE_REVERSE };
|
||||
|
||||
protected:
|
||||
Video::SmackerDecoder *_smk;
|
||||
|
||||
bool _escCanStopFl;
|
||||
bool _loopFl;
|
||||
MVSTATUS _movieStatus;
|
||||
MovieStatus _movieStatus;
|
||||
|
||||
CBofBitmap *_bmpBuf;
|
||||
CBofBitmap *_filterBmp;
|
||||
@ -116,7 +116,7 @@ public:
|
||||
virtual bool pause();
|
||||
virtual bool stop();
|
||||
|
||||
virtual MVSTATUS status() {
|
||||
virtual MovieStatus status() {
|
||||
return _movieStatus;
|
||||
}
|
||||
|
||||
|
@ -347,7 +347,7 @@ ErrorCode CBagLog::playMsgQueue() {
|
||||
CBofString smkName(localBuffer, 256);
|
||||
|
||||
smkName = OVERRIDE_SMK;
|
||||
MACROREPLACE(smkName);
|
||||
fixPathName(smkName);
|
||||
|
||||
CBagMovieObject *pMovie = (CBagMovieObject *)getObject(OVERRIDE_MOVIE);
|
||||
if (pMovie) {
|
||||
|
@ -100,11 +100,11 @@ CBagMasterWin::CBagMasterWin() {
|
||||
|
||||
// Assume default system screen
|
||||
_sysScreen = "$SBARDIR\\GENERAL\\SYSTEM\\GAMBHALL.BMP";
|
||||
MACROREPLACE(_sysScreen);
|
||||
fixPathName(_sysScreen);
|
||||
|
||||
// Load wait sound for when user hits the spacebar
|
||||
CBofString waitName("$SBARDIR\\GENERAL\\WAIT.WAV");
|
||||
MACROREPLACE(waitName);
|
||||
fixPathName(waitName);
|
||||
|
||||
_waitSound = new CBofSound(this, waitName, SOUND_MIX);
|
||||
}
|
||||
@ -311,7 +311,7 @@ ErrorCode CBagMasterWin::newGame() {
|
||||
app->getOption("Startup", "WLDFile", workStr, STARTWORLD, 255);
|
||||
|
||||
initWld = workStr;
|
||||
MACROREPLACE(initWld);
|
||||
fixPathName(initWld);
|
||||
}
|
||||
|
||||
loadGlobalVars(GLOBALWORLD);
|
||||
@ -337,7 +337,7 @@ ErrorCode CBagMasterWin::loadFile(const CBofString &wldName, const CBofString &s
|
||||
|
||||
if (!paintedFl) {
|
||||
paintedFl = true;
|
||||
MACROREPLACE(wldFileName);
|
||||
fixPathName(wldFileName);
|
||||
CBofRect cRect;
|
||||
cRect.left = (640 - 520) / 2;
|
||||
cRect.top = (480 - 240) / 2;
|
||||
@ -417,7 +417,7 @@ ErrorCode CBagMasterWin::loadFile(const CBofString &wldName, const CBofString &s
|
||||
}
|
||||
_gameSDevList = new CBofList<CBagStorageDev *>;
|
||||
|
||||
MACROREPLACE(wldFileName);
|
||||
fixPathName(wldFileName);
|
||||
|
||||
timerStart();
|
||||
|
||||
@ -565,7 +565,7 @@ ErrorCode CBagMasterWin::loadGlobalVars(const CBofString &wldName) {
|
||||
|
||||
if (_variableList != nullptr) {
|
||||
|
||||
MACROREPLACE(wldFileName);
|
||||
fixPathName(wldFileName);
|
||||
|
||||
if (fileExists(wldFileName) && (fileLength(wldFileName) > 0)) {
|
||||
// Force buffer to be big enough so that the entire script
|
||||
@ -768,7 +768,7 @@ ErrorCode CBagMasterWin::loadFileFromStream(CBagIfstream &input, const CBofStrin
|
||||
input.eatWhite();
|
||||
|
||||
getAlphaNumFromStream(input, str);
|
||||
MACROREPLACE(str);
|
||||
fixPathName(str);
|
||||
|
||||
// Specify if we have a shared palette or not, look for
|
||||
// the USESHAREDPAL token after the full cursor specification
|
||||
@ -846,7 +846,7 @@ ErrorCode CBagMasterWin::loadFileFromStream(CBagIfstream &input, const CBofStrin
|
||||
input.eatWhite();
|
||||
|
||||
getAlphaNumFromStream(input, bmpFileName);
|
||||
MACROREPLACE(bmpFileName);
|
||||
fixPathName(bmpFileName);
|
||||
|
||||
// Read the palette in and keep it hanging around for later use
|
||||
CBofPalette::setSharedPalette(bmpFileName);
|
||||
@ -864,7 +864,7 @@ ErrorCode CBagMasterWin::loadFileFromStream(CBagIfstream &input, const CBofStrin
|
||||
input.eatWhite();
|
||||
|
||||
getAlphaNumFromStream(input, _sysScreen);
|
||||
MACROREPLACE(_sysScreen);
|
||||
fixPathName(_sysScreen);
|
||||
|
||||
logInfo(buildString("SYSSCREEN = %s", _sysScreen.getBuffer()));
|
||||
}
|
||||
@ -883,7 +883,7 @@ ErrorCode CBagMasterWin::loadFileFromStream(CBagIfstream &input, const CBofStrin
|
||||
input.eatWhite();
|
||||
|
||||
getAlphaNumFromStream(input, _cdChangeAudio);
|
||||
MACROREPLACE(_cdChangeAudio);
|
||||
fixPathName(_cdChangeAudio);
|
||||
|
||||
logInfo(buildString("DISKAUDIO = %s", _cdChangeAudio.getBuffer()));
|
||||
}
|
||||
@ -993,7 +993,7 @@ ErrorCode CBagMasterWin::onHelp(const CBofString &helpFile, bool /*bSaveBkg*/, C
|
||||
CBofString fileName(localBuffer, 256);
|
||||
|
||||
fileName = helpFile;
|
||||
MACROREPLACE(fileName);
|
||||
fixPathName(fileName);
|
||||
|
||||
// use specified bitmap as this dialog's image
|
||||
char backGroundBuffer[256];
|
||||
@ -1001,7 +1001,7 @@ ErrorCode CBagMasterWin::onHelp(const CBofString &helpFile, bool /*bSaveBkg*/, C
|
||||
CBofString backGround(backGroundBuffer, 256);
|
||||
|
||||
backGround = buildString("$SBARDIR%sGENERAL%sRULES%sHELPSCRN.BMP", PATH_DELIMETER, PATH_DELIMETER, PATH_DELIMETER);
|
||||
MACROREPLACE(backGround);
|
||||
fixPathName(backGround);
|
||||
|
||||
CBofBitmap *bmp = Bagel::loadBitmap(backGround);
|
||||
CBagHelp help;
|
||||
|
@ -154,23 +154,23 @@ public:
|
||||
ErrorCode setStorageDev(const CBofString &wldName, bool entry = true);
|
||||
ErrorCode gotoNewWindow(const CBofString *str);
|
||||
|
||||
uint16 getDiskID() {
|
||||
uint16 getDiskID() const {
|
||||
return _diskId;
|
||||
}
|
||||
void setDiskID(uint16 id) {
|
||||
_diskId = id;
|
||||
}
|
||||
|
||||
CBofWindow *getCurrentGameWindow() {
|
||||
CBofWindow *getCurrentGameWindow() const {
|
||||
return (CBofWindow *)_gameWindow;
|
||||
}
|
||||
CBagStorageDevWnd *getCurrentStorageDev() {
|
||||
CBagStorageDevWnd *getCurrentStorageDev() const {
|
||||
return _gameWindow;
|
||||
}
|
||||
CBagStorageDevManager *getStorageDevManager() {
|
||||
CBagStorageDevManager *getStorageDevManager() const {
|
||||
return _storageDeviceList;
|
||||
}
|
||||
CBagVarManager *getVariableManager() {
|
||||
CBagVarManager *getVariableManager() const {
|
||||
return _variableList;
|
||||
}
|
||||
|
||||
|
@ -420,7 +420,7 @@ bool CBagMenu::trackPopupMenu(uint32 /*nFlags*/, int x, int y, CBofWindow *pWnd,
|
||||
char szBuf[256];
|
||||
Common::strcpy_s(szBuf, EXAMINEBMP);
|
||||
CBofString cString(szBuf, 256);
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
CBofPalette xPal;
|
||||
|
||||
xPal.loadPalette(cString);
|
||||
|
@ -62,7 +62,6 @@ public:
|
||||
|
||||
bool trackPopupMenu(uint32 nFlags, int x, int y, CBofWindow *pWnd, CBofPalette *pPal, CBofRect *lpRect = 0);
|
||||
|
||||
// bool AddUniversalObject(CBagObject *pObj);
|
||||
static bool removeUniversalObjectList();
|
||||
static bool setUniversalObjectList(CBofList<CBagObject *> *pObjList);
|
||||
static CBofList<CBagObject *> *getUniversalObjectList() {
|
||||
|
@ -278,7 +278,7 @@ bool CBagMovieObject::runObject() {
|
||||
|
||||
// Play the override message.
|
||||
cStr = OVERRIDE_SMK;
|
||||
MACROREPLACE(cStr);
|
||||
fixPathName(cStr);
|
||||
|
||||
sFileName = cStr;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ ParseCodes CBagObject::setInfo(CBagIfstream &istr) {
|
||||
szLocalBuff[0] = 0;
|
||||
CBofString s(szLocalBuff, 256);
|
||||
getAlphaNumFromStream(istr, s);
|
||||
MACROREPLACE(s);
|
||||
fixPathName(s);
|
||||
setFileName(s);
|
||||
break;
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ ErrorCode CBagSaveGameFile::readSavedGame(int32 slotNum) {
|
||||
bofFree(pBuf);
|
||||
|
||||
CBofString str(saveData._szScript);
|
||||
MACROREPLACE(str);
|
||||
fixPathName(str);
|
||||
const char *path = str.getBuffer();
|
||||
assert(!strncmp(path, "./", 2));
|
||||
Common::strcpy_s(saveData._szScript, path + 2);
|
||||
|
@ -564,7 +564,7 @@ ErrorCode CBagStorageDev::loadFile(const CBofString &sWldName) {
|
||||
|
||||
sWldFileName = sWldName;
|
||||
|
||||
MACROREPLACE(sWldFileName);
|
||||
fixPathName(sWldFileName);
|
||||
|
||||
// Force buffer to be big enough so that the entire script
|
||||
// is pre-loaded
|
||||
@ -949,7 +949,7 @@ ParseCodes CBagStorageDev::setInfo(CBagIfstream &fpInput) {
|
||||
getAlphaNumFromStream(fpInput, str);
|
||||
fpInput.eatWhite();
|
||||
|
||||
MACROREPLACE(str);
|
||||
fixPathName(str);
|
||||
|
||||
_sBackgroundName = str;
|
||||
|
||||
@ -1151,7 +1151,7 @@ CBagStorageDevWnd::CBagStorageDevWnd() : CBofWindow() {
|
||||
|
||||
// Set a default help file for when there is not one specified
|
||||
_sHelpFileName = "$SBARDIR\\GENERAL\\RULES\\DEFAULT.TXT";
|
||||
MACROREPLACE(_sHelpFileName);
|
||||
fixPathName(_sHelpFileName);
|
||||
|
||||
_xSDevType = SDEV_WND;
|
||||
}
|
||||
@ -1431,7 +1431,7 @@ ErrorCode CBagStorageDevWnd::loadFile(const CBofString &sFile) {
|
||||
else
|
||||
sWldFile = sFile;
|
||||
|
||||
MACROREPLACE(sWldFile);
|
||||
fixPathName(sWldFile);
|
||||
|
||||
// Force buffer to be big enough so that the entire script
|
||||
// is pre-loaded
|
||||
@ -1567,7 +1567,7 @@ CBagStorageDevDlg::CBagStorageDevDlg() : CBofDialog() {
|
||||
// Set a default help file for when there is not one specified
|
||||
//
|
||||
_sHelpFileName = "$SBARDIR\\GENERAL\\RULES\\DEFAULT.TXT";
|
||||
MACROREPLACE(_sHelpFileName);
|
||||
fixPathName(_sHelpFileName);
|
||||
}
|
||||
|
||||
|
||||
@ -1711,7 +1711,7 @@ ErrorCode CBagStorageDevDlg::loadFile(const CBofString &sFile) {
|
||||
else
|
||||
sWldFile = sFile;
|
||||
|
||||
MACROREPLACE(sWldFile);
|
||||
fixPathName(sWldFile);
|
||||
|
||||
// Force buffer to be big enough so that the entire script is pre-loaded
|
||||
int nLength = fileLength(sWldFile);
|
||||
|
@ -48,7 +48,7 @@ const char *formPath(const char *dir, const char *pszFile) {
|
||||
static char szBuf[MAX_DIRPATH];
|
||||
|
||||
CBofString cStr(dir);
|
||||
MACROREPLACE(cStr);
|
||||
fixPathName(cStr);
|
||||
Common::Path path(cStr.getBuffer());
|
||||
path = path.append(pszFile);
|
||||
|
||||
|
@ -706,7 +706,7 @@ const char *buildSysDir(const char *pszFile) {
|
||||
Common::sprintf_s(szBuf, "$SBARDIR%sGENERAL%sSYSTEM%s%s", PATH_DELIMETER, PATH_DELIMETER, PATH_DELIMETER, pszFile);
|
||||
|
||||
CBofString cTemp(szBuf, MAX_DIRPATH);
|
||||
MACROREPLACE(cTemp);
|
||||
fixPathName(cTemp);
|
||||
|
||||
return &szBuf[0];
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ void CBagRestartDialog::onKeyHit(uint32 lKey, uint32 nRepCount) {
|
||||
char szBuf[256];
|
||||
Common::strcpy_s(szBuf, LOADING_BMP);
|
||||
CBofString cStr(szBuf, 256);
|
||||
MACROREPLACE(cStr);
|
||||
fixPathName(cStr);
|
||||
|
||||
CBofRect cRect;
|
||||
cRect.left = (640 - 180) / 2;
|
||||
@ -211,7 +211,7 @@ void CBagRestartDialog::onBofButton(CBofObject *pObject, int nFlags) {
|
||||
char szBuf[256];
|
||||
Common::strcpy_s(szBuf, LOADING_BMP);
|
||||
CBofString cStr(szBuf, 256);
|
||||
MACROREPLACE(cStr);
|
||||
fixPathName(cStr);
|
||||
|
||||
CBofRect cRect;
|
||||
cRect.left = (640 - 180) / 2;
|
||||
|
@ -226,7 +226,7 @@ ErrorCode SBarComputer::detach() {
|
||||
|
||||
ErrorCode SBarComputer::readDrnkFile() {
|
||||
CBofString DrinkString(DRINK_FILE);
|
||||
MACROREPLACE(DrinkString);
|
||||
fixPathName(DrinkString);
|
||||
|
||||
// Open the text files
|
||||
CBofFile fpDrinkFile(DrinkString);
|
||||
@ -300,7 +300,7 @@ ErrorCode SBarComputer::readDrnkFile() {
|
||||
|
||||
ErrorCode SBarComputer::readIngFile() {
|
||||
CBofString IngString(INGRD_FILE);
|
||||
MACROREPLACE(IngString);
|
||||
fixPathName(IngString);
|
||||
|
||||
// Open the text files
|
||||
CBofFile fpIngFile(IngString);
|
||||
|
@ -113,7 +113,7 @@ void vilInitFilters(CBofBitmap *pBmp) {
|
||||
CBofString cString(szCString, 256);
|
||||
cString = VILDROIDTIPFILE;
|
||||
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
CBofFile nfile(cString, CBF_READONLY);
|
||||
buff = new char[nfile.getLength() + 1];
|
||||
memset(buff, 0, nfile.getLength() + 1);
|
||||
@ -132,7 +132,7 @@ void vilInitFilters(CBofBitmap *pBmp) {
|
||||
char szBString[256];
|
||||
CBofString cBString(szBString, 256);
|
||||
cBString = VILDROIDGRAFITTI;
|
||||
MACROREPLACE(cBString);
|
||||
fixPathName(cBString);
|
||||
pGrafittiBmp = new CBofBitmap(cBString, pBmp->getPalette());
|
||||
|
||||
// No initialization of the pChipBmp is done here - it's
|
||||
@ -151,7 +151,7 @@ void triInitFilters(CBofBitmap *pBmp) {
|
||||
char szTriStr[256];
|
||||
CBofString cTriStr(szTriStr, 256);
|
||||
cTriStr = TRIFILTERBMP;
|
||||
MACROREPLACE(cTriStr);
|
||||
fixPathName(cTriStr);
|
||||
pTriBmp = new CBofBitmap(cTriStr, pBmp->getPalette());
|
||||
triinitDone = true;
|
||||
}
|
||||
@ -161,7 +161,7 @@ void lightningInitFilters() {
|
||||
char szThunderFileName[256];
|
||||
CBofString cThunderFileName(szThunderFileName, 256);
|
||||
cThunderFileName = THUNDERSOUND;
|
||||
MACROREPLACE(cThunderFileName);
|
||||
fixPathName(cThunderFileName);
|
||||
pThunder = new CBofSound(CBofApp::getApp()->getMainWindow(), szThunderFileName, SOUND_MIX);
|
||||
lightninginitDone = true;
|
||||
}
|
||||
@ -365,7 +365,7 @@ static bool VildroidFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
CBofString cString(szCString, 256);
|
||||
cString = GREENCHIPFILE;
|
||||
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
CBofFile nfile(cString, CBF_READONLY);
|
||||
buff = new char[nfile.getLength() + 1];
|
||||
memset(buff, 0, nfile.getLength() + 1);
|
||||
@ -408,7 +408,7 @@ static bool VildroidFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
CBofString cString(szCString, 256);
|
||||
cString = BLUECHIPFILE;
|
||||
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
CBofFile nfile(cString, CBF_READONLY);
|
||||
buff = new char[nfile.getLength() + 1];
|
||||
memset(buff, 0, nfile.getLength() + 1);
|
||||
@ -571,7 +571,7 @@ static bool VildroidFilter(CBofBitmap *pBmp, CBofRect *pRect) {
|
||||
char szCString[256];
|
||||
CBofString cString(szCString, 256);
|
||||
cString = DISCEJECTSOUND;
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
BofPlaySound(cString, SOUND_WAVE | SOUND_MIX);
|
||||
CBagStorageDev *pWieldSDev = nullptr;
|
||||
pWieldSDev = g_SDevManager->getStorageDevice("BWIELD_WLD");
|
||||
|
@ -1317,7 +1317,7 @@ void CNavWindow::calcFuel(double hf) {
|
||||
if (_level == 2) {
|
||||
pause();
|
||||
CBofString sNebDir(NEBSIM4_BMP);
|
||||
MACROREPLACE(sNebDir);
|
||||
fixPathName(sNebDir);
|
||||
assert(_pBackdrop != nullptr);
|
||||
_bmptwo = new CBofBitmap(sNebDir.getBuffer(), _pPal);
|
||||
setBackground(_bmptwo);
|
||||
@ -1335,7 +1335,7 @@ void CNavWindow::calcFuel(double hf) {
|
||||
if (_level == 1) {
|
||||
pause();
|
||||
CBofString sNebDir(NEBSIM3_BMP);
|
||||
MACROREPLACE(sNebDir);
|
||||
fixPathName(sNebDir);
|
||||
assert(_pBackdrop != nullptr);
|
||||
_bmptwo = new CBofBitmap(sNebDir.getBuffer(), _pPal);
|
||||
setBackground(_bmptwo);
|
||||
@ -1353,7 +1353,7 @@ void CNavWindow::calcFuel(double hf) {
|
||||
if (_level == 0) {
|
||||
pause();
|
||||
CBofString sNebDir(NEBSIM2_BMP);
|
||||
MACROREPLACE(sNebDir);
|
||||
fixPathName(sNebDir);
|
||||
assert(_pBackdrop != nullptr);
|
||||
_bmptwo = new CBofBitmap(sNebDir.getBuffer(), _pPal);
|
||||
setBackground(_bmptwo);
|
||||
|
@ -884,7 +884,7 @@ const char *BuildSlotDir(const char *pszFile) {
|
||||
Common::sprintf_s(szBuf, "%s%s%s", BGCB_DIR, PATH_DELIMETER, pszFile);
|
||||
|
||||
CBofString sSlotDir(szBuf, MAX_DIRPATH);
|
||||
MACROREPLACE(sSlotDir);
|
||||
fixPathName(sSlotDir);
|
||||
|
||||
return &szBuf[0];
|
||||
}
|
||||
|
@ -162,7 +162,7 @@ ErrorCode SpaceBarEngine::initialize() {
|
||||
// Play intro movies, logo screens, etc...
|
||||
if (bShowLogo) {
|
||||
CBofString cString(SMK_LOGO1);
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
|
||||
// Play the movie only if it exists
|
||||
if (fileExists(cString.getBuffer())) {
|
||||
@ -175,7 +175,7 @@ ErrorCode SpaceBarEngine::initialize() {
|
||||
goto exit;
|
||||
|
||||
cString = SMK_LOGO2;
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
if (fileExists(cString.getBuffer())) {
|
||||
bofPlayMovie(_masterWin, cString.getBuffer());
|
||||
if (pBmp != nullptr) {
|
||||
@ -187,7 +187,7 @@ ErrorCode SpaceBarEngine::initialize() {
|
||||
|
||||
// Use hi-res movie if user has a fast machine
|
||||
cString = (getMachineSpeed() < 100) ? SMK_LOGO3EX : SMK_LOGO3;
|
||||
MACROREPLACE(cString);
|
||||
fixPathName(cString);
|
||||
|
||||
if (fileExists(cString.getBuffer())) {
|
||||
bofPlayMovie(_masterWin, cString.getBuffer());
|
||||
|
Loading…
Reference in New Issue
Block a user