ScummVM
CryOmni3D::CryOmni3DEngine Class Referenceabstract

#include <cryomni3d.h>

+ Inheritance diagram for CryOmni3D::CryOmni3DEngine:
+ Collaboration diagram for CryOmni3D::CryOmni3DEngine:

Public Types

typedef void(CryOmni3DEngine::* HNMCallback) (uint frameNum)
 
- 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...
 

Public Member Functions

 CryOmni3DEngine (OSystem *syst, const CryOmni3DGameDescription *gamedesc)
 
 ~CryOmni3DEngine () override
 
const char * getGameId () const
 
uint32 getFeatures () const
 
uint16 getVersion () const
 
Common::Platform getPlatform () const
 
uint8 getGameType () const
 
Common::Language getLanguage () const
 
bool hasFeature (EngineFeature f) const override
 Determine whether the engine supports the specified feature. More...
 
bool canLoadGameStateCurrently () override
 Indicates whether a game state can be loaded. More...
 
bool canSaveGameStateCurrently () override
 Indicates whether a game state can be saved. More...
 
void setCanLoadSave (bool canLoadSave)
 
Image::ImageDecoder * loadHLZ (const Common::String &filename)
 
void fillSurface (byte color)
 
void setCursor (const Graphics::Cursor &cursor) const
 
void setCursor (uint cursorId) const
 
bool showMouse (bool visible)
 
void playHNM (const Common::String &filename, Audio::Mixer::SoundType soundType=Audio::Mixer::kPlainSoundType, HNMCallback beforeDraw=nullptr, HNMCallback afterDraw=nullptr)
 
bool displayHLZ (const Common::String &filename, uint32 timeout=uint(-1))
 
bool pollEvents ()
 
Common::Point getMousePos ()
 
void setMousePos (const Common::Point &point)
 
uint getCurrentMouseButton ()
 
Common::KeyState getNextKey ()
 
bool checkKeysPressed ()
 
bool checkKeysPressed (uint numKeys,...)
 
void clearKeys ()
 
void waitMouseRelease ()
 
void setAutoRepeatClick (uint millis)
 
DragStatus getDragStatus ()
 
Common::String prepareFileName (const Common::String &baseName, const char *extension) const
 
virtual Common::String prepareFileName (const Common::String &baseName, const char *const *extensions) const
 
virtual bool displayToolbar (const Graphics::Surface *original)=0
 
virtual bool hasPlaceDocumentation ()=0
 
virtual bool displayPlaceDocumentation ()=0
 
virtual uint displayOptions ()=0
 
virtual bool shouldAbort ()
 
virtual void makeTranslucent (Graphics::Surface &dst, const Graphics::Surface &src) const =0
 
virtual void setupPalette (const byte *colors, uint start, uint num)=0
 
- 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 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...
 
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

const CryOmni3DGameDescription_gameDescription
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Static Public Attributes

static const uint kSaveDescriptionLen = 20
 

Protected Member Functions

Common::Error run () override
 Init the engine and start its main loop. More...
 
DATSeekableStreamgetStaticData (uint32 gameId, uint16 version) const
 
void copySubPalette (byte *dst, const byte *src, uint start, uint num)
 
void setPalette (const byte *colors, uint start, uint num)
 
void lockPalette (uint startRW, uint endRW)
 
void unlockPalette ()
 
void fadeOutPalette ()
 
void fadeInPalette (const byte *colors)
 
void setBlackPalette ()
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 

Protected Attributes

bool _canLoadSave
 
FontManager _fontManager
 
Sprites _sprites
 
Objects _objects
 
Inventory _inventory
 
Common::Queue< Common::KeyState_keysPressed
 
DragStatus _dragStatus
 
Common::Point _dragStart
 
uint _lastMouseButton
 
uint _autoRepeatNextEvent
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Private Member Functions

void pauseEngineIntern (bool) override
 Actual implementation of pauseEngine by subclasses. More...
 

Private Attributes

uint _lockPaletteStartRW
 
uint _lockPaletteEndRW
 

Additional Inherited Members

