ScummVM
Toon::ToonEngine Class Reference

#include <toon.h>

Inheritance diagram for Toon::ToonEngine:
Collaboration diagram for Toon::ToonEngine:

Public Member Functions

 ToonEngine (OSystem *syst, const ADGameDescription *gameDescription)
 
 ~ToonEngine ()
 
Common::Error run ()
 Init the engine and start its main loop. More...
 
GUI::DebuggergetDebugger ()
 Return the engine's debugger instance, if any. More...
 
bool showMainmenu (bool &loadedGame)
 
bool showOptions ()
 
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::String &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::String &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::String 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::String &str, int32 lineId, int32 itemDest)
 
void storePalette ()
 
void restorePalette ()
 
const char * getSpecialConversationMusic (int32 locationId)
 
void playRoomMusic ()
 
void waitForScriptStep ()
 
void doMagnifierEffect ()
 
bool canSaveGameStateCurrently ()
 Indicates whether a game state can be saved. More...
 
bool canLoadGameStateCurrently ()
 Indicates whether a game state can be loaded. More...
 
void pauseEngineIntern (bool pause)
 Actual implementation of pauseEngine by subclasses. More...
 
Resourcesresources ()
 
Statestate ()
 
Graphics::SurfacegetMainSurface ()
 
PicturegetMask ()
 
PicturegetPicture ()
 
AnimationManagergetAnimationManager ()
 
MoviegetMoviePlayer ()
 
SceneAnimationgetSceneAnimation (int32 id)
 
SceneAnimationScriptgetSceneAnimationScript (int32 id)
 
EMCInterpretergetScript ()
 
HotspotsgetHotspots ()
 
CharactergetCharacter (int32 charId)
 
uint8getShadowLUT ()
 
int32 getCurrentLineToSay ()
 
int32 getCurrentCharacterTalking ()
 
CharacterDrewgetDrew ()
 
CharacterFluxgetFlux ()
 
int32 getTickLength ()
 
int32 getOldMilli ()
 
AudioManagergetAudioManager ()
 
int32 getScriptRegionNested ()
 
int32 getMouseX ()
 
int32 getMouseY ()
 
PathFindinggetPathFinding ()
 
Common::WriteStreamgetSaveBufferStream ()
 
bool shouldQuitGame () const
 
Common::Error saveGameState (int slot, const Common::String &desc)
 Save a game state. More...
 
Common::Error loadGameState (int slot)
 Load a game state. More...
 
bool hasFeature (EngineFeature f) const
 Determine whether the engine supports the specified feature. More...
 
void dirtyAllScreen ()
 
void addDirtyRect (int32 left, int32 top, int32 right, int32 bottom)
 
void clearDirtyRects ()
 
- 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 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...
 
void setGameToLoadSlot (int slot)
 Sets the game slot for a savegame to be loaded after global main menu execution. More...
 

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
 
AudioManager_audioManager
 
Common::MemoryWriteStreamDynamic_saveBufferStream
 
int16_conversationData
 
bool _firstFrame
 
bool _isDemo
 
bool _showConversationText
 
bool _useAlternativeFont
 
bool _needPaletteFlush
 
- Protected Attributes inherited from Engine
Common::TimerManager_timer
 
Common::EventManager_eventMan
 
Common::SaveFileManager_saveFileMan
 
GUI::Dialog_mainMenuDialog
 
const Common::String _targetName
 

Private Attributes

ToonConsole_console
 

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 Member Functions inherited from Engine
virtual int runDialog (GUI::Dialog &dialog)
 
bool shouldPerformAutoSave (int lastSaveTime)
 Indicate whether an autosave should be performed. More...
 

Detailed Description

Definition at line 99 of file toon.h.

Constructor & Destructor Documentation

◆ ToonEngine()

Toon::ToonEngine::ToonEngine ( OSystem syst,
const ADGameDescription gameDescription 
)

Definition at line 1155 of file toon.cpp.

◆ ~ToonEngine()

Toon::ToonEngine::~ToonEngine ( )

Definition at line 1308 of file toon.cpp.

Member Function Documentation

◆ addDirtyRect()

void Toon::ToonEngine::addDirtyRect ( int32  left,
int32  top,
int32  right,
int32  bottom 
)

Definition at line 5054 of file toon.cpp.

◆ addItemToInventory()

void Toon::ToonEngine::addItemToInventory ( int32  item)

Definition at line 3095 of file toon.cpp.

◆ canLoadGameStateCurrently()

bool Toon::ToonEngine::canLoadGameStateCurrently ( )
virtual

Indicates whether a game state can be loaded.

Reimplemented from Engine.

