Director::DirectorEngine Class Reference

#include <director.h>

+ Inheritance diagram for Director::DirectorEngine:
+ Collaboration diagram for Director::DirectorEngine:

Public Member Functions

 DirectorEngine (OSystem *syst, const DirectorGameDescription *gameDesc)
 ~DirectorEngine () override
DirectorGameID getGameID () const
uint16 getVersion () const
Common::Platform getPlatform () const
Common::Language getLanguage () const
Common::String getEXEName () const
DirectorSoundgetSoundManager () const
Graphics::MacWindowManagergetMacWindowManager () const
ArchivegetMainArchive () const
LingogetLingo () const
ScoregetCurrentScore () const
ScoregetSharedScore () const
Common::String getCurrentPath () const
void setPalette (int id)
void setPalette (byte *palette, uint16 count)
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
void loadPalettes ()
const bytegetPalette () const
uint16 getPaletteColorCount () const
void loadSharedCastsFrom (Common::String filename)
void clearSharedCast ()
void loadPatterns ()
Graphics::MacPatternsgetPatterns ()
void loadInitialMovie (const Common::String movie)
ArchiveopenMainArchive (const Common::String movie)
ArchivecreateArchive ()
void cleanupMainArchive ()
void processEvents ()
void setDraggedSprite (uint16 id)
- Public Member Functions inherited from Engine
 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...
void setDebugger (GUI::Debugger *debugger)
 Sets the engine's debugger. More...
GUI::DebuggergetOrCreateDebugger ()
 Return the engine's debugger instance, or create one if none is present. 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 flipMute ()
 Flip mute all sound option. More...
virtual Common::String getSaveStateName (int slot) const
 Generates the savegame filename. More...
virtual Common::Error loadGameState (int slot)
 Load a game state. More...
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 Load a game state. More...
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
virtual bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 Save a game state. More...
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 Save a game state. More...
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
bool saveGameDialog ()
 Shows the ScummVM save dialog, allowing users to save their game. More...
bool loadGameDialog ()
 Shows the ScummVM Restore dialog, allowing users to load a game. More...
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...
void handleAutoSave ()
 Checks for whether it's time to do an autosave, and if so, does it. More...
void saveAutosaveIfEnabled ()
 Does an autosave immediately if autosaves are turned on. More...
virtual bool canSaveAutosaveCurrently ()
 Indicates whether an autosave can currently be saved. More...
virtual int getAutosaveSlot () const
 Returns the slot that should be used for autosaves. More...
bool shouldPerformAutoSave (int lastSaveTime)

Public Attributes

Common::HashMap< Common::String, Score * > * _movies
Common::RandomSource _rnd
int _colorDepth
unsigned char _key
int _keyCode
int _machineType
bool _playbackPaused
bool _skipFrameAdvance
MovieReference _nextMovie
Common::List< MovieReference_movieStack
- Public Attributes inherited from Engine

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
virtual void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...

Private Member Functions

Common::HashMap< Common::String, Score * > * scanMovies (const Common::String &folder)
void loadEXE (const Common::String movie)
void loadEXEv3 (Common::SeekableReadStream *stream)
void loadEXEv4 (Common::SeekableReadStream *stream)
void loadEXEv5 (Common::SeekableReadStream *stream)
void loadEXEv7 (Common::SeekableReadStream *stream)
void loadEXERIFX (Common::SeekableReadStream *stream, uint32 offset)
void loadMac (const Common::String movie)
void testFontScaling ()
void testFonts ()
void enqueueAllMovies ()
MovieReference getNextMovieFromQueue ()

Private Attributes

const DirectorGameDescription_gameDescription
uint16 _currentPaletteLength
Common::String _currentPath
Graphics::MacPatterns _director3Patterns
Graphics::MacPatterns _director3QuickDrawPatterns
Common::HashMap< int, PaletteV4 * > _director4Palettes
Common::String _sharedCastFile
bool _draggingSprite
uint16 _draggingSpriteId
Common::Point _draggingSpritePos
Common::StringArray _movieQueue

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature { kSupportsSubtitleOptions, kSupportsRTL, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime }
 A feature in this context means an ability of the engine which can be either available or not. More...
- 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 MetaEnginegetMetaEngine ()
static bool warnUserAboutUnsupportedGame ()
 Display a warning to the user that the game is not fully supported. More...
- Protected Attributes inherited from Engine
const Common::String _targetName

Detailed Description

Definition at line 89 of file director.h.

Constructor & Destructor Documentation

◆ DirectorEngine()