- 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...
 

Detailed Description

Definition at line 100 of file cryomni3d.h.

Member Typedef Documentation

◆ HNMCallback

typedef void(CryOmni3DEngine::* CryOmni3D::CryOmni3DEngine::HNMCallback) (uint frameNum)

Definition at line 134 of file cryomni3d.h.

Constructor & Destructor Documentation

◆ CryOmni3DEngine()

CryOmni3D::CryOmni3DEngine::CryOmni3DEngine ( OSystem syst,
const CryOmni3DGameDescription gamedesc 
)

Definition at line 44 of file cryomni3d.cpp.

◆ ~CryOmni3DEngine()

CryOmni3D::CryOmni3DEngine::~CryOmni3DEngine ( )
override

Definition at line 62 of file cryomni3d.cpp.

Member Function Documentation

◆ canLoadGameStateCurrently()

bool CryOmni3D::CryOmni3DEngine::canLoadGameStateCurrently ( )
inlineoverridevirtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 118 of file cryomni3d.h.

◆ canSaveGameStateCurrently()

bool CryOmni3D::CryOmni3DEngine::canSaveGameStateCurrently ( )
inlineoverridevirtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 119 of file cryomni3d.h.

◆ checkKeysPressed() [1/2]

bool CryOmni3D::CryOmni3DEngine::checkKeysPressed ( )

Definition at line 365 of file cryomni3d.cpp.

◆ checkKeysPressed() [2/2]

bool CryOmni3D::CryOmni3DEngine::checkKeysPressed ( uint  numKeys,
  ... 
)

Definition at line 375 of file cryomni3d.cpp.

◆ clearKeys()

void CryOmni3D::CryOmni3DEngine::clearKeys ( )
inline

Definition at line 147 of file cryomni3d.h.

◆ copySubPalette()

void CryOmni3D::CryOmni3DEngine::copySubPalette ( byte dst,
const byte src,
uint  start,
uint  num 
)
protected

Definition at line 396 of file cryomni3d.cpp.

◆ displayHLZ()

bool CryOmni3D::CryOmni3DEngine::displayHLZ ( const Common::String filename,
uint32  timeout = uint(-1) 
)

Definition at line 216 of file cryomni3d.cpp.

◆ displayOptions()

virtual uint CryOmni3D::CryOmni3DEngine::displayOptions ( )
pure virtual

◆ displayPlaceDocumentation()

virtual bool CryOmni3D::CryOmni3DEngine::displayPlaceDocumentation ( )
pure virtual

◆ displayToolbar()

virtual bool CryOmni3D::CryOmni3DEngine::displayToolbar ( const Graphics::Surface original)
pure virtual

◆ fadeInPalette()

void CryOmni3D::CryOmni3DEngine::fadeInPalette ( const byte colors)
protected

Definition at line 446 of file cryomni3d.cpp.

◆ fadeOutPalette()

void CryOmni3D::CryOmni3DEngine::fadeOutPalette ( )
protected

Definition at line 416 of file cryomni3d.cpp.

◆ fillSurface()

void CryOmni3D::CryOmni3DEngine::fillSurface ( byte  color)

Definition at line 484 of file cryomni3d.cpp.

◆ getCurrentMouseButton()

uint CryOmni3D::CryOmni3DEngine::getCurrentMouseButton ( )
inline

Definition at line 143 of file cryomni3d.h.

◆ getDragStatus()

DragStatus CryOmni3D::CryOmni3DEngine::getDragStatus ( )
inline

Definition at line 150 of file cryomni3d.h.

◆ getFeatures()

uint32 CryOmni3D::CryOmni3DEngine::getFeatures ( ) const

Definition at line 52 of file detection.cpp.

◆ getGameId()

const char * CryOmni3D::CryOmni3DEngine::getGameId ( ) const

Definition at line 48 of file detection.cpp.

◆ getGameType()

uint8 CryOmni3D::CryOmni3DEngine::getGameType ( ) const

Definition at line 60 of file detection.cpp.

◆ getLanguage()