Definition at line 3331 of file toon.cpp.

◆ canSaveGameStateCurrently()

bool Toon::ToonEngine::canSaveGameStateCurrently ( )
virtual

Indicates whether a game state can be saved.

Reimplemented from Engine.

Definition at line 3327 of file toon.cpp.

◆ characterTalk()

int32 Toon::ToonEngine::characterTalk ( int32  dialogid,
bool  blocking = true 
)

Definition at line 2384 of file toon.cpp.

◆ clearDirtyRects()

void Toon::ToonEngine::clearDirtyRects ( )

Definition at line 5084 of file toon.cpp.

◆ clickEvent()

void Toon::ToonEngine::clickEvent ( )

Definition at line 1803 of file toon.cpp.

◆ copyToVirtualScreen()

void Toon::ToonEngine::copyToVirtualScreen ( bool  updateScreen = true)

Definition at line 491 of file toon.cpp.

◆ createMouseItem()

void Toon::ToonEngine::createMouseItem ( int32  item)

Definition at line 3125 of file toon.cpp.

◆ createRoomFilename()

Common::String Toon::ToonEngine::createRoomFilename ( const Common::String name)

Definition at line 4870 of file toon.cpp.

◆ createShadowLUT()

void Toon::ToonEngine::createShadowLUT ( )

Definition at line 4875 of file toon.cpp.

◆ deleteItemFromInventory()

void Toon::ToonEngine::deleteItemFromInventory ( int32  item)

Definition at line 4841 of file toon.cpp.

◆ deleteMouseItem()

void Toon::ToonEngine::deleteMouseItem ( )

Definition at line 3130 of file toon.cpp.

◆ dirtyAllScreen()

void Toon::ToonEngine::dirtyAllScreen ( )

Definition at line 5048 of file toon.cpp.

◆ disableTimer()

void Toon::ToonEngine::disableTimer ( int32  timerId)

Definition at line 274 of file toon.cpp.

◆ doFrame()

void Toon::ToonEngine::doFrame ( )

Definition at line 549 of file toon.cpp.

◆ doMagnifierEffect()

void Toon::ToonEngine::doMagnifierEffect ( )

Definition at line 442 of file toon.cpp.

◆ drawConversationIcons()

void Toon::ToonEngine::drawConversationIcons ( )

Definition at line 2594 of file toon.cpp.

◆ drawConversationLine()

void Toon::ToonEngine::drawConversationLine ( )

Definition at line 3289 of file toon.cpp.

◆ drawInfoLine()

void Toon::ToonEngine::drawInfoLine ( )

Definition at line 2209 of file toon.cpp.

◆ drawPalette()

void Toon::ToonEngine::drawPalette ( )

Definition at line 3171 of file toon.cpp.

◆ drawSack()

void Toon::ToonEngine::drawSack ( )

Definition at line 3089 of file toon.cpp.

◆ enableTimer()

void Toon::ToonEngine::enableTimer ( int32  timerId)

Definition at line 267 of file toon.cpp.

◆ exitScene()

void Toon::ToonEngine::exitScene ( )

Definition at line 2073 of file toon.cpp.

◆ fadeIn()

void Toon::ToonEngine::fadeIn ( int32  numFrames)

Definition at line 2156 of file toon.cpp.

◆ fadeOut()

void Toon::ToonEngine::fadeOut ( int32  numFrames)

Definition at line 2171 of file toon.cpp.

◆ fixPaletteEntries()

void Toon::ToonEngine::fixPaletteEntries ( uint8 palette,
int  num 
)

Definition at line 1413 of file toon.cpp.

◆ flipScreens()

void Toon::ToonEngine::flipScreens ( )

Definition at line 2140 of file toon.cpp.

◆ flushPalette()

void Toon::ToonEngine::flushPalette ( bool  deferFlushToNextRender = true)

Definition at line 1381 of file toon.cpp.

◆ getAnimationManager()

AnimationManager* Toon::ToonEngine::getAnimationManager ( )
inline

Definition at line 239 of file toon.h.

◆ getAudioManager()

AudioManager* Toon::ToonEngine::getAudioManager ( )
inline

Definition at line 295 of file toon.h.

◆ getCharacter()

Character* Toon::ToonEngine::getCharacter ( int32  charId)
inline

Definition at line 263 of file toon.h.

◆ getCharacterById()

Character * Toon::ToonEngine::getCharacterById ( int32  charId)

Definition at line 3281 of file toon.cpp.

◆ getConversationFlag()

int32 Toon::ToonEngine::getConversationFlag ( int32  locationId,
int32  param 
)

