ScummVM API documentation
Bagel::CBagel Class Reference
Inheritance diagram for Bagel::CBagel:
Bagel::CBofOptions Bagel::CBofApp Bagel::CBofObject Bagel::CBofError Bagel::SpaceBar::SpaceBarEngine

Public Member Functions

 CBagel (const BagelReg *gameReg)
 
void registerGame (const BagelReg *gameReg)
 
ErrorCode initialize () override
 
ErrorCode runApp () override
 
ErrorCode shutdown () override
 
ErrorCode setOption (const char *section, const char *option, const char *stringValue)
 
ErrorCode setOption (const char *section, const char *option, int intValue)
 
ErrorCode getOption (const char *section, const char *option, char *stringValue, const char *defaultValue, uint32 size)
 
ErrorCode getOption (const char *section, const char *option, int *intValue, int defaultValue)
 
ErrorCode getOption (const char *section, const char *option, bool *boolValue, int defaultValue)
 
void setAppName (const char *newAppName) override
 
CBagMasterWingetMasterWnd () const
 
int getChromaColor ()
 
ErrorCode verifyCDInDrive (int diskId, const char *waveFile)
 
- Public Member Functions inherited from Bagel::CBofOptions
 CBofOptions (const char *pszOptionsFile=nullptr)
 Loads specified .INI file which contains user options. More...
 
virtual ~CBofOptions ()
 
ErrorCode commit ()
 
ErrorCode loadOptionFile (const char *pszFile)
 Loads and builds Option list. More...
 
const char * getFileName () const
 
ErrorCode writeSetting (const char *pszSection, const char *pszOption, const char *pszValue)
 
ErrorCode writeSetting (const char *pszSection, const char *pszOption, int nValue)
 
ErrorCode readSetting (const char *section, const char *option, char *stringValue, const char *defaultValue, uint32 nSize)
 
ErrorCode readSetting (const char *section, const char *option, int *nValue, int defaultValue)
 
ErrorCode readSetting (const char *section, const char *option, bool *boolValue, bool defaultValue)
 
ErrorCode load ()
 
void release ()
 
- Public Member Functions inherited from Bagel::CBofApp
 CBofApp (const char *pszAppName)
 
ErrorCode preInit ()
 
void postShutDown ()
 
const char * getAppName () const
 
void setMainWindow (CBofWindow *pWnd)
 
CBofWindowgetMainWindow () const
 
CBofWindowgetActualWindow () const
 
void setPalette (CBofPalette *pPalette)
 
CBofPalettegetPalette () const
 
int screenWidth () const
 
int screenHeight () const
 
int screenDepth () const
 
CBofCursor getDefaultCursor () const
 
void setDefaultCursor (CBofCursor &cCursor)
 
void addCursor (CBofCursor &cCursor)
 
void delCursor (int nIndex)
 
CBofCursor getCursor (int nIndex)
 
int getNumberOfCursors () const
 
void setCaptureControl (CBofWindow *ctl)
 
CBofWindowgetCaptureControl () const
 
void setFocusControl (CBofWindow *ctl)
 
CBofWindowgetFocusControl () const
 
bool consolePlayVideo (const Common::Path &path)
 
- Public Member Functions inherited from Bagel::CBofError
void reportError (ErrorCode errCode, const char *format,...)
 
bool errorOccurred () const
 
ErrorCode getErrorCode () const
 
void clearError ()
 

Static Public Member Functions

static CBagelgetBagApp ()
 
static void showNextCDDialog (CBofWindow *parentWin, int diskId)
 
static CBofVHashTable< CBofString, 131 > * getCacheFileList ()
 
- Static Public Member Functions inherited from Bagel::CBofObject
static bool isValidObject (const CBofObject *pObject)
 
- Static Public Member Functions inherited from Bagel::CBofApp
static uint32 getMachineSpeed ()
 
static CBofAppgetApp ()
 
- Static Public Member Functions inherited from Bagel::CBofError
static void fatalError (ErrorCode errCode, const char *format,...)
 
static void initialize ()
 
static int getErrorCount ()
 

Protected Member Functions

ErrorCode initLocalFilePaths ()
 
- Protected Member Functions inherited from Bagel::CBofApp
void StartupCode ()
 
void ShutDownCode ()
 
virtual bool shouldQuit () const =0
 