Common::Language CryOmni3D::CryOmni3DEngine::getLanguage ( ) const

Definition at line 64 of file detection.cpp.

◆ getMousePos()

Common::Point CryOmni3D::CryOmni3DEngine::getMousePos ( )

Definition at line 353 of file cryomni3d.cpp.

◆ getNextKey()

Common::KeyState CryOmni3D::CryOmni3DEngine::getNextKey ( )

Definition at line 357 of file cryomni3d.cpp.

◆ getPlatform()

Common::Platform CryOmni3D::CryOmni3DEngine::getPlatform ( ) const

Definition at line 56 of file detection.cpp.

◆ getStaticData()

DATSeekableStream * CryOmni3D::CryOmni3DEngine::getStaticData ( uint32  gameId,
uint16  version 
) const
protected

Definition at line 83 of file cryomni3d.cpp.

◆ getVersion()

uint16 CryOmni3D::CryOmni3DEngine::getVersion ( ) const

◆ hasFeature()

bool CryOmni3D::CryOmni3DEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Reimplemented in CryOmni3D::Versailles::CryOmni3DEngine_Versailles.

Definition at line 68 of file detection.cpp.

◆ hasPlaceDocumentation()

virtual bool CryOmni3D::CryOmni3DEngine::hasPlaceDocumentation ( )
pure virtual

◆ loadHLZ()

Image::ImageDecoder * CryOmni3D::CryOmni3DEngine::loadHLZ ( const Common::String filename)

Definition at line 194 of file cryomni3d.cpp.

◆ lockPalette()

void CryOmni3D::CryOmni3DEngine::lockPalette ( uint  startRW,
uint  endRW 
)
inlineprotected

Definition at line 173 of file cryomni3d.h.

◆ makeTranslucent()

virtual void CryOmni3D::CryOmni3DEngine::makeTranslucent ( Graphics::Surface dst,
const Graphics::Surface src 
) const
pure virtual

◆ pauseEngineIntern()

void CryOmni3D::CryOmni3DEngine::pauseEngineIntern ( bool  pause)
overrideprivatevirtual

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 70 of file cryomni3d.cpp.

◆ playHNM()

void CryOmni3D::CryOmni3DEngine::playHNM ( const Common::String filename,
Audio::Mixer::SoundType  soundType = Audio::Mixer::kPlainSoundType,
HNMCallback  beforeDraw = nullptr,
HNMCallback  afterDraw = nullptr 
)

Definition at line 137 of file cryomni3d.cpp.

◆ pollEvents()

bool CryOmni3D::CryOmni3DEngine::pollEvents ( )

Definition at line 263 of file cryomni3d.cpp.

◆ prepareFileName() [1/2]

Common::String CryOmni3D::CryOmni3DEngine::prepareFileName ( const Common::String baseName,
const char *const *  extensions 
) const
virtual

Reimplemented in CryOmni3D::Versailles::CryOmni3DEngine_Versailles.

Definition at line 103 of file cryomni3d.cpp.

◆ prepareFileName() [2/2]

Common::String CryOmni3D::CryOmni3DEngine::prepareFileName ( const Common::String baseName,
const char *  extension 
) const
inline

Definition at line 152 of file cryomni3d.h.

◆ run()

Common::Error CryOmni3D::CryOmni3DEngine::run ( )
overrideprotectedvirtual

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Reimplemented in CryOmni3D::Versailles::CryOmni3DEngine_Versailles.

Definition at line 66 of file cryomni3d.cpp.

◆ setAutoRepeatClick()

void CryOmni3D::CryOmni3DEngine::setAutoRepeatClick ( uint  millis)

Definition at line 335 of file cryomni3d.cpp.

◆ setBlackPalette()

void CryOmni3D::CryOmni3DEngine::setBlackPalette ( )
protected

Definition at line 477 of file cryomni3d.cpp.

◆ setCanLoadSave()

void CryOmni3D::CryOmni3DEngine::setCanLoadSave ( bool  canLoadSave)
inline

Definition at line 121 of file cryomni3d.h.