Definition at line 2711 of file toon.cpp.

◆ getCurrentCharacterTalking()

int32 Toon::ToonEngine::getCurrentCharacterTalking ( )
inline

Definition at line 275 of file toon.h.

◆ getCurrentLineToSay()

int32 Toon::ToonEngine::getCurrentLineToSay ( )
inline

Definition at line 271 of file toon.h.

◆ getCurrentUpdatingSceneAnimation()

int32 Toon::ToonEngine::getCurrentUpdatingSceneAnimation ( )

Definition at line 1765 of file toon.cpp.

◆ getDebugger()

GUI::Debugger* Toon::ToonEngine::getDebugger ( )
inlinevirtual

Return the engine's debugger instance, if any.

Used by error() to invoke the debugger when a severe error is reported.

Reimplemented from Engine.

Definition at line 113 of file toon.h.

◆ getDrew()

CharacterDrew* Toon::ToonEngine::getDrew ( )
inline

Definition at line 279 of file toon.h.

◆ getFlux()

CharacterFlux* Toon::ToonEngine::getFlux ( )
inline

Definition at line 283 of file toon.h.

◆ getHotspots()

Hotspots* Toon::ToonEngine::getHotspots ( )
inline

Definition at line 259 of file toon.h.

◆ getLayerAtPoint()

int32 Toon::ToonEngine::getLayerAtPoint ( int32  x,
int32  y 
)

Definition at line 2253 of file toon.cpp.

◆ getLocationString()

const char * Toon::ToonEngine::getLocationString ( int32  locationId,
bool  alreadyVisited 
)

Definition at line 2234 of file toon.cpp.

◆ getMainSurface()

Graphics::Surface& Toon::ToonEngine::getMainSurface ( )
inline

Definition at line 227 of file toon.h.

◆ getMask()

Picture* Toon::ToonEngine::getMask ( )
inline

Definition at line 231 of file toon.h.

◆ getMouseEvent()

void Toon::ToonEngine::getMouseEvent ( )

Definition at line 3077 of file toon.cpp.

◆ getMouseX()

int32 Toon::ToonEngine::getMouseX ( )
inline

Definition at line 303 of file toon.h.

◆ getMouseY()

int32 Toon::ToonEngine::getMouseY ( )
inline

Definition at line 307 of file toon.h.

◆ getMoviePlayer()

Movie* Toon::ToonEngine::getMoviePlayer ( )
inline

Definition at line 243 of file toon.h.

◆ getOldMilli()

int32 Toon::ToonEngine::getOldMilli ( )
inline

Definition at line 291 of file toon.h.

◆ getPathFinding()

PathFinding* Toon::ToonEngine::getPathFinding ( )
inline

Definition at line 311 of file toon.h.

◆ getPicture()

Picture* Toon::ToonEngine::getPicture ( )
inline

Definition at line 235 of file toon.h.

◆ getSaveBufferStream()

Common::WriteStream * Toon::ToonEngine::getSaveBufferStream ( )

Definition at line 2230 of file toon.cpp.

◆ getSavegameName()

Common::String Toon::ToonEngine::getSavegameName ( int  nr)

Definition at line 3335 of file toon.cpp.

◆ getScaleAtPoint()

int32 Toon::ToonEngine::getScaleAtPoint ( int32  x,
int32  y 
)

Definition at line 2241 of file toon.cpp.

◆ getSceneAnimation()

SceneAnimation* Toon::ToonEngine::getSceneAnimation ( int32  id)
inline

Definition at line 247 of file toon.h.

◆ getSceneAnimationScript()

SceneAnimationScript* Toon::ToonEngine::getSceneAnimationScript ( int32  id)
inline

Definition at line 251 of file toon.h.

◆ getScript()

EMCInterpreter* Toon::ToonEngine::getScript ( )
inline

Definition at line 255 of file toon.h.

◆ getScriptRegionNested()

int32 Toon::ToonEngine::getScriptRegionNested ( )
inline

Definition at line 299 of file toon.h.

◆ getShadowLUT()

uint8* Toon::ToonEngine::getShadowLUT ( )
inline

Definition at line 267 of file toon.h.

◆ getSpecialConversationMusic()

const char * Toon::ToonEngine::getSpecialConversationMusic ( int32  locationId)

Definition at line 3697 of file toon.cpp.

◆ getSpecialInventoryItem()

int32 Toon::ToonEngine::getSpecialInventoryItem ( int32  item)

Definition at line 3608 of file toon.cpp.

◆ getTextPosition()

void Toon::ToonEngine::getTextPosition ( int32  characterId,
int32 retX,
int32 retY 
)

