ScummVM API documentation
Bagel::CBagSaveGameFile Class Reference

#include <save_game_file.h>

Inheritance diagram for Bagel::CBagSaveGameFile:
Bagel::CBofDataFile Bagel::CBofFile Bagel::CBofObject Bagel::CBofError

Public Member Functions

 CBagSaveGameFile (bool isSaving)
 
int32 getNumSavedGames () const
 
int32 getActualNumSaves ()
 
bool anySavedGames ()
 
ErrorCode writeSavedGame ()
 
ErrorCode readSavedGame (int32 slotNum)
 
ErrorCode readTitle (int32 lSlot, StSavegameHeader *pSavedGame)
 
ErrorCode readTitleOnly (int32 lSlot, char *pGameTitle)
 
- Public Member Functions inherited from Bagel::CBofDataFile
 CBofDataFile ()
 
virtual ~CBofDataFile ()
 
ErrorCode setFile (const char *pszFileName, uint32 lFlags)
 
ErrorCode releaseFile ()
 
int32 getRecSize (int32 lRecNum)
 
int32 getNumberOfRecs () const
 
int32 getMaxRecSize () const
 
ErrorCode open ()
 
ErrorCode close () override
 
ErrorCode create ()
 
ErrorCode readRecord (int32 lRecNum, void *pBuf)
 
ErrorCode readFromFile (int32 lRecNum, void *pBuf, int32 lBytes)
 
ErrorCode writeRecord (int32 lRecNum, void *pBuf, int32 lSize=-1, bool bUpdateHeader=false, uint32 lKey=0xFFFFFFFF)
 
ErrorCode verifyRecord (int32 lRecNum)
 
ErrorCode verifyAllRecords ()
 
ErrorCode addRecord (void *pBuf, int32 lLength, bool bUpdateHeader=false, uint32 lKey=0xFFFFFFFF)
 
int32 findRecord (uint32 lKey)
 
void setPassword (const char *pszPassword)
 
const char * getPassword () const
 
ErrorCode read (void *pDestBuf, int32 lBytes) override
 
ErrorCode read (HeaderRec &rec)
 
ErrorCode read (HeadInfo &rec)
 
ErrorCode write (const void *pSrcBuf, int32 lBytes) override
 
ErrorCode write (HeaderRec &rec)
 
ErrorCode write (HeadInfo &rec)
 
- Public Member Functions inherited from Bagel::CBofFile
 CBofFile ()
 
 CBofFile (const char *pszFileName, uint32 lFlags=(0x00000002|0x00000004))
 
virtual ~CBofFile ()
 
ErrorCode open (const char *pszFileName, uint32 lFlags=(0x00000002|0x00000004))
 
ErrorCode create (const char *pszFileName, uint32 lFlags=(0x00000002|0x00000004)|0x00000020)
 
void commit ()
 
ErrorCode seek (uint32 lPos)
 
ErrorCode seekToBeginning ()
 
ErrorCode seekToEnd ()
 
ErrorCode setPosition (uint32 lPos)
 
uint32 getPosition ()
 
uint32 getLength ()
 
 operator Common::SeekableReadStream * () const
 
- Public Member Functions inherited from Bagel::CBofError
void reportError (ErrorCode errCode, const char *format,...)
 
bool errorOccurred () const
 
ErrorCode getErrorCode () const
 
void clearError ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Bagel::CBofObject
static bool isValidObject (const CBofObject *pObject)
 
- 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 inherited from Bagel::CBofDataFile
ErrorCode readHeader ()
 
ErrorCode writeHeader ()
 
- Protected Member Functions inherited from Bagel::CBofError
virtual void bofMessageBox (const Common::String &content, const Common::String &title)
 
- Protected Attributes inherited from Bagel::CBofFile
char _szFileName [MAX_FNAME]
 
Common::Stream_stream = nullptr
 
uint32 _lFlags = ( 0x00000002 | 0x00000004 )
 
- Protected Attributes inherited from Bagel::CBofError
ErrorCode _errCode
 
- Static Protected Attributes inherited from Bagel::CBofError
static int _count
 

Detailed Description

Handles reading/writing the original savegame file that contains all the saves. Used by the console save/load commands.

Member Function Documentation

◆ writeSavedGame()

ErrorCode Bagel::CBagSaveGameFile::writeSavedGame ( )

Saves a BAGEL game to current save game file

◆ readSavedGame()

ErrorCode Bagel::CBagSaveGameFile::readSavedGame ( int32  slotNum)

Restore a BAGEL saved game

◆ readTitle()

ErrorCode Bagel::CBagSaveGameFile::readTitle ( int32  lSlot,
StSavegameHeader pSavedGame 
)

Reads a BAGEL saved game title


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