◆ setCursor() [1/2]

void CryOmni3D::CryOmni3DEngine::setCursor ( const Graphics::Cursor cursor) const

Definition at line 254 of file cryomni3d.cpp.

◆ setCursor() [2/2]

void CryOmni3D::CryOmni3DEngine::setCursor ( uint  cursorId) const

Definition at line 258 of file cryomni3d.cpp.

◆ setMousePos()

void CryOmni3D::CryOmni3DEngine::setMousePos ( const Common::Point point)

Definition at line 347 of file cryomni3d.cpp.

◆ setPalette()

void CryOmni3D::CryOmni3DEngine::setPalette ( const byte colors,
uint  start,
uint  num 
)
protected

Definition at line 402 of file cryomni3d.cpp.

◆ setupPalette()

virtual void CryOmni3D::CryOmni3DEngine::setupPalette ( const byte colors,
uint  start,
uint  num 
)
pure virtual

◆ shouldAbort()

virtual bool CryOmni3D::CryOmni3DEngine::shouldAbort ( )
inlinevirtual

Reimplemented in CryOmni3D::Versailles::CryOmni3DEngine_Versailles.

Definition at line 163 of file cryomni3d.h.

◆ showMouse()

bool CryOmni3D::CryOmni3DEngine::showMouse ( bool  visible)
inline

Definition at line 133 of file cryomni3d.h.

◆ unlockPalette()

void CryOmni3D::CryOmni3DEngine::unlockPalette ( )
inlineprotected

Definition at line 174 of file cryomni3d.h.

◆ waitMouseRelease()

void CryOmni3D::CryOmni3DEngine::waitMouseRelease ( )

Definition at line 339 of file cryomni3d.cpp.

Member Data Documentation

◆ _autoRepeatNextEvent

uint CryOmni3D::CryOmni3DEngine::_autoRepeatNextEvent
protected

Definition at line 192 of file cryomni3d.h.

◆ _canLoadSave

bool CryOmni3D::CryOmni3DEngine::_canLoadSave
protected

Definition at line 180 of file cryomni3d.h.

◆ _dragStart

Common::Point CryOmni3D::CryOmni3DEngine::_dragStart
protected

Definition at line 190 of file cryomni3d.h.

◆ _dragStatus

DragStatus CryOmni3D::CryOmni3DEngine::_dragStatus
protected

Definition at line 189 of file cryomni3d.h.

◆ _fontManager

FontManager CryOmni3D::CryOmni3DEngine::_fontManager
protected

Definition at line 182 of file cryomni3d.h.

◆ _gameDescription

const CryOmni3DGameDescription* CryOmni3D::CryOmni3DEngine::_gameDescription

Definition at line 109 of file cryomni3d.h.

◆ _inventory

Inventory CryOmni3D::CryOmni3DEngine::_inventory
protected

Definition at line 185 of file cryomni3d.h.

◆ _keysPressed

Common::Queue<Common::KeyState> CryOmni3D::CryOmni3DEngine::_keysPressed
protected

Definition at line 187 of file cryomni3d.h.

◆ _lastMouseButton

uint CryOmni3D::CryOmni3DEngine::_lastMouseButton
protected

Definition at line 191 of file cryomni3d.h.

◆ _lockPaletteEndRW

uint CryOmni3D::CryOmni3DEngine::_lockPaletteEndRW
private

Definition at line 196 of file cryomni3d.h.

◆ _lockPaletteStartRW

uint CryOmni3D::CryOmni3DEngine::_lockPaletteStartRW
private

Definition at line 195 of file cryomni3d.h.

◆ _objects

Objects CryOmni3D::CryOmni3DEngine::_objects
protected

Definition at line 184 of file cryomni3d.h.

◆ _sprites

Sprites CryOmni3D::CryOmni3DEngine::_sprites
protected

Definition at line 183 of file cryomni3d.h.

◆ kSaveDescriptionLen

const uint CryOmni3D::CryOmni3DEngine::kSaveDescriptionLen = 20
static

Definition at line 122 of file cryomni3d.h.


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