ScummVM
Pink::PinkEngine Class Reference

#include <pink.h>

Inheritance diagram for Pink::PinkEngine:
Collaboration diagram for Pink::PinkEngine:

Public Member Functions

 PinkEngine (OSystem *system, const ADGameDescription *desc)
 
 ~PinkEngine ()
 
Common::Error run () override
 Init the engine and start its main loop. More...
 
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
 
virtual Common::Error loadGameState (int slot) override
 Load a game state. More...
 
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
 
Common::Error saveGameState (int slot, const Common::String &desc) override
 Save a game state. More...
 
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
 
void load (Archive &archive)
 
void changeScene ()
 
bool isPeril ()
 
void setVariable (Common::String &variable, Common::String &value)
 
bool checkValueOfVariable (Common::String &variable, Common::String &value)
 
void executeMenuCommand (uint id)
 
Common::Language getLanguage () const
 
OrbFilegetOrb ()
 
BroFilegetBro ()
 
Common::RandomSourcegetRnd ()
 
DirectorgetDirector ()
 
PDAMgrgetPdaMgr ()
 
void setNextExecutors (const Common::String &nextModule, const Common::String &nextPage)
 
void setLeadActor (LeadActor *actor)
 
void setCursor (uint cursorIndex)
 
- Public Member Functions inherited from Engine
void pauseEngine (bool pause)
 Pause or resume the engine. More...
 
bool isPaused () const
 Return whether the engine is currently paused or not. More...
 
void openMainMenuDialog ()
 Run the Global Main Menu Dialog. More...
 
uint32 getTotalPlayTime () const
 Get the total play time. More...
 
void setTotalPlayTime (uint32 time=0)
 Set the game time counter to the specified time. More...
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
void checkCD ()
 On some systems, check if the game appears to be run from CD. More...
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 Init SearchMan according to the game path. More...
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 Prepare an error string, which is printed by the error() function. More...
 
virtual GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
virtual void syncSoundSettings ()
 Notify the engine that the sound settings in the config manager may have changed and that it hence should adjust any internal volume etc. More...
 
virtual void initKeymap ()
 
virtual void deinitKeymap ()
 
virtual void flipMute ()
 Flip mute all sound option. More...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

Static Public Member Functions

static void pauseEngine (void *engine, bool pause)
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 Request the engine to quit. More...
 
static bool shouldQuit ()
 Return whether the ENGINE should quit respectively should return to the launcher. More...
 
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
 

Protected Member Functions

virtual void pauseEngineIntern (bool pause) override
 Actual implementation of pauseEngine by subclasses. More...
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 

Private Member Functions

Common::Error init ()
 
void initMenu (Common::PEResources &exeResources)
 
bool loadCursors (Common::PEResources &exeResources)
 
void initModule (const Common::String &moduleName, const Common::String &pageName, Archive *saveFile)
 
void addModule (const Common::String &moduleName)
 
void removeModule ()
 

Private Attributes

Console_console
 
Common::RandomSource _rnd
 
Common::Array< Graphics::WinCursorGroup * > _cursors
 
Common::String _nextModule
 
Common::String _nextPage
 
OrbFile _orb
 
BroFile_bro
 
Graphics::MacMenu_menu
 
Director_director
 
LeadActor_actor
 
Module_module
 
Array< NamedObject * > _modules
 
StringMap _variables
 
PDAMgr _pdaMgr
 
const ADGameDescription_desc
 

Friends

class Console
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsJoystick
}
 A feature in this context means an ability of the engine which can be either available or not. More...
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Detailed Description

Definition at line 87 of file pink.h.

Constructor & Destructor Documentation

◆ PinkEngine()

Pink::PinkEngine::PinkEngine ( OSystem system,
const ADGameDescription desc 
)

Definition at line 42 of file pink.cpp.

◆ ~PinkEngine()

Pink::PinkEngine::~PinkEngine ( )

Definition at line 57 of file pink.cpp.

Member Function Documentation

◆ addModule()

void Pink::PinkEngine::addModule ( const Common::String moduleName)
private

Definition at line 200 of file pink.cpp.

◆ canLoadGameStateCurrently()

bool Pink::PinkEngine::canLoadGameStateCurrently ( )
overridevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 283 of file pink.cpp.

◆ canSaveGameStateCurrently()

bool Pink::PinkEngine::canSaveGameStateCurrently ( )
overridevirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 287 of file pink.cpp.

◆ changeScene()

void Pink::PinkEngine::changeScene ( )

Definition at line 190 of file pink.cpp.

◆ checkValueOfVariable()

bool Pink::PinkEngine::checkValueOfVariable ( Common::String variable,
Common::String value 
)

Definition at line 230 of file pink.cpp.

◆ executeMenuCommand()

void Pink::PinkEngine::executeMenuCommand ( uint  id)

Definition at line 140 of file gui.cpp.

◆ getBro()

BroFile* Pink::PinkEngine::getBro ( )
inline

Definition at line 123 of file pink.h.

◆ getDirector()

Director* Pink::PinkEngine::getDirector ( )
inline

