ScummVM API documentation
Toon::ToonEngine Class Reference
Inheritance diagram for Toon::ToonEngine:
Engine

Public Member Functions

 ToonEngine (OSystem *syst, const ADGameDescription *gameDescription)
 
Common::Error run () override
 
bool showMainMenu (bool &loadedGame)
 
bool showOptions ()
 
bool showQuitConfirmationDialogue ()
 
void init ()
 
bool loadToonDat ()
 
char ** loadTextsVariants (Common::File &in)
 
void unloadTextsVariants (char **texts)
 
void unloadToonDat ()
 
void setPaletteEntries (uint8 *palette, int32 offset, int32 num)
 
void fixPaletteEntries (uint8 *palette, int num)
 
void flushPalette (bool deferFlushToNextRender=true)
 
void parseInput ()
 
void initChapter ()
 
void initFonts ()
 
void setFont (bool alternative)
 
void loadScene (int32 SceneId, bool forGameLoad=false)
 
void exitScene ()
 
void loadCursor ()
 
void setCursor (int32 type, bool inventory=false, int32 offsetX=0, int offsetY=0)
 
void loadAdditionalPalette (const Common::Path &fileName, int32 mode)
 
void setupGeneralPalette ()
 
void render ()
 
void update (int32 timeIncrement)
 
void doFrame ()
 
void updateAnimationSceneScripts (int32 timeElapsed)
 
void updateCharacters (int32 timeElapsed)
 
void setSceneAnimationScriptUpdate (bool enable)
 
bool isUpdatingSceneAnimation ()
 
int32 getCurrentUpdatingSceneAnimation ()
 
int32 randRange (int32 minStart, int32 maxStart)
 
void selectHotspot ()
 
void clickEvent ()
 
int32 runEventScript (int32 x, int32 y, int32 mode, int32 id, int32 scriptId)
 
void flipScreens ()
 
void drawInfoLine ()
 
void drawConversationLine ()
 
const char * getLocationString (int32 locationId, bool alreadyVisited)
 
int32 getScaleAtPoint (int32 x, int32 y)
 
int32 getZAtPoint (int32 x, int32 y)
 
int32 getLayerAtPoint (int32 x, int32 y)
 
int32 characterTalk (int32 dialogid, bool blocking=true)
 
int32 simpleCharacterTalk (int32 dialogid)
 
void sayLines (int numLines, int dialogId)
 
void haveAConversation (int32 convId)
 
void processConversationClick (Conversation *conv, int32 status)
 
int32 runConversationCommand (int16 **command)
 
void prepareConversations ()
 
void drawConversationIcons ()
 
void simpleUpdate (bool waitCharacterToTalk=false)
 
int32 waitTicks (int32 numTicks, bool breakOnMouseClick)
 
void copyToVirtualScreen (bool updateScreen=true)
 
void getMouseEvent ()
 
int32 showInventory ()
 
void drawSack ()
 
void addItemToInventory (int32 item)
 
void deleteItemFromInventory (int32 item)
 
void replaceItemFromInventory (int32 item, int32 destItem)
 
void rearrangeInventory ()
 
void createMouseItem (int32 item)
 
void deleteMouseItem ()
 
void showCutaway (const Common::Path &cutawayPicture)
 
void hideCutaway ()
 
void drawPalette ()
 
void newGame ()
 
void playSoundWrong ()
 
void playSFX (int32 id, int32 volume)
 
void storeRifFlags (int32 location)
 
void restoreRifFlags (int32 location)
 
void getTextPosition (int32 characterId, int32 *retX, int32 *retY)
 
int32 getConversationFlag (int32 locationId, int32 param)
 
int32 getSpecialInventoryItem (int32 item)
 
CharactergetCharacterById (int32 charId)
 
Common::String getSavegameName (int nr)
 
bool loadGame (int32 slot)
 
bool saveGame (int32 slot, const Common::String &saveGameDesc)
 
void fadeIn (int32 numFrames)
 
void fadeOut (int32 numFrames)
 
void initCharacter (int32 characterId, int32 animScriptId, int32 animToPlayId, int32 sceneAnimationId)
 
int32 handleInventoryOnFlux (int32 itemId)
 
int32 handleInventoryOnInventory (int32 itemDest, int32 itemSrc)
 
int32 handleInventoryOnDrew (int32 itemId)
 
int32 pauseSceneAnimationScript (int32 animScriptId, int32 tickToWait)
 
void updateTimer (int32 timeIncrement)
 
