ScummVM API documentation
Sherlock::SaveManager Class Reference
Inheritance diagram for Sherlock::SaveManager:
Sherlock::Scalpel::ScalpelSaveManager Sherlock::Tattoo::WidgetFiles

Public Member Functions

 SaveManager (SherlockEngine *vm, const Common::String &target)
 
void createThumbnail ()
 
Common::String generateSaveName (int slot)
 
void writeSavegameHeader (Common::OutSaveFile *out, SherlockSavegameHeader &header)
 
int getHighlightedButton () const
 
void highlightButtons (int btnIndex)
 
void loadGame (int slot)
 
void saveGame (int slot, const Common::String &name)
 
bool isSlotEmpty (int slot) const
 

Static Public Member Functions

static SaveManagerinit (SherlockEngine *vm, const Common::String &target)
 
static SaveStateList getSavegameList (const MetaEngine *metaEngine, const Common::String &target)
 
static WARN_UNUSED_RESULT bool readSavegameHeader (Common::InSaveFile *in, SherlockSavegameHeader &header, bool skipThumbnail=true)
 

Public Attributes

Common::StringArray _savegames
 
int _savegameIndex
 
bool _justLoaded
 

Protected Member Functions

void createSavegameList ()
 
void synchronize (Serializer &s)
 

Protected Attributes

SherlockEngine_vm
 
Common::String _target
 
Graphics::Surface_saveThumb
 

Member Function Documentation

◆ createSavegameList()

void Sherlock::SaveManager::createSavegameList ( )
protected

Build up a savegame list, with empty slots given an explicit Empty message

◆ synchronize()

void Sherlock::SaveManager::synchronize ( Serializer s)
protected

Synchronize the data for a savegame

◆ createThumbnail()

void Sherlock::SaveManager::createThumbnail ( )

Creates a thumbnail for the current on-screen contents

◆ getSavegameList()

static SaveStateList Sherlock::SaveManager::getSavegameList ( const MetaEngine metaEngine,
const Common::String target 
)
static

Load a list of savegames

◆ generateSaveName()

Common::String Sherlock::SaveManager::generateSaveName ( int  slot)

Support method that generates a savegame name

Parameters
slotSlot number

◆ writeSavegameHeader()

void Sherlock::SaveManager::writeSavegameHeader ( Common::OutSaveFile out,
SherlockSavegameHeader header 
)

Write out the header information for a savegame

◆ readSavegameHeader()

static WARN_UNUSED_RESULT bool Sherlock::SaveManager::readSavegameHeader ( Common::InSaveFile in,
SherlockSavegameHeader header,
bool  skipThumbnail = true 
)
static

Read in the header information for a savegame

◆ getHighlightedButton()

int Sherlock::SaveManager::getHighlightedButton ( ) const

Return the index of the button the mouse is over, if any

◆ highlightButtons()

void Sherlock::SaveManager::highlightButtons ( int  btnIndex)

Handle highlighting buttons

◆ loadGame()

void Sherlock::SaveManager::loadGame ( int  slot)

Load the game in the specified slot

◆ saveGame()

void Sherlock::SaveManager::saveGame ( int  slot,
const Common::String name 
)

Save the game in the specified slot with the given name

◆ isSlotEmpty()

bool Sherlock::SaveManager::isSlotEmpty ( int  slot) const

Returns true if the given save slot is empty


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