Definition at line 3217 of file toon.cpp.

◆ getTickLength()

int32 Toon::ToonEngine::getTickLength ( )
inline

Definition at line 287 of file toon.h.

◆ getZAtPoint()

int32 Toon::ToonEngine::getZAtPoint ( int32  x,
int32  y 
)

Definition at line 2265 of file toon.cpp.

◆ handleInventoryOnDrew()

int32 Toon::ToonEngine::handleInventoryOnDrew ( int32  itemId)

Definition at line 4644 of file toon.cpp.

◆ handleInventoryOnFlux()

int32 Toon::ToonEngine::handleInventoryOnFlux ( int32  itemId)

Definition at line 3664 of file toon.cpp.

◆ handleInventoryOnInventory()

int32 Toon::ToonEngine::handleInventoryOnInventory ( int32  itemDest,
int32  itemSrc 
)

Definition at line 3832 of file toon.cpp.

◆ hasFeature()

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

Determine whether the engine supports the specified feature.

Reimplemented from Engine.

Definition at line 329 of file toon.h.

◆ haveAConversation()

void Toon::ToonEngine::haveAConversation ( int32  convId)

Definition at line 2502 of file toon.cpp.

◆ hideCutaway()

void Toon::ToonEngine::hideCutaway ( )

Definition at line 3152 of file toon.cpp.

◆ init()

void Toon::ToonEngine::init ( void  )

Definition at line 50 of file toon.cpp.

◆ initChapter()

void Toon::ToonEngine::initChapter ( )

Definition at line 1698 of file toon.cpp.

◆ initCharacter()

void Toon::ToonEngine::initCharacter ( int32  characterId,
int32  animScriptId,
int32  animToPlayId,
int32  sceneAnimationId 
)

Definition at line 3634 of file toon.cpp.

◆ initFonts()

void Toon::ToonEngine::initFonts ( )

Definition at line 2189 of file toon.cpp.

◆ isUpdatingSceneAnimation()

bool Toon::ToonEngine::isUpdatingSceneAnimation ( )

Definition at line 1761 of file toon.cpp.

◆ loadAdditionalPalette()

void Toon::ToonEngine::loadAdditionalPalette ( const Common::String fileName,
int32  mode 
)

Definition at line 1664 of file toon.cpp.

◆ loadCursor()

void Toon::ToonEngine::loadCursor ( )

Definition at line 1719 of file toon.cpp.

◆ loadGame()

bool Toon::ToonEngine::loadGame ( int32  slot)

Definition at line 3434 of file toon.cpp.

◆ loadGameState()

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

Load a game state.

Parameters
slotthe slot from which a savestate should be loaded
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 325 of file toon.h.

◆ loadScene()

void Toon::ToonEngine::loadScene ( int32  SceneId,
bool  forGameLoad = false 
)

Definition at line 1464 of file toon.cpp.

◆ loadTextsVariants()

char ** Toon::ToonEngine::loadTextsVariants ( Common::File in)

Definition at line 4984 of file toon.cpp.

◆ loadToonDat()

bool Toon::ToonEngine::loadToonDat ( )

Definition at line 4929 of file toon.cpp.

◆ makeLineNonWalkable()

void Toon::ToonEngine::makeLineNonWalkable ( int32  x,
int32  y,
int32  x2,
int32  y2 
)

Definition at line 5028 of file toon.cpp.

◆ makeLineWalkable()

void Toon::ToonEngine::makeLineWalkable ( int32  x,
int32  y,
int32  x2,
int32  y2 
)

Definition at line 5032 of file toon.cpp.

◆ newGame()

void Toon::ToonEngine::newGame ( )

Definition at line 3191 of file toon.cpp.

◆ parseInput()

void Toon::ToonEngine::parseInput ( )

Definition at line 176 of file toon.cpp.

◆ pauseEngineIntern()

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

Actual implementation of pauseEngine by subclasses.

See there for details.

Reimplemented from Engine.

Definition at line 3297 of file toon.cpp.

◆ pauseSceneAnimationScript()

int32 Toon::ToonEngine::pauseSceneAnimationScript ( int32  animScriptId,
int32  tickToWait 
)

Definition at line 4860 of file toon.cpp.

◆ playRoomMusic()

void Toon::ToonEngine::playRoomMusic ( )

Definition at line 5036 of file toon.cpp.

◆ playSFX()

void Toon::ToonEngine::playSFX ( int32  id,
int32  volume 
)

Definition at line 3206 of file toon.cpp.

◆ playSoundWrong()

void Toon::ToonEngine::playSoundWrong ( )

Definition at line 3213 of file toon.cpp.