- Protected Member Functions inherited from Bagel::CBofError
virtual void bofMessageBox (const Common::String &content, const Common::String &title)
 

Protected Attributes

const BagelReg_gameReg = nullptr
 
int _numRetries = 20
 
int _installCode = 0
 
- Protected Attributes inherited from Bagel::CBofOptions
char _szFileName [MAX_FNAME]
 
COption_pOptionList
 
bool _bDirty
 
- Protected Attributes inherited from Bagel::CBofApp
char _szAppName [128] = { 0 }
 
CBofList< CBofCursor_cCursorList
 
CBofCursor _cDefaultCursor
 
CBofWindow_pMainWnd = nullptr
 
CBofPalette_pPalette = nullptr
 
CBofPalette_pDefPalette = nullptr
 
int _nScreenDX = 0
 
int _nScreenDY = 0
 
int _nColorDepth = 0
 
int _nIterations = 1
 
- Protected Attributes inherited from Bagel::CBofError
ErrorCode _errCode
 

Additional Inherited Members

- Static Protected Attributes inherited from Bagel::CBofApp
static CBofApp_pBofApp
 
- Static Protected Attributes inherited from Bagel::CBofError
static int _count
 

Member Function Documentation

◆ registerGame()

void Bagel::CBagel::registerGame ( const BagelReg gameReg)

Registers game information for this game object

Parameters
gameRegGame registration info

◆ initialize()

ErrorCode Bagel::CBagel::initialize ( )
overridevirtual

Initializes BAGEL, checks system resources, etc...

Returns
Error return code

Reimplemented from Bagel::CBofApp.

Reimplemented in Bagel::SpaceBar::SpaceBarEngine.

◆ runApp()

ErrorCode Bagel::CBagel::runApp ( )
overridevirtual

Provides main message loop (MainEventLoop)

Returns
Error return Code.

Reimplemented from Bagel::CBofApp.

◆ shutdown()

ErrorCode Bagel::CBagel::shutdown ( )
overridevirtual

Performs cleanup and destruction of Bagel object

Returns
Error return Code.

Reimplemented from Bagel::CBofApp.

Reimplemented in Bagel::SpaceBar::SpaceBarEngine.

◆ setOption() [1/2]

ErrorCode Bagel::CBagel::setOption ( const char *  section,
const char *  option,
const char *  stringValue 
)

Sets specified user option in associated .INI file

Parameters
section.INI section to write to
optionOption to add/update
stringValueNew value of option
Returns
Error return code

◆ setOption() [2/2]

ErrorCode Bagel::CBagel::setOption ( const char *  section,
const char *  option,
int  intValue 
)

Sets specified user option in associated .INI file

Parameters
section.INI section to write to
optionOption to add/update
intValueNew value of option
Returns
Error return code

◆ getOption() [1/3]

ErrorCode Bagel::CBagel::getOption ( const char *  section,
const char *  option,
char *  stringValue,
const char *  defaultValue,
uint32  size 
)

Gets specified user option from associated .INI file

Parameters
section.INI section to read from
optionOption to retrieve
stringValueBuffer to hold value
defaultValueDefault value if option not found
sizeLength of the stringValue buffer
Returns
Error return code

◆ getOption() [2/3]

ErrorCode Bagel::CBagel::getOption ( const char *  section,
const char *  option,
int *  intValue,
int  defaultValue 
)

Gets specified user option from associated .INI file

Parameters
section.INI section to read from
optionOption to retrieve
intValueBuffer to hold value
defaultValueDefault value if option not found
Returns
Error return code

◆ getOption() [3/3]

ErrorCode Bagel::CBagel::getOption ( const char *  section,
const char *  option,
bool *  boolValue,
int  defaultValue 
)

Gets specified user option from associated .INI file

Parameters
section.INI section to read from
optionOption to retrieve
boolValueBuffer to hold value
defaultValueDefault value if option not found
Returns
Error return code

◆ verifyCDInDrive()

ErrorCode Bagel::CBagel::verifyCDInDrive ( int  diskId,
const char *  waveFile 
)

Checks to make sure the Game CD is in the drive

Parameters
diskIdDisk number
waveFileFilename
Returns
Error return code

◆ initLocalFilePaths()

ErrorCode Bagel::CBagel::initLocalFilePaths ( )
protected

initialize full path names to files stored on local disk

Returns
Error return code

The documentation for this class was generated from the following file: