ScummVM API documentation
Sherlock::Scalpel::ScalpelTalk Class Reference
Inheritance diagram for Sherlock::Scalpel::ScalpelTalk:
Sherlock::Talk

Public Member Functions

 ScalpelTalk (SherlockEngine *vm)
 
void loadTalkFile (const Common::String &filename) override
 
void talkTo (const Common::String &filename) override
 
int waitForMore (int delay) override
 
void drawInterface () override
 
bool displayTalk (bool slamIt) override
 
int talkLine (int lineNum, int stateNum, byte color, int lineY, bool slamIt) override
 
bool talk3DOMovieTrigger (int subIndex)
 
void pushSequenceEntry (Object *obj) override
 
void pullSequence (int slot=-1) override
 
bool isSequencesEmpty () const override
 
void clearSequences () override
 
- Public Member Functions inherited from Sherlock::Talk
Statementoperator[] (int idx)
 
void doScript (const Common::String &script)
 
void initTalk (int objNum)
 
void freeTalkVars ()
 
void pushSequence (int speaker)
 
void popStack ()
 
void synchronize (Serializer &s)
 

Static Public Member Functions

static void skipBadText (const byte *&msgP)
 
- Static Public Member Functions inherited from Sherlock::Talk
static Talkinit (SherlockEngine *vm)
 

Public Attributes

Common::String _fixedTextWindowExit
 
Common::String _fixedTextWindowUp
 
Common::String _fixedTextWindowDown
 
byte _hotkeyWindowExit
 
byte _hotkeyWindowUp
 
byte _hotkeyWindowDown
 
- Public Attributes inherited from Sherlock::Talk
Common::Array< Statement_statements
 
bool _talkToAbort
 
int _talkCounter
 
int _talkTo
 
int _scriptMoreFlag
 
bool _openTalkWindow
 
Common::String _scriptName
 
bool _moreTalkUp
 
bool _moreTalkDown
 
int _converseNum
 
const byte * _opcodes
 
int _speaker
 

Protected Member Functions

void talkInterface (const byte *&str) override
 
void talkWait (const byte *&str) override
 
void switchSpeaker () override
 
void nothingToSay () override
 
void showTalk () override
 
- Protected Member Functions inherited from Sherlock::Talk
 Talk (SherlockEngine *vm)
 
OpcodeReturn cmdAddItemToInventory (const byte *&str)
 
OpcodeReturn cmdAdjustObjectSequence (const byte *&str)
 
OpcodeReturn cmdBanishWindow (const byte *&str)
 
OpcodeReturn cmdDisableEndKey (const byte *&str)
 
OpcodeReturn cmdEnableEndKey (const byte *&str)
 
OpcodeReturn cmdEndTextWindow (const byte *&str)
 
OpcodeReturn cmdHolmesOff (const byte *&str)
 
OpcodeReturn cmdHolmesOn (const byte *&str)
 
OpcodeReturn cmdPause (const byte *&str)
 
OpcodeReturn cmdPauseWithoutControl (const byte *&str)
 
OpcodeReturn cmdRemoveItemFromInventory (const byte *&str)
 
OpcodeReturn cmdRunCAnimation (const byte *&str)
 
OpcodeReturn cmdSetFlag (const byte *&str)
 
OpcodeReturn cmdSetObject (const byte *&str)
 
OpcodeReturn cmdStealthModeActivate (const byte *&str)
 
OpcodeReturn cmdStealthModeDeactivate (const byte *&str)
 
OpcodeReturn cmdToggleObject (const byte *&str)
 
OpcodeReturn cmdWalkToCAnimation (const byte *&str)
 
bool isOpcode (byte checkCharacter)
 
void setTalkMap ()
 

Additional Inherited Members

- Protected Attributes inherited from Sherlock::Talk
SherlockEngine_vm
 
OpcodeMethod * _opcodeTable
 
Common::Stack< SequenceEntry_savedSequences
 
Common::Stack< ScriptStackEntry_scriptStack
 
Common::Array< TalkHistoryEntry_talkHistory
 
int _talkIndex
 
int _scriptSelect
 
int _talkStealth
 
int _talkToFlag
 
int _scriptSaveIndex
 
int _3doSpeechIndex
 
int _yp
 
int _charCount
 
int _line
 
int _wait
 
bool _pauseFlag
 
bool _endStr
 