◆ playTalkAnimOnCharacter()

void Toon::ToonEngine::playTalkAnimOnCharacter ( int32  animID,
int32  characterId,
bool  talker 
)

Definition at line 2360 of file toon.cpp.

◆ prepareConversations()

void Toon::ToonEngine::prepareConversations ( )

Definition at line 2607 of file toon.cpp.

◆ processConversationClick()

void Toon::ToonEngine::processConversationClick ( Conversation conv,
int32  status 
)

Definition at line 2648 of file toon.cpp.

◆ randRange()

int32 Toon::ToonEngine::randRange ( int32  minStart,
int32  maxStart 
)

Definition at line 1769 of file toon.cpp.

◆ rearrangeInventory()

void Toon::ToonEngine::rearrangeInventory ( )

Definition at line 3179 of file toon.cpp.

◆ render()

void Toon::ToonEngine::render ( )

Definition at line 379 of file toon.cpp.

◆ renderInventory()

void Toon::ToonEngine::renderInventory ( )

Definition at line 2914 of file toon.cpp.

◆ replaceItemFromInventory()

void Toon::ToonEngine::replaceItemFromInventory ( int32  item,
int32  destItem 
)

Definition at line 4851 of file toon.cpp.

◆ resources()

Resources* Toon::ToonEngine::resources ( )
inline

Definition at line 219 of file toon.h.

◆ restorePalette()

void Toon::ToonEngine::restorePalette ( )

Definition at line 3692 of file toon.cpp.

◆ restoreRifFlags()

void Toon::ToonEngine::restoreRifFlags ( int32  location)

Definition at line 2283 of file toon.cpp.

◆ run()

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

Init the engine and start its main loop.

Returns
returns kNoError on success, else an error code.

Implements Engine.

Definition at line 1118 of file toon.cpp.

◆ runConversationCommand()

int32 Toon::ToonEngine::runConversationCommand ( int16 **  command)

Definition at line 2862 of file toon.cpp.

◆ runEventScript()

int32 Toon::ToonEngine::runEventScript ( int32  x,
int32  y,
int32  mode,
int32  id,
int32  scriptId 
)

Definition at line 1773 of file toon.cpp.

◆ saveGame()

bool Toon::ToonEngine::saveGame ( int32  slot,
const Common::String saveGameDesc 
)

Definition at line 3339 of file toon.cpp.

◆ saveGameState()

Common::Error Toon::ToonEngine::saveGameState ( int  slot,
const Common::String desc 
)
inlinevirtual

Save a game state.

Parameters
slotthe slot into which the savestate should be stored
desca description for the savestate, entered by the user
Returns
returns kNoError on success, else an error code.

Reimplemented from Engine.

Definition at line 321 of file toon.h.

◆ sayLines()

void Toon::ToonEngine::sayLines ( int  numLines,
int  dialogId 
)

Definition at line 2303 of file toon.cpp.

◆ selectHotspot()

void Toon::ToonEngine::selectHotspot ( )

Definition at line 1968 of file toon.cpp.

◆ setCursor()

void Toon::ToonEngine::setCursor ( int32  type,
bool  inventory = false,
int32  offsetX = 0,
int  offsetY = 0 
)

Definition at line 1734 of file toon.cpp.

◆ setFont()

void Toon::ToonEngine::setFont ( bool  alternative)

Definition at line 2200 of file toon.cpp.

◆ setPaletteEntries()

void Toon::ToonEngine::setPaletteEntries ( uint8 palette,
int32  offset,
int32  num 
)

Definition at line 1390 of file toon.cpp.

◆ setSceneAnimationScriptUpdate()

void Toon::ToonEngine::setSceneAnimationScriptUpdate ( bool  enable)

Definition at line 1757 of file toon.cpp.

◆ setTimer()

void Toon::ToonEngine::setTimer ( int32  timerId,
int32  timerWait 
)

Definition at line 270 of file toon.cpp.

◆ setupGeneralPalette()

void Toon::ToonEngine::setupGeneralPalette ( )

Definition at line 1655 of file toon.cpp.

◆ shouldQuitGame()

bool Toon::ToonEngine::shouldQuitGame ( ) const
inline

Definition at line 317 of file toon.h.

◆ showCutaway()

void Toon::ToonEngine::showCutaway ( const Common::String cutawayPicture)

Definition at line 3136 of file toon.cpp.

◆ showInventory()

int32 Toon::ToonEngine::showInventory ( )

Definition at line 2950 of file toon.cpp.

◆ showMainmenu()

bool Toon::ToonEngine::showMainmenu ( bool &  loadedGame)