Director::DirectorEngine::DirectorEngine ( OSystem syst,
const DirectorGameDescription gameDesc 

Definition at line 45 of file director.cpp.

◆ ~DirectorEngine()

Director::DirectorEngine::~DirectorEngine ( )

Definition at line 104 of file director.cpp.

Member Function Documentation

◆ cleanupMainArchive()

void Director::DirectorEngine::cleanupMainArchive ( )

Definition at line 79 of file resource.cpp.

◆ clearSharedCast()

void Director::DirectorEngine::clearSharedCast ( )

Definition at line 269 of file resource.cpp.

◆ createArchive()

Archive * Director::DirectorEngine::createArchive ( )

Definition at line 40 of file resource.cpp.

◆ enqueueAllMovies()

void Director::DirectorEngine::enqueueAllMovies ( )

Definition at line 324 of file director.cpp.

◆ getCurrentPath()

Common::String Director::DirectorEngine::getCurrentPath ( ) const

Definition at line 107 of file director.h.

◆ getCurrentScore()

Score* Director::DirectorEngine::getCurrentScore ( ) const

Definition at line 105 of file director.h.

◆ getEXEName()

Common::String Director::DirectorEngine::getEXEName ( ) const

Definition at line 57 of file detection.cpp.

◆ getGameID()

DirectorGameID Director::DirectorEngine::getGameID ( ) const

Definition at line 41 of file detection.cpp.

◆ getLanguage()

Common::Language Director::DirectorEngine::getLanguage ( ) const

Definition at line 53 of file detection.cpp.

◆ getLingo()

Lingo* Director::DirectorEngine::getLingo ( ) const

Definition at line 104 of file director.h.

◆ getMacWindowManager()

Graphics::MacWindowManager* Director::DirectorEngine::getMacWindowManager ( ) const

Definition at line 102 of file director.h.

◆ getMainArchive()

Archive* Director::DirectorEngine::getMainArchive ( ) const

Definition at line 103 of file director.h.

◆ getNextMovieFromQueue()

MovieReference Director::DirectorEngine::getNextMovieFromQueue ( )

Definition at line 337 of file director.cpp.

◆ getPalette()

const byte* Director::DirectorEngine::getPalette ( ) const

Definition at line 112 of file director.h.

◆ getPaletteColorCount()

uint16 Director::DirectorEngine::getPaletteColorCount ( ) const

Definition at line 113 of file director.h.

◆ getPatterns()

Graphics::MacPatterns & Director::DirectorEngine::getPatterns ( )

Definition at line 710 of file graphics.cpp.

◆ getPlatform()

Common::Platform Director::DirectorEngine::getPlatform ( ) const

Definition at line 45 of file detection.cpp.

◆ getSharedScore()

Score* Director::DirectorEngine::getSharedScore ( ) const

Definition at line 106 of file director.h.

◆ getSoundManager()

DirectorSound* Director::DirectorEngine::getSoundManager ( ) const

Definition at line 101 of file director.h.

◆ getVersion()

uint16 Director::DirectorEngine::getVersion ( ) const

Definition at line 49 of file detection.cpp.

◆ hasFeature()

bool Director::DirectorEngine::hasFeature ( EngineFeature  f) const

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 64 of file detection.cpp.

◆ loadEXE()

void Director::DirectorEngine::loadEXE ( const Common::String  movie)

Definition at line 84 of file resource.cpp.

◆ loadEXERIFX()

void Director::DirectorEngine::loadEXERIFX ( Common::SeekableReadStream stream,
uint32  offset 

Definition at line 226 of file resource.cpp.

◆ loadEXEv3()

void Director::DirectorEngine::loadEXEv3 ( Common::SeekableReadStream stream)

Definition at line 124 of file resource.cpp.

◆ loadEXEv4()

void Director::DirectorEngine::loadEXEv4 ( Common::SeekableReadStream stream)

Definition at line 178 of file resource.cpp.

◆ loadEXEv5()

void Director::DirectorEngine::loadEXEv5 ( Common::SeekableReadStream stream)

Definition at line 193 of file resource.cpp.

◆ loadEXEv7()

void Director::DirectorEngine::loadEXEv7 ( Common::SeekableReadStream stream)

Definition at line 212 of file resource.cpp.

◆ loadInitialMovie()

void Director::DirectorEngine::loadInitialMovie ( const Common::String  movie)

Definition at line 54 of file resource.cpp.

◆ loadMac()

void Director::DirectorEngine::loadMac ( const Common::String  movie)

Definition at line 233 of file resource.cpp.

◆ loadPalettes()

void Director::DirectorEngine::loadPalettes ( )

Definition at line 715 of file graphics.cpp.

◆ loadPatterns()

void Director::DirectorEngine::loadPatterns ( )

Definition at line 702 of file graphics.cpp.

◆ loadSharedCastsFrom()

void Director::DirectorEngine::loadSharedCastsFrom ( Common::String  filename)

Definition at line 278 of file resource.cpp.

◆ openMainArchive()

Archive * Director::DirectorEngine::openMainArchive ( const Common::String  movie)

Definition at line 61 of file resource.cpp.

◆ processEvents()

void Director::DirectorEngine::processEvents ( )

Definition at line 44 of file events.cpp.

◆ run()

Common::Error Director::DirectorEngine::run ( )

Init the engine and start its main loop.

returns kNoError on success, else an error code.

Implements Engine.

Definition at line 114 of file director.cpp.

◆ scanMovies()

Common::HashMap< Common::String, Score * > * Director::DirectorEngine::scanMovies ( const Common::String folder)

Definition at line 283 of file director.cpp.

◆ setDraggedSprite()

void Director::DirectorEngine::setDraggedSprite ( uint16  id)

Definition at line 137 of file events.cpp.

◆ setPalette() [1/2]

void Director::DirectorEngine::setPalette ( byte palette,
uint16  count 

Definition at line 730 of file graphics.cpp.

◆ setPalette() [2/2]

void Director::DirectorEngine::setPalette ( int  id)

Definition at line 721 of file graphics.cpp.

◆ testFonts()

void Director::DirectorEngine::testFonts ( )

Definition at line 806 of file graphics.cpp.

◆ testFontScaling()

void Director::DirectorEngine::testFontScaling ( )

Definition at line 738 of file graphics.cpp.

Member Data Documentation

◆ _colorDepth

int Director::DirectorEngine::_colorDepth

Definition at line 133 of file director.h.

◆ _currentPalette

byte* Director::DirectorEngine::_currentPalette

Definition at line 163 of file director.h.

◆ _currentPaletteLength

uint16 Director::DirectorEngine::_currentPaletteLength

Definition at line 164 of file director.h.

◆ _currentPath

Common::String Director::DirectorEngine::_currentPath

Definition at line 168 of file director.h.

◆ _currentScore

Score* Director::DirectorEngine::_currentScore

Definition at line 167 of file director.h.

◆ _director3Patterns

Graphics::MacPatterns Director::DirectorEngine::_director3Patterns

Definition at line 170 of file director.h.

◆ _director3QuickDrawPatterns

Graphics::MacPatterns Director::DirectorEngine::_director3QuickDrawPatterns

Definition at line 171 of file director.h.

◆ _director4Palettes

Common::HashMap<int, PaletteV4 *> Director::DirectorEngine::_director4Palettes

Definition at line 173 of file director.h.

◆ _draggingSprite

bool Director::DirectorEngine::_draggingSprite

Definition at line 177 of file director.h.

◆ _draggingSpriteId

uint16 Director::DirectorEngine::_draggingSpriteId

Definition at line 178 of file director.h.

◆ _draggingSpritePos

Common::Point Director::DirectorEngine::_draggingSpritePos

Definition at line 179 of file director.h.

◆ _gameDescription

const DirectorGameDescription* Director::DirectorEngine::_gameDescription

Definition at line 147 of file director.h.

◆ _key

unsigned char Director::DirectorEngine::_key

Definition at line 134 of file director.h.

◆ _keyCode

int Director::DirectorEngine::_keyCode

Definition at line 135 of file director.h.

◆ _lingo

Lingo* Director::DirectorEngine::_lingo

Definition at line 165 of file director.h.

◆ _macBinary

Common::MacResManager* Director::DirectorEngine::_macBinary

Definition at line 161 of file director.h.

◆ _machineType

int Director::DirectorEngine::_machineType

Definition at line 136 of file director.h.

◆ _mainArchive

Archive* Director::DirectorEngine::_mainArchive

Definition at line 160 of file director.h.

◆ _movieQueue

Common::StringArray Director::DirectorEngine::_movieQueue

Definition at line 181 of file director.h.

◆ _movies

Common::HashMap<Common::String, Score *>* Director::DirectorEngine::_movies

Definition at line 127 of file director.h.

◆ _movieStack

Common::List<MovieReference> Director::DirectorEngine::_movieStack

Definition at line 141 of file director.h.

◆ _nextMovie

MovieReference Director::DirectorEngine::_nextMovie

Definition at line 140 of file director.h.

◆ _playbackPaused

bool Director::DirectorEngine::_playbackPaused

Definition at line 137 of file director.h.

◆ _rnd

Common::RandomSource Director::DirectorEngine::_rnd

Definition at line 129 of file director.h.

◆ _sharedCastFile

Common::String Director::DirectorEngine::_sharedCastFile

Definition at line 175 of file director.h.

◆ _sharedScore

Score* Director::DirectorEngine::_sharedScore

Definition at line 158 of file director.h.

◆ _skipFrameAdvance

bool Director::DirectorEngine::_skipFrameAdvance

Definition at line 138 of file director.h.

◆ _soundManager

DirectorSound* Director::DirectorEngine::_soundManager

Definition at line 162 of file director.h.

◆ _wm

Graphics::MacWindowManager* Director::DirectorEngine::_wm

Definition at line 130 of file director.h.

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