ScummVM API documentation
TwinE::TwinEEngine Class Reference
Inheritance diagram for TwinE::TwinEEngine:
Engine

Public Member Functions

 TwinEEngine (OSystem *system, Common::Language language, uint32 flagsTwineGameType, Common::Platform platform, TwineGameType gameType)
 
Common::Error run () override
 
bool hasFeature (EngineFeature f) const override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
Common::Error loadGameStream (Common::SeekableReadStream *stream) override
 
Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false) override
 
int32 toSeconds (int x) const
 
void wipeSaveSlot (int slot)
 
SaveStateList getSaveSlots () const
 
void autoSave ()
 
void pushMouseCursorVisible ()
 
void popMouseCursorVisible ()
 
bool isCDROM () const
 
bool isLBA1 () const
 
bool isLBA2 () const
 
bool isLBASlideShow () const
 
bool isMod () const
 
bool isDotEmuEnhanced () const
 
bool isLba1Classic () const
 
bool isDemo () const
 
bool isAndroid () const
 
const char * getGameId () const
 
Common::Language getGameLang () const
 
int numLocations () const
 
bool unlockAchievement (const Common::String &id)
 
int width () const
 
int height () const
 
int originalWidth () const
 
int originalHeight () const
 
Common::Rect rect () const
 
Common::Rect centerOnScreen (int32 w, int32 h) const
 
Common::Rect centerOnScreenX (int32 w, int32 y, int32 h) const
 
void extInitMcga ()
 
void extInitSvga ()
 
void testRestoreModeSVGA (bool redraw)
 
void queueMovie (const char *filename)
 
void clearScreenMinMax (Common::Rect &rect)
 
void adjustScreenMax (Common::Rect &rect, int16 x, int16 y)
 
int getRandomNumber (uint max=0x7FFF)
 
void blitWorkToFront (const Common::Rect &rect)
 
void blitFrontToWork (const Common::Rect &rect)
 
void restoreFrontBuffer ()
 
void saveFrontBuffer ()
 
void freezeTime (bool pause)
 
void unfreezeTime ()
 
bool gameEngineLoop ()
 
bool delaySkip (uint32 time)
 
void setPalette (const uint32 *palette)
 
void setPalette (uint startColor, uint numColors, const byte *palette)
 Set the Palette object. More...
 
void copyBlockPhys (int32 left, int32 top, int32 right, int32 bottom)
 
void copyBlockPhys (const Common::Rect &rect)
 
void readKeys ()
 
void drawText (int32 x, int32 y, const Common::String &text, bool center=false, bool bigFont=false, int width=100)
 
- Public Member Functions inherited from Engine
MetaEnginegetMetaEngine () const
 
void setMetaEngine (MetaEngine *metaEngine)
 
PauseToken pauseEngine ()
 
bool isPaused () const
 
void openMainMenuDialog ()
 
uint32 getTotalPlayTime () const
 
void setTotalPlayTime (uint32 time=0)
 
Common::TimerManagergetTimerManager ()
 
Common::EventManagergetEventManager ()
 
Common::SaveFileManagergetSaveFileManager ()
 
bool existExtractedCDAudioFiles (uint track=1)
 
bool isDataAndCDAudioReadFromSameCD ()
 
void warnMissingExtractedCDAudio ()
 
void handleAutoSave ()
 
void saveAutosaveIfEnabled ()
 
virtual bool canSaveAutosaveCurrently ()
 
virtual int getAutosaveSlot () const
 
 Engine (OSystem *syst)
 
virtual ~Engine ()
 
virtual void initializePath (const Common::FSNode &gamePath)
 
virtual void errorString (const char *buf_input, char *buf_output, int buf_output_size)
 
virtual GUI::DebuggergetDebugger () final
 
void setDebugger (GUI::Debugger *debugger)
 
GUI::DebuggergetOrCreateDebugger ()
 
virtual void syncSoundSettings ()
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameState (int slot)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Public Attributes

Actor_actor
 
Animations_animations
 
Collision_collision
 
Extra_extra
 
GameState_gameState
 
Grid_grid
 
Movements_movements
 
Interface_interface
 
Menu_menu
 
Movies_movie
 
MenuOptions_menuOptions
 
Music_music
 
Redraw_redraw
 
Renderer_renderer
 
Resources_resources
 
Scene_scene
 
Screens_screens
 
Holomap_holomap
 
Sound_sound
 
Text_text
 
DebugGrid_debugGrid
 
Input_input
 
Debug_debug
 
Buggy_buggy
 
DebugScene_debugScene
 
ConfigFile _cfgfile
 
int32 _frameCounter = 0
 
