ScummVM
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 ()
 
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
 
void setPalette (byte *palette, uint16 count)
 
bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
const bytegetPalette () const
 
uint16 getPaletteColorCount () const
 
void loadSharedCastsFrom (Common::String filename)
 
void loadPatterns ()
 
Graphics::MacPatternsgetPatterns ()
 
void loadInitialMovie (const Common::String movie)
 
ArchiveopenMainArchive (const Common::String movie)
 
ArchivecreateArchive ()
 
void cleanupMainArchive ()
 
void processEvents ()
 
void setDraggedSprite (uint16 id)
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * getSharedDIB () const
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * getSharedBMP () const
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * getSharedSTXT () const
 
Common::HashMap< int, CastType > * getSharedCastTypes ()
 
- 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...
 
virtual Common::Error loadGameState (int slot)
 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)
 Save a game state. More...
 
virtual bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 

Public Attributes

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

Protected Member Functions

virtual Common::Error run ()
 Init the engine and start its main loop. 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...
 
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 ()
 

Private Attributes

const DirectorGameDescription_gameDescription
 
Score_sharedScore
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * _sharedDIB
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * _sharedSTXT
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * _sharedSound
 
Common::HashMap< int, Common::SeekableSubReadStreamEndian * > * _sharedBMP
 
Archive_mainArchive
 
Common::MacResManager_macBinary
 
DirectorSound_soundManager
 
byte_currentPalette
 
uint16 _currentPaletteLength
 
Lingo_lingo
 
Score_currentScore
 
Graphics::MacPatterns _director3Patterns
 
Graphics::MacPatterns _director3QuickDrawPatterns
 
Common::String _sharedCastFile
 
Common::HashMap< int, CastType_dummyCastType
 
bool _draggingSprite
 
uint16 _draggingSpriteId
 
Common::Point _draggingSpritePos
 

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...
 
- 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 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 78 of file director.h.

Constructor & Destructor Documentation

◆ DirectorEngine()

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

Definition at line 41 of file director.cpp.

◆ ~DirectorEngine()

Director::DirectorEngine::~DirectorEngine ( )

Definition at line 98 of file director.cpp.

Member Function Documentation

◆ cleanupMainArchive()

void Director::DirectorEngine::cleanupMainArchive ( )

Definition at line 68 of file resource.cpp.

◆ createArchive()

Archive * Director::DirectorEngine::createArchive ( )

Definition at line 36 of file resource.cpp.

◆ getCurrentScore()

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

Definition at line 94 of file director.h.

◆ getEXEName()

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

Definition at line 59 of file detection.cpp.

◆ getGameID()

DirectorGameID Director::DirectorEngine::getGameID ( ) const

Definition at line 43 of file detection.cpp.

◆ getLanguage()

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

Definition at line 55 of file detection.cpp.

◆ getLingo()

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

Definition at line 93 of file director.h.

◆ getMacWindowManager()

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

Definition at line 91 of file director.h.

◆ getMainArchive()

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

Definition at line 92 of file director.h.

◆ getPalette()

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

Definition at line 98 of file director.h.

◆ getPaletteColorCount()

uint16 Director::DirectorEngine::getPaletteColorCount ( ) const
inline

Definition at line 99 of file director.h.

◆ getPatterns()

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

Definition at line 215 of file graphics.cpp.

◆ getPlatform()

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

Definition at line 47 of file detection.cpp.

◆ getSharedBMP()

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::getSharedBMP ( ) const
inline

Definition at line 113 of file director.h.

◆ getSharedCastTypes()

Common::HashMap< int, CastType > * Director::DirectorEngine::getSharedCastTypes ( )

Definition at line 262 of file director.cpp.

◆ getSharedDIB()

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::getSharedDIB ( ) const
inline

Definition at line 112 of file director.h.

◆ getSharedScore()

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

Definition at line 95 of file director.h.

◆ getSharedSTXT()

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::getSharedSTXT ( ) const
inline

Definition at line 114 of file director.h.

◆ getSoundManager()

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

Definition at line 90 of file director.h.

◆ getVersion()

uint16 Director::DirectorEngine::getVersion ( ) const

Definition at line 51 of file detection.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 66 of file detection.cpp.

◆ loadEXE()

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

Definition at line 73 of file resource.cpp.

◆ loadEXERIFX()

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

Definition at line 210 of file resource.cpp.

◆ loadEXEv3()

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

Definition at line 108 of file resource.cpp.

◆ loadEXEv4()

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

Definition at line 162 of file resource.cpp.

◆ loadEXEv5()

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

Definition at line 177 of file resource.cpp.

◆ loadEXEv7()

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

Definition at line 196 of file resource.cpp.

◆ loadInitialMovie()

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

