ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Dialog player. More...

#include <dialogplayer.h>

Collaboration diagram for Stark::DialogPlayer:

List of all members.

Classes

struct  Option

Public Types

enum  OptionType { kOptionTypeAsk = 0 }

Public Member Functions

 DialogPlayer ()
virtual ~DialogPlayer ()
void run (Resources::Dialog *dialog)
 Enter a dialog.
void playSingle (Resources::Speech *speech)
 Play a one-shot sentence.
bool isRunning () const
 Check if a dialog is running.
void update ()
 Update the currently running dialog.
void selectOption (uint32 index)
 Select a dialog option.
bool isSpeechReady () const
 Can a speech be played?
bool isSpeechReady (Resources::Speech *speech) const
Resources::SpeechacquireReadySpeech ()
 Return the speech to be played.
bool areOptionsAvailable () const
 Does the player need to choose between options?
Common::Array
< DialogPlayer::Option
listOptions () const
 List the currently available dialog options.
void resume (Resources::Dialog *dialog)
 Resume the dialog after it was interrupted to run a script.
void reset ()
 Clear the currently running dialog.

Protected Member Functions

void buildOptions ()
 Build a list of available dialog options.
void removeLastOnlyOption ()
 Removes the last only option from the options list.
void onReplyEnd ()
 Initiate the next action after the end of a reply.
void saveToInterruptionSlot ()
void restoreFromInterruptionSlot ()

Protected Attributes

Resources::Dialog_currentDialog
Resources::Dialog::Reply_currentReply
Resources::Dialog_interruptedDialog
Resources::Dialog::Reply_interruptedReply
Resources::Speech_singleSpeech
bool _speechReady
bool _optionsAvailable
Common::Array< Option_options

Detailed Description

Dialog player.

Handles the state of the currently running dialog, and implements the associated logic.

Definition at line 42 of file dialogplayer.h.


Member Enumeration Documentation

Enumerator:
kOptionTypeAsk 

Definition at line 47 of file dialogplayer.h.


Constructor & Destructor Documentation

Stark::DialogPlayer::DialogPlayer (  ) 

Definition at line 34 of file dialogplayer.cpp.

Stark::DialogPlayer::~DialogPlayer (  )  [virtual]

Definition at line 44 of file dialogplayer.cpp.


Member Function Documentation

Resources::Speech * Stark::DialogPlayer::acquireReadySpeech (  ) 

Return the speech to be played.

Definition at line 82 of file dialogplayer.cpp.

bool Stark::DialogPlayer::areOptionsAvailable (  )  const

Does the player need to choose between options?

Definition at line 93 of file dialogplayer.cpp.

void Stark::DialogPlayer::buildOptions (  )  [protected]

Build a list of available dialog options.

Definition at line 118 of file dialogplayer.cpp.

bool Stark::DialogPlayer::isRunning (  )  const

Check if a dialog is running.

Definition at line 70 of file dialogplayer.cpp.

bool Stark::DialogPlayer::isSpeechReady (  )  const

Can a speech be played?

Definition at line 74 of file dialogplayer.cpp.

bool Stark::DialogPlayer::isSpeechReady ( Resources::Speech speech  )  const

Definition at line 78 of file dialogplayer.cpp.

Common::Array< DialogPlayer::Option > Stark::DialogPlayer::listOptions (  )  const

List the currently available dialog options.

Definition at line 97 of file dialogplayer.cpp.

void Stark::DialogPlayer::onReplyEnd (  )  [protected]

Initiate the next action after the end of a reply.

Definition at line 176 of file dialogplayer.cpp.

void Stark::DialogPlayer::playSingle ( Resources::Speech speech  ) 

Play a one-shot sentence.

Definition at line 63 of file dialogplayer.cpp.

void Stark::DialogPlayer::removeLastOnlyOption (  )  [protected]

Removes the last only option from the options list.

Definition at line 101 of file dialogplayer.cpp.

void Stark::DialogPlayer::reset (  ) 

Clear the currently running dialog.

Definition at line 197 of file dialogplayer.cpp.

void Stark::DialogPlayer::restoreFromInterruptionSlot (  )  [protected]

Definition at line 258 of file dialogplayer.cpp.

void Stark::DialogPlayer::resume ( Resources::Dialog dialog  ) 

Resume the dialog after it was interrupted to run a script.

Definition at line 237 of file dialogplayer.cpp.

void Stark::DialogPlayer::run ( Resources::Dialog dialog  ) 

Enter a dialog.

Definition at line 46 of file dialogplayer.cpp.

void Stark::DialogPlayer::saveToInterruptionSlot (  )  [protected]

Definition at line 253 of file dialogplayer.cpp.

void Stark::DialogPlayer::selectOption ( uint32  index  ) 

Select a dialog option.

Definition at line 147 of file dialogplayer.cpp.

void Stark::DialogPlayer::update (  ) 

Update the currently running dialog.

Definition at line 210 of file dialogplayer.cpp.


Member Data Documentation

Definition at line 105 of file dialogplayer.h.

Definition at line 115 of file dialogplayer.h.

Definition at line 114 of file dialogplayer.h.

Definition at line 111 of file dialogplayer.h.

Definition at line 113 of file dialogplayer.h.


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


Generated on Sat Jan 12 2019 05:05:01 for ResidualVM by doxygen 1.7.1
curved edge   curved edge