SceneLoopState _sceneLoopState = SceneLoopState::ReturnToMenu
 
int32 timerRef = 0
 
int32 _loopInventoryItem = 0
 
int32 _stepFalling = 0
 
uint32 _gameFlags
 
Common::Platform _platform
 
bool _flagRain
 
bool _disableScreenRecenter = false
 
Graphics::ManagedSurface _imageBuffer
 
Graphics::ManagedSurface _workVideoBuffer
 
TwineScreen _frontVideoBuffer
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Additional Inherited Members

- Public Types inherited from Engine
enum  EngineFeature {
  kSupportsSubtitleOptions, kSupportsReturnToLauncher, kSupportsLoadingDuringRuntime, kSupportsSavingDuringRuntime,
  kSupportsChangingOptionsDuringRuntime, kSupportsArbitraryResolutions, kSupportsHelp, kSupportsQuitDialogOverride
}
 
- Static Public Member Functions inherited from Engine
static void quitGame ()
 
static bool shouldQuit ()
 
static MetaEngineDetectiongetMetaEngineDetection ()
 
static bool warnUserAboutUnsupportedGame (Common::String msg=Common::String())
 
static void errorUnsupportedGame (Common::String extraMsg)
 
- Protected Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
void defaultSyncSoundSettings ()
 
virtual void pauseEngineIntern (bool pause)
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Member Function Documentation

◆ run()

Common::Error TwinE::TwinEEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ hasFeature()

bool TwinE::TwinEEngine::hasFeature ( EngineFeature  f) const
overridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

◆ canLoadGameStateCurrently()

bool TwinE::TwinEEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
inlineoverridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ canSaveGameStateCurrently()

bool TwinE::TwinEEngine::canSaveGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be saved.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ loadGameStream()

Common::Error TwinE::TwinEEngine::loadGameStream ( Common::SeekableReadStream stream)
overridevirtual

Load a game state.

Parameters
streamThe stream to load the save state from.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ saveGameStream()

Common::Error TwinE::TwinEEngine::saveGameStream ( Common::WriteStream stream,
bool  isAutosave = false 
)
overridevirtual

Save a game state.

Parameters
streamThe write stream to save the savegame data to.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ getRandomNumber()

int TwinE::TwinEEngine::getRandomNumber ( uint  max = 0x7FFF)
Returns
A random value between [0-max)

◆ gameEngineLoop()

bool TwinE::TwinEEngine::gameEngineLoop ( )

Game engine main loop

Returns
true if we want to show credit sequence

◆ delaySkip()

bool TwinE::TwinEEngine::delaySkip ( uint32  time)

Deplay certain seconds till proceed - Can also Skip this delay

Parameters
timetime in milliseconds to delay
Returns
true if the delay was aborted, false otherwise

◆ setPalette() [1/2]

void TwinE::TwinEEngine::setPalette ( const uint32 *  palette)

Set a new palette in the SDL screen buffer

Parameters
palettepalette to set in RGBA

◆ setPalette() [2/2]

void TwinE::TwinEEngine::setPalette ( uint  startColor,
uint  numColors,
const byte *  palette 
)

Set the Palette object.

Parameters
startColorthe first palette entry to be updated
numColorsthe number of palette entries to be updated
palettepalette to set in RGB

◆ copyBlockPhys()

void TwinE::TwinEEngine::copyBlockPhys ( int32  left,
int32  top,
int32  right,
int32  bottom 
)

Blit surface in the screen in a determinate area

Parameters
leftleft position to start copy
toptop position to start copy
rightright position to start copy
bottombottom position to start copy

◆ readKeys()

void TwinE::TwinEEngine::readKeys ( )

Handle keyboard pressed keys

◆ drawText()

void TwinE::TwinEEngine::drawText ( int32  x,
int32  y,
const Common::String text,
bool  center = false,
bool  bigFont = false,
int  width = 100 
)

Display text in screen

Parameters
xX coordinate in screen
yY coordinate in screen
texttext to display
centerif the text should be centered accoding with the giving positions

Member Data Documentation

◆ _cfgfile

ConfigFile TwinE::TwinEEngine::_cfgfile

Configuration file structure Contains all the data used in the engine to configurated the game in particulary ways.

◆ _disableScreenRecenter

bool TwinE::TwinEEngine::_disableScreenRecenter = false

Disable screen recenter

◆ _workVideoBuffer

Graphics::ManagedSurface TwinE::TwinEEngine::_workVideoBuffer

Work video buffer

◆ _frontVideoBuffer

TwineScreen TwinE::TwinEEngine::_frontVideoBuffer

Main game video buffer


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