Definition at line 947 of file toon.cpp.

◆ showOptions()

bool Toon::ToonEngine::showOptions ( )

Definition at line 670 of file toon.cpp.

◆ simpleCharacterTalk()

int32 Toon::ToonEngine::simpleCharacterTalk ( int32  dialogid)

Definition at line 2341 of file toon.cpp.

◆ simpleUpdate()

void Toon::ToonEngine::simpleUpdate ( bool  waitCharacterToTalk = false)

Definition at line 1395 of file toon.cpp.

◆ state()

State* Toon::ToonEngine::state ( )
inline

Definition at line 223 of file toon.h.

◆ storePalette()

void Toon::ToonEngine::storePalette ( )

Definition at line 3688 of file toon.cpp.

◆ storeRifFlags()

void Toon::ToonEngine::storeRifFlags ( int32  location)

Definition at line 2271 of file toon.cpp.

◆ unloadTextsVariants()

void Toon::ToonEngine::unloadTextsVariants ( char **  texts)

Definition at line 5020 of file toon.cpp.

◆ unloadToonDat()

void Toon::ToonEngine::unloadToonDat ( )

Definition at line 4978 of file toon.cpp.

◆ update()

void Toon::ToonEngine::update ( int32  timeIncrement)

Definition at line 350 of file toon.cpp.

◆ updateAnimationSceneScripts()

void Toon::ToonEngine::updateAnimationSceneScripts ( int32  timeElapsed)

Definition at line 1425 of file toon.cpp.

◆ updateCharacters()

void Toon::ToonEngine::updateCharacters ( int32  timeElapsed)

Definition at line 3163 of file toon.cpp.

◆ updateScrolling()

void Toon::ToonEngine::updateScrolling ( bool  force,
int32  timeIncrement 
)

Definition at line 309 of file toon.cpp.

◆ updateTimer()

void Toon::ToonEngine::updateTimer ( int32  timeIncrement)

Definition at line 370 of file toon.cpp.

◆ updateTimers()

void Toon::ToonEngine::updateTimers ( )

Definition at line 277 of file toon.cpp.

◆ viewInventoryItem()

void Toon::ToonEngine::viewInventoryItem ( const Common::String str,
int32  lineId,
int32  itemDest 
)

Definition at line 3769 of file toon.cpp.

◆ waitForScriptStep()

void Toon::ToonEngine::waitForScriptStep ( )

Definition at line 167 of file toon.cpp.

◆ waitTicks()

int32 Toon::ToonEngine::waitTicks ( int32  numTicks,
bool  breakOnMouseClick 
)

Definition at line 2899 of file toon.cpp.

Member Data Documentation

◆ _additionalPalette1

uint8* Toon::ToonEngine::_additionalPalette1
protected

Definition at line 348 of file toon.h.

◆ _additionalPalette2

uint8* Toon::ToonEngine::_additionalPalette2
protected

Definition at line 349 of file toon.h.

◆ _additionalPalette2Present

bool Toon::ToonEngine::_additionalPalette2Present
protected

Definition at line 350 of file toon.h.

◆ _animationManager

AnimationManager* Toon::ToonEngine::_animationManager
protected

Definition at line 399 of file toon.h.

◆ _animationSceneScriptRunFlag

bool Toon::ToonEngine::_animationSceneScriptRunFlag
protected

Definition at line 373 of file toon.h.

◆ _audioManager

AudioManager* Toon::ToonEngine::_audioManager
protected

Definition at line 429 of file toon.h.

◆ _backupPalette

uint8* Toon::ToonEngine::_backupPalette
protected

Definition at line 347 of file toon.h.

◆ _characters

Character* Toon::ToonEngine::_characters[32]
protected

Definition at line 401 of file toon.h.

◆ _console

ToonConsole* Toon::ToonEngine::_console
private

Definition at line 441 of file toon.h.

◆ _conversationData

int16* Toon::ToonEngine::_conversationData
protected

Definition at line 433 of file toon.h.

◆ _currentCutaway

Picture* Toon::ToonEngine::_currentCutaway
protected

Definition at line 359 of file toon.h.

◆ _currentFont

Animation* Toon::ToonEngine::_currentFont
protected

Definition at line 427 of file toon.h.

◆ _currentHotspotItem

int32 Toon::ToonEngine::_currentHotspotItem
protected

Definition at line 406 of file toon.h.

◆ _currentMask

Picture* Toon::ToonEngine::_currentMask
protected

Definition at line 358 of file toon.h.

◆ _currentPicture

Picture* Toon::ToonEngine::_currentPicture
protected

Definition at line 357 of file toon.h.

