#include <dialogplayer.h>
Classes | |
struct | Option |
Public Types | |
enum | OptionType { kOptionTypeAsk = 0 } |
Public Member Functions | |
void | run (Resources::Dialog *dialog) |
void | playSingle (Resources::Speech *speech) |
bool | isRunning () const |
void | update () |
void | selectOption (uint32 index) |
bool | isSpeechReady () const |
bool | isSpeechReady (Resources::Speech *speech) const |
Resources::Speech * | acquireReadySpeech () |
bool | areOptionsAvailable () const |
Common::Array< DialogPlayer::Option > | listOptions () const |
void | resume (Resources::Dialog *dialog) |
void | reset () |
Protected Member Functions | |
void | buildOptions () |
void | removeLastOnlyOption () |
void | onReplyEnd () |
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 |
Dialog player
Handles the state of the currently running dialog, and implements the associated logic.
void Stark::DialogPlayer::run | ( | Resources::Dialog * | dialog | ) |
Enter a dialog
void Stark::DialogPlayer::playSingle | ( | Resources::Speech * | speech | ) |
Play a one-shot sentence
bool Stark::DialogPlayer::isRunning | ( | ) | const |
Check if a dialog is running
void Stark::DialogPlayer::update | ( | ) |
Update the currently running dialog
void Stark::DialogPlayer::selectOption | ( | uint32 | index | ) |
Select a dialog option
bool Stark::DialogPlayer::isSpeechReady | ( | ) | const |
Can a speech be played?
Resources::Speech* Stark::DialogPlayer::acquireReadySpeech | ( | ) |
Return the speech to be played
bool Stark::DialogPlayer::areOptionsAvailable | ( | ) | const |
Does the player need to choose between options?
Common::Array<DialogPlayer::Option> Stark::DialogPlayer::listOptions | ( | ) | const |
List the currently available dialog options
void Stark::DialogPlayer::resume | ( | Resources::Dialog * | dialog | ) |
Resume the dialog after it was interrupted to run a script
void Stark::DialogPlayer::reset | ( | ) |
Clear the currently running dialog
|
protected |
Build a list of available dialog options
|
protected |
Removes the last only option from the options list
|
protected |
Initiate the next action after the end of a reply