ScummVM API documentation
Ultima::Ultima4::Conversation Class Reference

#include <conversation.h>

Public Types

enum  State {
  INTRO, TALK, ASK, ASKYESNO,
  VENDORQUESTION, BUY_ITEM, SELL_ITEM, BUY_QUANTITY,
  SELL_QUANTITY, BUY_PRICE, CONFIRMATION, CONTINUEQUESTION,
  TOPIC, PLAYER, FULLHEAL, ADVANCELEVELS,
  GIVEBEGGAR, ATTACK, DONE
}
 
enum  InputType { INPUT_STRING, INPUT_CHARACTER, INPUT_NONE }
 

Public Member Functions

InputType getInputRequired (int *bufferLen)
 

Public Attributes

State _state
 
Common::String _playerInput
 
Common::List< Common::String_reply
 
class Script_script
 
Dialogue::Question_question
 
int _quant
 
int _player
 
int _price
 

Static Public Attributes

static const uint BUFFERLEN
 

Detailed Description

The conversation class, which handles the flow of text from the player to the talker and vice-versa. It is responsible for beginning and termination conversations and handing state changes during.

Member Enumeration Documentation

◆ State

Different states the conversation may be in

Enumerator
INTRO 

The initial state of the conversation, before anything is said

TALK 

The "default" state of the conversation

ASK 

The talker is asking the player a question

ASKYESNO 

The talker is asking the player a yes/no question

VENDORQUESTION 

A vendor is asking the player a question

BUY_ITEM 

Asked which item to buy

SELL_ITEM 

Asked which item to sell

BUY_QUANTITY 

Asked how many items to buy

SELL_QUANTITY 

Asked how many items to sell

BUY_PRICE 

Asked how much money to give someone

CONFIRMATION 

Asked by a vendor to confirm something

CONTINUEQUESTION 

Asked whether or not to continue

TOPIC 

Asked a topic to speak about

PLAYER 

Input for which player is required

FULLHEAL 

Heal the entire party before continuing conversation

ADVANCELEVELS 

Check and advance the party's levels before continuing

GIVEBEGGAR 

Asked how much to give a beggar

ATTACK 

The conversation ends with the talker attacking you

DONE 

The conversation is over

◆ InputType

Different types of conversation input required

Member Data Documentation

◆ BUFFERLEN

const uint Ultima::Ultima4::Conversation::BUFFERLEN
static

The default maxixum length of input

◆ _state

State Ultima::Ultima4::Conversation::_state

The state of the conversation

◆ _playerInput

Common::String Ultima::Ultima4::Conversation::_playerInput

A Common::String holding the text the player inputs

◆ _reply

Common::List<Common::String> Ultima::Ultima4::Conversation::_reply

What the talker says

◆ _script

class Script* Ultima::Ultima4::Conversation::_script

A script that this person follows during the conversation (may be nullptr)

◆ _question

Dialogue::Question* Ultima::Ultima4::Conversation::_question

The current question the player is being asked

◆ _quant

int Ultima::Ultima4::Conversation::_quant

For vendor transactions

◆ _player

int Ultima::Ultima4::Conversation::_player

For vendor transactions

◆ _price

int Ultima::Ultima4::Conversation::_price

For vendor transactions


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