◆ _currentScriptRegion

int32 Toon::ToonEngine::_currentScriptRegion
protected

Definition at line 366 of file toon.h.

◆ _currentTextLine

char* Toon::ToonEngine::_currentTextLine
protected

Definition at line 391 of file toon.h.

◆ _currentTextLineCharacterId

int32 Toon::ToonEngine::_currentTextLineCharacterId
protected

Definition at line 395 of file toon.h.

◆ _currentTextLineId

int32 Toon::ToonEngine::_currentTextLineId
protected

Definition at line 392 of file toon.h.

◆ _currentTextLineX

int32 Toon::ToonEngine::_currentTextLineX
protected

Definition at line 393 of file toon.h.

◆ _currentTextLineY

int32 Toon::ToonEngine::_currentTextLineY
protected

Definition at line 394 of file toon.h.

◆ _cursorAnimation

Animation* Toon::ToonEngine::_cursorAnimation
protected

Definition at line 384 of file toon.h.

◆ _cursorAnimationInstance

AnimationInstance* Toon::ToonEngine::_cursorAnimationInstance
protected

Definition at line 383 of file toon.h.

◆ _cursorOffsetX

int32 Toon::ToonEngine::_cursorOffsetX
protected

Definition at line 388 of file toon.h.

◆ _cursorOffsetY

int32 Toon::ToonEngine::_cursorOffsetY
protected

Definition at line 389 of file toon.h.

◆ _cutawayPalette

uint8* Toon::ToonEngine::_cutawayPalette
protected

Definition at line 351 of file toon.h.

◆ _dialogIcons

Animation* Toon::ToonEngine::_dialogIcons
protected

Definition at line 385 of file toon.h.

◆ _dirtyAll

bool Toon::ToonEngine::_dirtyAll
protected

Definition at line 380 of file toon.h.

◆ _dirtyRects

Common::Array<Common::Rect> Toon::ToonEngine::_dirtyRects
protected

Definition at line 377 of file toon.h.

◆ _drew

Character* Toon::ToonEngine::_drew
protected

Definition at line 402 of file toon.h.

◆ _finalPalette

uint8* Toon::ToonEngine::_finalPalette
protected

Definition at line 346 of file toon.h.

◆ _firstFrame

bool Toon::ToonEngine::_firstFrame
protected

Definition at line 435 of file toon.h.

◆ _flux

Character* Toon::ToonEngine::_flux
protected

Definition at line 403 of file toon.h.

◆ _fluxPalette

uint8* Toon::ToonEngine::_fluxPalette
protected

Definition at line 353 of file toon.h.

◆ _fontEZ

Animation* Toon::ToonEngine::_fontEZ
protected

Definition at line 426 of file toon.h.

◆ _fontRenderer

FontRenderer* Toon::ToonEngine::_fontRenderer
protected

Definition at line 424 of file toon.h.

◆ _fontToon

Animation* Toon::ToonEngine::_fontToon
protected

Definition at line 425 of file toon.h.

◆ _gameDescription

const ADGameDescription* Toon::ToonEngine::_gameDescription

Definition at line 104 of file toon.h.

◆ _gameState

State* Toon::ToonEngine::_gameState
protected

Definition at line 345 of file toon.h.

◆ _gameVariant

byte Toon::ToonEngine::_gameVariant

Definition at line 107 of file toon.h.

◆ _genericTexts

TextResource* Toon::ToonEngine::_genericTexts
protected

Definition at line 343 of file toon.h.

◆ _hotspots

Hotspots* Toon::ToonEngine::_hotspots
protected

Definition at line 405 of file toon.h.

◆ _inventoryIcons

Animation* Toon::ToonEngine::_inventoryIcons
protected

Definition at line 386 of file toon.h.

◆ _inventoryIconSlots

Animation* Toon::ToonEngine::_inventoryIconSlots
protected

Definition at line 387 of file toon.h.

◆ _inventoryPicture

Picture* Toon::ToonEngine::_inventoryPicture
protected

Definition at line 360 of file toon.h.

◆ _isDemo

bool Toon::ToonEngine::_isDemo
protected

Definition at line 436 of file toon.h.

◆ _language

Common::Language Toon::ToonEngine::_language

Definition at line 105 of file toon.h.

◆ _lastMouseButton

int32 Toon::ToonEngine::_lastMouseButton
protected

Definition at line 414 of file toon.h.

◆ _lastProcessedSceneScript

int32 Toon::ToonEngine::_lastProcessedSceneScript
protected

Definition at line 372 of file toon.h.

◆ _lastRenderTime

int32 Toon::ToonEngine::_lastRenderTime
protected