Definition at line 125 of file pink.h.

◆ getLanguage()

Common::Language Pink::PinkEngine::getLanguage ( ) const

Definition at line 31 of file detection.cpp.

◆ getOrb()

OrbFile* Pink::PinkEngine::getOrb ( )
inline

Definition at line 122 of file pink.h.

◆ getPdaMgr()

PDAMgr& Pink::PinkEngine::getPdaMgr ( )
inline

Definition at line 126 of file pink.h.

◆ getRnd()

Common::RandomSource& Pink::PinkEngine::getRnd ( )
inline

Definition at line 124 of file pink.h.

◆ hasFeature()

bool Pink::PinkEngine::hasFeature ( Engine::EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 291 of file pink.cpp.

◆ init()

Common::Error Pink::PinkEngine::init ( void  )
private

Definition at line 71 of file pink.cpp.

◆ initMenu()

void Pink::PinkEngine::initMenu ( Common::PEResources exeResources)
private

Definition at line 132 of file gui.cpp.

◆ initModule()

void Pink::PinkEngine::initModule ( const Common::String moduleName,
const Common::String pageName,
Archive saveFile 
)
private

Definition at line 177 of file pink.cpp.

◆ isPeril()

bool Pink::PinkEngine::isPeril ( )

Definition at line 303 of file pink.cpp.

◆ load()

void Pink::PinkEngine::load ( Archive archive)

Definition at line 171 of file pink.cpp.

◆ loadCursors()

bool Pink::PinkEngine::loadCursors ( Common::PEResources exeResources)
private

Definition at line 236 of file pink.cpp.

◆ loadGameState()

Common::Error Pink::PinkEngine::loadGameState ( int  slot)
overridevirtual

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 32 of file saveload.cpp.

◆ pauseEngine()

void Pink::PinkEngine::pauseEngine ( void engine,
bool  pause 
)
static

Definition at line 166 of file pink.cpp.

◆ pauseEngineIntern()

void Pink::PinkEngine::pauseEngineIntern ( bool  pause)
overrideprotectedvirtual

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 298 of file pink.cpp.

◆ removeModule()

void Pink::PinkEngine::removeModule ( )
private

Definition at line 214 of file pink.cpp.

◆ run()

Common::Error Pink::PinkEngine::run ( )
overridevirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 117 of file pink.cpp.

◆ saveGameState()

Common::Error Pink::PinkEngine::saveGameState ( int  slot,
const Common::String desc 
)
overridevirtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 52 of file saveload.cpp.

◆ setCursor()

void Pink::PinkEngine::setCursor ( uint  cursorIndex)

Definition at line 275 of file pink.cpp.

◆ setLeadActor()

void Pink::PinkEngine::setLeadActor ( LeadActor actor)
inline

Definition at line 129 of file pink.h.

◆ setNextExecutors()

void Pink::PinkEngine::setNextExecutors ( const Common::String nextModule,
const Common::String nextPage 
)
inline

Definition at line 128 of file pink.h.

◆ setVariable()

void Pink::PinkEngine::setVariable ( Common::String variable,
Common::String value 
)

Definition at line 226 of file pink.cpp.

Friends And Related Function Documentation

◆ Console

friend class Console
friend

Definition at line 104 of file pink.h.

Member Data Documentation

◆ _actor

LeadActor* Pink::PinkEngine::_actor
private

Definition at line 156 of file pink.h.

◆ _bro

BroFile* Pink::PinkEngine::_bro
private

Definition at line 152 of file pink.h.

◆ _console

Console* Pink::PinkEngine::_console
private

Definition at line 144 of file pink.h.

◆ _cursors

Common::Array<Graphics::WinCursorGroup *> Pink::PinkEngine::_cursors
private

Definition at line 146 of file pink.h.

◆ _desc

const ADGameDescription* Pink::PinkEngine::_desc
private

Definition at line 164 of file pink.h.

◆ _director

Director* Pink::PinkEngine::_director
private

Definition at line 155 of file pink.h.

◆ _menu

Graphics::MacMenu* Pink::PinkEngine::_menu
private

Definition at line 154 of file pink.h.

◆ _module

Module* Pink::PinkEngine::_module
private

Definition at line 158 of file pink.h.

◆ _modules

Array<NamedObject *> Pink::PinkEngine::_modules
private

Definition at line 159 of file pink.h.

◆ _nextModule

Common::String Pink::PinkEngine::_nextModule
private

Definition at line 148 of file pink.h.

◆ _nextPage

Common::String Pink::PinkEngine::_nextPage
private

Definition at line 149 of file pink.h.

◆ _orb

OrbFile Pink::PinkEngine::_orb
private

Definition at line 151 of file pink.h.

◆ _pdaMgr

PDAMgr Pink::PinkEngine::_pdaMgr
private

Definition at line 162 of file pink.h.

◆ _rnd

Common::RandomSource Pink::PinkEngine::_rnd
private

Definition at line 145 of file pink.h.

◆ _variables

StringMap Pink::PinkEngine::_variables
private

Definition at line 161 of file pink.h.


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