bool _noTextYet
 
int _seqCount
 
const byte * _scriptStart
 
const byte * _scriptEnd
 

Member Function Documentation

◆ talkInterface()

void Sherlock::Scalpel::ScalpelTalk::talkInterface ( const byte *&  str)
overrideprotectedvirtual

Display the talk interface window

Implements Sherlock::Talk.

◆ talkWait()

void Sherlock::Scalpel::ScalpelTalk::talkWait ( const byte *&  str)
overrideprotectedvirtual

Pause when displaying a talk dialog on-screen

Reimplemented from Sherlock::Talk.

◆ switchSpeaker()

void Sherlock::Scalpel::ScalpelTalk::switchSpeaker ( )
overrideprotectedvirtual

Called when the active speaker is switched

Reimplemented from Sherlock::Talk.

◆ nothingToSay()

void Sherlock::Scalpel::ScalpelTalk::nothingToSay ( )
overrideprotectedvirtual

Called when a character being spoken to has no talk options to display

Implements Sherlock::Talk.

◆ showTalk()

void Sherlock::Scalpel::ScalpelTalk::showTalk ( )
overrideprotectedvirtual

Show the talk display

Implements Sherlock::Talk.

◆ loadTalkFile()

void Sherlock::Scalpel::ScalpelTalk::loadTalkFile ( const Common::String filename)
overridevirtual

Opens the talk file 'talk.tlk' and searches the index for the specified conversation. If found, the data for that conversation is loaded

Reimplemented from Sherlock::Talk.

◆ talkTo()

void Sherlock::Scalpel::ScalpelTalk::talkTo ( const Common::String filename)
overridevirtual

Called whenever a conversation or item script needs to be run. For standard conversations, it opens up a description window similar to how 'talk' does, but shows a 'reply' directly instead of waiting for a statement option.

Remarks
It seems that at some point, all item scripts were set up to use this as well. In their case, the conversation display is simply suppressed, and control is passed on to doScript to implement whatever action is required.

Reimplemented from Sherlock::Talk.

◆ waitForMore()

int Sherlock::Scalpel::ScalpelTalk::waitForMore ( int  delay)
overridevirtual

When the talk window has been displayed, waits a period of time proportional to the amount of text that's been displayed

Reimplemented from Sherlock::Talk.

◆ drawInterface()

void Sherlock::Scalpel::ScalpelTalk::drawInterface ( )
overridevirtual

Draws the interface for conversation display

Reimplemented from Sherlock::Talk.

◆ displayTalk()

bool Sherlock::Scalpel::ScalpelTalk::displayTalk ( bool  slamIt)
overridevirtual

Display a list of statements in a window at the bottom of the screen that the player can select from.

Reimplemented from Sherlock::Talk.

◆ talkLine()

int Sherlock::Scalpel::ScalpelTalk::talkLine ( int  lineNum,
int  stateNum,
byte  color,
int  lineY,
bool  slamIt 
)
overridevirtual

Prints a single conversation option in the interface window

Reimplemented from Sherlock::Talk.

◆ talk3DOMovieTrigger()

bool Sherlock::Scalpel::ScalpelTalk::talk3DOMovieTrigger ( int  subIndex)

Trigger to play a 3DO talk dialog movie

◆ skipBadText()

static void Sherlock::Scalpel::ScalpelTalk::skipBadText ( const byte *&  msgP)
static

Handles skipping over bad text in conversations

◆ pushSequenceEntry()

void Sherlock::Scalpel::ScalpelTalk::pushSequenceEntry ( Object obj)
overridevirtual

Push the details of a passed object onto the saved sequences stack

Implements Sherlock::Talk.

◆ pullSequence()

void Sherlock::Scalpel::ScalpelTalk::pullSequence ( int  slot = -1)
overridevirtual

Pulls a background object sequence from the sequence stack and restore's the object's sequence

Implements Sherlock::Talk.

◆ isSequencesEmpty()

bool Sherlock::Scalpel::ScalpelTalk::isSequencesEmpty ( ) const
inlineoverridevirtual

Returns true if the script stack is empty

Implements Sherlock::Talk.

◆ clearSequences()

void Sherlock::Scalpel::ScalpelTalk::clearSequences ( )
overridevirtual

Clears the stack of pending object sequences associated with speakers in the scene

Implements Sherlock::Talk.


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