Definition at line 418 of file toon.h.

◆ _locationDirNotVisited

char** Toon::ToonEngine::_locationDirNotVisited

Definition at line 108 of file toon.h.

◆ _locationDirVisited

char** Toon::ToonEngine::_locationDirVisited

Definition at line 109 of file toon.h.

◆ _mainSurface

Graphics::Surface* Toon::ToonEngine::_mainSurface
protected

Definition at line 376 of file toon.h.

◆ _mouseButton

int32 Toon::ToonEngine::_mouseButton
protected

Definition at line 413 of file toon.h.

◆ _mouseX

int32 Toon::ToonEngine::_mouseX
protected

Definition at line 411 of file toon.h.

◆ _mouseY

int32 Toon::ToonEngine::_mouseY
protected

Definition at line 412 of file toon.h.

◆ _moviePlayer

Movie* Toon::ToonEngine::_moviePlayer
protected

Definition at line 420 of file toon.h.

◆ _needPaletteFlush

bool Toon::ToonEngine::_needPaletteFlush
protected

Definition at line 439 of file toon.h.

◆ _numVariant

byte Toon::ToonEngine::_numVariant

Definition at line 106 of file toon.h.

◆ _oldDirtyRects

Common::Array<Common::Rect> Toon::ToonEngine::_oldDirtyRects
protected

Definition at line 378 of file toon.h.

◆ _oldScrollValue

int32 Toon::ToonEngine::_oldScrollValue
protected

Definition at line 397 of file toon.h.

◆ _oldTimer

int32 Toon::ToonEngine::_oldTimer
protected

Definition at line 416 of file toon.h.

◆ _oldTimer2

int32 Toon::ToonEngine::_oldTimer2
protected

Definition at line 417 of file toon.h.

◆ _pathFinding

PathFinding* Toon::ToonEngine::_pathFinding
protected

Definition at line 361 of file toon.h.

◆ _resources

Resources* Toon::ToonEngine::_resources
protected

Definition at line 342 of file toon.h.

◆ _rnd

Common::RandomSource Toon::ToonEngine::_rnd
protected

Definition at line 422 of file toon.h.

◆ _roomScaleData

uint8* Toon::ToonEngine::_roomScaleData
protected

Definition at line 354 of file toon.h.

◆ _roomTexts

TextResource* Toon::ToonEngine::_roomTexts
protected

Definition at line 344 of file toon.h.

◆ _saveBufferStream

Common::MemoryWriteStreamDynamic* Toon::ToonEngine::_saveBufferStream
protected

Definition at line 431 of file toon.h.

◆ _sceneAnimations

SceneAnimation Toon::ToonEngine::_sceneAnimations[64]
protected

Definition at line 370 of file toon.h.

◆ _sceneAnimationScripts

SceneAnimationScript Toon::ToonEngine::_sceneAnimationScripts[64]
protected

Definition at line 371 of file toon.h.

◆ _script

EMCInterpreter* Toon::ToonEngine::_script
protected

Definition at line 363 of file toon.h.

◆ _script_func

ScriptFunc* Toon::ToonEngine::_script_func
protected

Definition at line 368 of file toon.h.

◆ _scriptData

EMCData Toon::ToonEngine::_scriptData
protected

Definition at line 364 of file toon.h.

◆ _scriptState

EMCState Toon::ToonEngine::_scriptState[4]
protected

Definition at line 365 of file toon.h.

◆ _scriptStep

int32 Toon::ToonEngine::_scriptStep
protected

Definition at line 409 of file toon.h.

◆ _shadowLUT

uint8* Toon::ToonEngine::_shadowLUT
protected

Definition at line 355 of file toon.h.

◆ _shouldQuit

bool Toon::ToonEngine::_shouldQuit
protected

Definition at line 408 of file toon.h.

◆ _showConversationText

bool Toon::ToonEngine::_showConversationText
protected

Definition at line 437 of file toon.h.

◆ _specialInfoLine

char** Toon::ToonEngine::_specialInfoLine

Definition at line 110 of file toon.h.

◆ _tickLength

int32 Toon::ToonEngine::_tickLength
protected

Definition at line 341 of file toon.h.

◆ _universalPalette

uint8* Toon::ToonEngine::_universalPalette
protected

Definition at line 352 of file toon.h.

◆ _updatingSceneScriptRunFlag

bool Toon::ToonEngine::_updatingSceneScriptRunFlag
protected

Definition at line 374 of file toon.h.

◆ _useAlternativeFont

bool Toon::ToonEngine::_useAlternativeFont
protected

Definition at line 438 of file toon.h.


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