Common::Path createRoomFilename (const Common::String &name)
 
void createShadowLUT ()
 
void playTalkAnimOnCharacter (int32 animID, int32 characterId, bool talker)
 
void updateScrolling (bool force, int32 timeIncrement)
 
void enableTimer (int32 timerId)
 
void setTimer (int32 timerId, int32 timerWait)
 
void disableTimer (int32 timerId)
 
void updateTimers ()
 
void makeLineNonWalkable (int32 x, int32 y, int32 x2, int32 y2)
 
void makeLineWalkable (int32 x, int32 y, int32 x2, int32 y2)
 
void renderInventory ()
 
void viewInventoryItem (const Common::Path &str, int32 lineId, int32 itemDest)
 
void storePalette ()
 
void restorePalette ()
 
const char * getSpecialConversationMusic (int32 locationId)
 
void playRoomMusic ()
 
void waitForScriptStep ()
 
void doMagnifierEffect ()
 
void drawCustomText (int16 x, int16 y, const char *line, Graphics::Surface *frame, byte color)
 
bool showConversationText () const
 
bool canSaveGameStateCurrently (Common::U32String *msg=nullptr) override
 
bool canLoadGameStateCurrently (Common::U32String *msg=nullptr) override
 
void pauseEngineIntern (bool pause) override
 
void syncSoundSettings () override
 
Resourcesresources ()
 
Statestate ()
 
Graphics::SurfacegetMainSurface ()
 
PicturegetMask ()
 
PicturegetPicture ()
 
AnimationManagergetAnimationManager ()
 
MoviegetMoviePlayer ()
 
SceneAnimationgetSceneAnimation (int32 id)
 
SceneAnimationScriptgetSceneAnimationScript (int32 id)
 
EMCInterpretergetScript ()
 
HotspotsgetHotspots ()
 
CharactergetCharacter (int32 charId)
 
uint8 * getShadowLUT ()
 
int32 getCurrentLineToSay ()
 
int32 getCurrentCharacterTalking ()
 
CharacterDrewgetDrew ()
 
CharacterFluxgetFlux ()
 
int32 getTickLength ()
 
int32 getOldMilli ()
 
AudioManagergetAudioManager ()
 
int32 getScriptRegionNested ()
 
int32 getMouseX ()
 
int32 getMouseY ()
 
PathFindinggetPathFinding ()
 
bool isEnglishDemo ()
 
Common::WriteStreamgetSaveBufferStream ()
 
bool shouldQuitGame () const
 
Common::Error saveGameState (int slot, const Common::String &desc, bool isAutosave=false) override
 
Common::Error loadGameState (int slot) override
 
bool hasFeature (EngineFeature f) const override
 
void dirtyAllScreen ()
 
void addDirtyRect (int32 left, int32 top, int32 right, int32 bottom)
 
void clearDirtyRects ()
 
- 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 ()
 
bool enhancementEnabled (int32 cls)
 
virtual void applyGameSettings ()
 
virtual void flipMute ()
 
virtual Common::String getSaveStateName (int slot) const
 
virtual Common::Error loadGameStream (Common::SeekableReadStream *stream)
 
void setGameToLoadSlot (int slot)
 
virtual Common::Error saveGameStream (Common::WriteStream *stream, bool isAutosave=false)
 
bool saveGameDialog ()
 
bool loadGameDialog ()
 

Public Attributes

const ADGameDescription_gameDescription
 
Common::Language _language
 
byte _numVariant
 
byte _gameVariant
 
char ** _locationDirNotVisited
 
char ** _locationDirVisited
 
char ** _specialInfoLine
 
- Public Attributes inherited from Engine
OSystem_system
 
Audio::Mixer_mixer
 

Protected Attributes

int32 _tickLength
 
Resources_resources
 
TextResource_genericTexts
 
TextResource_roomTexts
 
State_gameState
 
uint8 * _finalPalette
 
uint8 * _backupPalette
 
uint8 * _additionalPalette1
 
uint8 * _additionalPalette2
 
bool _additionalPalette2Present
 
uint8 * _cutawayPalette
 
uint8 * _universalPalette
 
uint8 * _fluxPalette
 
uint8 * _roomScaleData
 
uint8 * _shadowLUT
 
Picture_currentPicture
 
Picture_currentMask
 
Picture_currentCutaway
 
Picture_inventoryPicture
 
PathFinding_pathFinding
 
EMCInterpreter_script
 
EMCData _scriptData
 
EMCState _scriptState [4]
 