Definition at line 50 of file resource.cpp.

◆ loadMac()

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

Definition at line 217 of file resource.cpp.

◆ loadPatterns()

void Director::DirectorEngine::loadPatterns ( )

Definition at line 207 of file graphics.cpp.

◆ loadSharedCastsFrom()

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

Definition at line 249 of file resource.cpp.

◆ openMainArchive()

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

Definition at line 57 of file resource.cpp.

◆ processEvents()

void Director::DirectorEngine::processEvents ( )

Definition at line 43 of file events.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 113 of file director.cpp.

◆ scanMovies()

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

Definition at line 221 of file director.cpp.

◆ setDraggedSprite()

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

Definition at line 129 of file events.cpp.

◆ setPalette()

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

Definition at line 220 of file graphics.cpp.

◆ testFonts()

void Director::DirectorEngine::testFonts ( )
private

Definition at line 282 of file graphics.cpp.

◆ testFontScaling()

void Director::DirectorEngine::testFontScaling ( )
private

Definition at line 225 of file graphics.cpp.

Member Data Documentation

◆ _colorDepth

int Director::DirectorEngine::_colorDepth

Definition at line 123 of file director.h.

◆ _currentPalette

byte* Director::DirectorEngine::_currentPalette
private

Definition at line 157 of file director.h.

◆ _currentPaletteLength

uint16 Director::DirectorEngine::_currentPaletteLength
private

Definition at line 158 of file director.h.

◆ _currentScore

Score* Director::DirectorEngine::_currentScore
private

Definition at line 161 of file director.h.

◆ _director3Patterns

Graphics::MacPatterns Director::DirectorEngine::_director3Patterns
private

Definition at line 163 of file director.h.

◆ _director3QuickDrawPatterns

Graphics::MacPatterns Director::DirectorEngine::_director3QuickDrawPatterns
private

Definition at line 164 of file director.h.

◆ _draggingSprite

bool Director::DirectorEngine::_draggingSprite
private

Definition at line 169 of file director.h.

◆ _draggingSpriteId

uint16 Director::DirectorEngine::_draggingSpriteId
private

Definition at line 170 of file director.h.

◆ _draggingSpritePos

Common::Point Director::DirectorEngine::_draggingSpritePos
private

Definition at line 171 of file director.h.

◆ _dummyCastType

Common::HashMap<int, CastType> Director::DirectorEngine::_dummyCastType
private

Definition at line 167 of file director.h.

◆ _gameDescription

const DirectorGameDescription* Director::DirectorEngine::_gameDescription
private

Definition at line 137 of file director.h.

◆ _key

unsigned char Director::DirectorEngine::_key

Definition at line 124 of file director.h.

◆ _keyCode

int Director::DirectorEngine::_keyCode

Definition at line 125 of file director.h.

◆ _lingo

Lingo* Director::DirectorEngine::_lingo
private

Definition at line 159 of file director.h.

◆ _macBinary

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

Definition at line 155 of file director.h.

◆ _machineType

int Director::DirectorEngine::_machineType

Definition at line 126 of file director.h.

◆ _mainArchive

Archive* Director::DirectorEngine::_mainArchive
private

Definition at line 154 of file director.h.

◆ _movies

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

Definition at line 117 of file director.h.

◆ _movieStack

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

Definition at line 131 of file director.h.

◆ _nextMovie

MovieReference Director::DirectorEngine::_nextMovie

Definition at line 130 of file director.h.

◆ _playbackPaused

bool Director::DirectorEngine::_playbackPaused

Definition at line 127 of file director.h.

◆ _rnd

Common::RandomSource Director::DirectorEngine::_rnd

Definition at line 119 of file director.h.

◆ _sharedBMP

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::_sharedBMP
private

Definition at line 152 of file director.h.

◆ _sharedCastFile

Common::String Director::DirectorEngine::_sharedCastFile
private

Definition at line 166 of file director.h.

◆ _sharedDIB

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::_sharedDIB
private

Definition at line 149 of file director.h.

◆ _sharedScore

Score* Director::DirectorEngine::_sharedScore
private

Definition at line 148 of file director.h.

◆ _sharedSound

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::_sharedSound
private

Definition at line 151 of file director.h.

◆ _sharedSTXT

Common::HashMap<int, Common::SeekableSubReadStreamEndian *>* Director::DirectorEngine::_sharedSTXT
private

Definition at line 150 of file director.h.

◆ _skipFrameAdvance

bool Director::DirectorEngine::_skipFrameAdvance

Definition at line 128 of file director.h.

◆ _soundManager

DirectorSound* Director::DirectorEngine::_soundManager
private

Definition at line 156 of file director.h.

◆ _wm

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

Definition at line 120 of file director.h.


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