ScummVM API documentation
Stark::DialogPlayer Class Reference

#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::SpeechacquireReadySpeech ()
 
bool areOptionsAvailable () const
 
Common::Array< DialogPlayer::OptionlistOptions () 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
 

Detailed Description

Dialog player

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

Member Function Documentation

◆ run()

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

Enter a dialog

◆ playSingle()

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

Play a one-shot sentence

◆ isRunning()

bool Stark::DialogPlayer::isRunning ( ) const

Check if a dialog is running

◆ update()

void Stark::DialogPlayer::update ( )

Update the currently running dialog

◆ selectOption()

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

Select a dialog option

◆ isSpeechReady()

bool Stark::DialogPlayer::isSpeechReady ( ) const

Can a speech be played?

◆ acquireReadySpeech()

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

Return the speech to be played

◆ areOptionsAvailable()

bool Stark::DialogPlayer::areOptionsAvailable ( ) const

Does the player need to choose between options?

◆ listOptions()

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

List the currently available dialog options

◆ resume()

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

Resume the dialog after it was interrupted to run a script

◆ reset()

void Stark::DialogPlayer::reset ( )

Clear the currently running dialog

◆ buildOptions()

void Stark::DialogPlayer::buildOptions ( )
protected

Build a list of available dialog options

◆ removeLastOnlyOption()

void Stark::DialogPlayer::removeLastOnlyOption ( )
protected

Removes the last only option from the options list

◆ onReplyEnd()

void Stark::DialogPlayer::onReplyEnd ( )
protected

Initiate the next action after the end of a reply


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