int32 _currentScriptRegion
 
ScriptFunc_script_func
 
SceneAnimation _sceneAnimations [64]
 
SceneAnimationScript _sceneAnimationScripts [64]
 
int32 _lastProcessedSceneScript
 
bool _animationSceneScriptRunFlag
 
bool _updatingSceneScriptRunFlag
 
Graphics::Surface_mainSurface
 
Common::Array< Common::Rect_dirtyRects
 
Common::Array< Common::Rect_oldDirtyRects
 
bool _dirtyAll
 
AnimationInstance_cursorAnimationInstance
 
Animation_cursorAnimation
 
Animation_dialogIcons
 
Animation_inventoryIcons
 
Animation_inventoryIconSlots
 
int32 _cursorOffsetX
 
int32 _cursorOffsetY
 
char * _currentTextLine
 
int32 _currentTextLineId
 
int32 _currentTextLineX
 
int32 _currentTextLineY
 
int32 _currentTextLineCharacterId
 
int32 _oldScrollValue
 
AnimationManager_animationManager
 
Character_characters [32]
 
Character_drew
 
Character_flux
 
Hotspots_hotspots
 
int32 _currentHotspotItem
 
bool _shouldQuit
 
int32 _scriptStep
 
int32 _mouseX
 
int32 _mouseY
 
int32 _mouseButton
 
int32 _lastMouseButton
 
int32 _oldTimer
 
int32 _oldTimer2
 
int32 _lastRenderTime
 
Movie_moviePlayer
 
Common::RandomSource _rnd
 
FontRenderer_fontRenderer
 
Animation_fontToon
 
Animation_fontEZ
 
Animation_currentFont
 
Common::String_currentDemoFont
 
AudioManager_audioManager
 
Common::MemoryWriteStreamDynamic_saveBufferStream
 
int16 * _conversationData
 
bool _firstFrame
 
bool _isDemo
 
bool _isEnglishDemo
 
bool _showConversationText
 
int _textSpeed
 
bool _useAlternativeFont
 
bool _needPaletteFlush
 
bool _noMusicDriver
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 
int32 _activeEnhancements = kEnhGameBreakingBugFixes
 

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 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 ()
 

Member Function Documentation

◆ run()

Common::Error Toon::ToonEngine::run ( )
overridevirtual

Initialize the engine and start its main loop.

Returns
kNoError on success, otherwise an error code.

Implements Engine.

◆ canSaveGameStateCurrently()

bool Toon::ToonEngine::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.

◆ canLoadGameStateCurrently()

bool Toon::ToonEngine::canLoadGameStateCurrently ( Common::U32String msg = nullptr)
overridevirtual

Indicate whether a game state can be loaded.

Parameters
msgOptional pointer to message explaining why it is disabled

Reimplemented from Engine.

◆ pauseEngineIntern()

void Toon::ToonEngine::pauseEngineIntern ( bool  pause)
overridevirtual

Actual implementation of pauseEngine by subclasses.

See also
Engine::pauseEngine

Reimplemented from Engine.

◆ syncSoundSettings()

void Toon::ToonEngine::syncSoundSettings ( )
overridevirtual

Notify the engine that the sound settings in the config manager might have changed and that it should adjust any internal volume (and other) values accordingly.

The default implementation sets the volume levels of all mixer sound types according to the config entries of the active domain. When overwriting, call the default implementation first, then adjust the volumes further (if required).

Note
When setting volume levels, respect the "mute" config entry.
The volume for the plain sound type is reset to the maximum volume. If the engine can associate its own value for this type, it needs to overwrite this member and set it accordingly.

Reimplemented from Engine.

◆ saveGameState()

Common::Error Toon::ToonEngine::saveGameState ( int  slot,
const Common::String desc,
bool  isAutosave = false 
)
inlineoverridevirtual

Save a game state.

Parameters
slotThe slot into which the save state should be stored.
descDescription for the save state, entered by the user.
isAutosaveExpected to be true if an autosave is being created.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ loadGameState()

Common::Error Toon::ToonEngine::loadGameState ( int  slot)
inlineoverridevirtual

Load a game state.

Parameters
slotThe slot from which a save state should be loaded.
Returns
kNoError on success, otherwise an error code.

Reimplemented from Engine.

◆ hasFeature()

bool Toon::ToonEngine::hasFeature ( EngineFeature  f) const
inlineoverridevirtual

Determine whether the engine supports the specified feature.

Reimplemented from Engine.


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