ScummVM API documentation
Titanic::SuccUBusScript Class Reference
Inheritance diagram for Titanic::SuccUBusScript:
Titanic::TTnpcScript Titanic::TTnpcScriptBase Titanic::TTscriptBase

Public Member Functions

 SuccUBusScript (int val1, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7)
 
int chooseResponse (const TTroomScript *roomScript, const TTsentence *sentence, uint tag) override
 
int process (const TTroomScript *roomScript, const TTsentence *sentence) override
 
ScriptChangedResult scriptChanged (const TTroomScript *roomScript, uint id) override
 
int updateState (uint oldId, uint newId, int index) override
 
int doSentenceEntry (int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) override
 
- Public Member Functions inherited from Titanic::TTnpcScript
 TTnpcScript (int charId, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7)
 
void addResponse (int id) override
 
int chooseResponse (const TTroomScript *roomScript, const TTsentence *sentence, uint tag) override
 
int process (const TTroomScript *roomScript, const TTsentence *sentence) override
 
int proc8 () const override
 
ScriptChangedResult scriptChanged (uint id) override
 
ScriptChangedResult scriptChanged (const TTroomScript *roomScript, uint id) override
 
int proc11 () const override
 
int proc12 () const override
 
virtual void selectResponse (int id)
 
virtual bool handleWord (uint id) const
 
virtual int handleQuote (const TTroomScript *roomScript, const TTsentence *sentence, uint tag1, uint tag2, uint remainder)
 
virtual bool isQuoteDialled () const
 
virtual uint getRangeValue (uint id)
 
virtual void resetRange (int id)
 
virtual int preResponse (uint id)
 
virtual uint getDialsBitset () const
 
virtual const TTscriptMappinggetMapping (int index)
 
virtual void postResponse (int v1, const TTsentenceEntry *entry, const TTroomScript *roomScript, const TTsentence *sentence)
 
virtual void save (SimpleFile *file)
 
virtual void load (SimpleFile *file)
 
virtual void saveBody (SimpleFile *file)
 
virtual void loadBody (SimpleFile *file)
 
virtual int getRangesCount () const
 
virtual void setDialRegion (int dialNum, int region)
 
virtual void setDial (int dialNum, int value)
 
virtual int getDialRegion (int dialNum) const
 
virtual int getDialLevel (uint dialNum, bool randomizeFlag=true)
 
virtual bool randomResponse (uint index)
 
virtual uint translateId (uint id) const
 
void preLoad ()
 
ScriptChangedResult notifyScript (TTroomScript *roomScript, int id)
 
- Public Member Functions inherited from Titanic::TTnpcScriptBase
 TTnpcScriptBase (int charId, const char *charClass, int v2, const char *charName, int v3, int val2, int v4, int v5, int v6, int v7)
 
int charId () const
 
- Public Member Functions inherited from Titanic::TTscriptBase
 TTscriptBase (int scriptId, const char *charClass, int v2, const char *charName, int v3, int v4, int v5, int v6, int v7)
 
virtual void addResponse (const TTstring &str)
 
virtual void applyResponse ()
 
bool isValid ()
 
int getId () const
 
int getStatus () const
 
const TTstring getText ()
 
int scriptPreprocess (TTsentence *sentence)
 

Additional Inherited Members

- Static Public Member Functions inherited from Titanic::TTnpcScript
static void init ()
 
static void deinit ()
 
- Public Attributes inherited from Titanic::TTnpcScriptBase
int _charId
 
- Public Attributes inherited from Titanic::TTscriptBase
int _id
 
- Protected Member Functions inherited from Titanic::TTnpcScript
void loadResponses (const char *name, int valuesPerResponse=1)
 
void loadRanges (const char *name)
 
void resetFlags ()
 
void setupDials (int dial1, int dial2, int dial3)
 
int getValue (int testNum) const
 
uint getRandomNumber (int max) const
 
uint getRandomBit () const
 
uint getDialogueId (uint tagId)
 
void addRange (uint id, const Common::Array< uint > &values, bool isRandom, bool isSequential)
 
TTscriptRangefindRange (uint id)
 
int processEntries (const TTsentenceEntries *entries, uint entryCount, const TTroomScript *roomScript, const TTsentence *sentence)
 
int processEntries (const TTroomScript *roomScript, const TTsentence *sentence)
 
bool defaultProcess (const TTroomScript *roomScript, const TTsentence *sentence)
 
void checkItems (const TTroomScript *roomScript, const TTsentence *sentence)
 
bool addRandomResponse (bool flag)
 
void updateCurrentDial (bool changeDial)
 
bool fn10 (bool flag)
 
bool getStateValue () const
 
void getAssignedRoom (int *roomNum, int *floorNum, int *elevatorNum) const
 
void setResponseFromArray (int index, int id)
 
- Protected Member Functions inherited from Titanic::TTscriptBase
void deleteResponses ()
 
void appendResponse (int index, int *maxP, int id)
 
void appendResponse (int index, int *maxP, const TTstring &str)
 
void appendResponse2 (int index, int *maxP, const TTstring &str)
 
void setState (int state)
 
int getState () const
 
- Static Protected Member Functions inherited from Titanic::TTnpcScript
static int getRoom54 (int roomId)
 
static CPetControlgetPetControl (CGameManager *gameManager)
 
static bool sentence2C (const TTsentence *sentence)
 
- Protected Attributes inherited from Titanic::TTnpcScript
Common::Array< TTnpcScriptResponse_responses
 
int _valuesPerResponse
 
Common::Array< TTscriptRange_ranges
 
TTscriptMappings _mappings
 
TTsentenceEntries _entries
 
TTtagMappings _tagMappings
 
TTwordEntries _words
 
TThandleQuoteEntries _quotes
 
int _entryCount
 
int _field68
 
int _field6C
 
int _rangeResetCtr
 
int _currentDialNum
 
int _dialDelta
 
int _field7C
 
const char * _itemStringP
 
int _dialValues [10]
 
TTnpcData _data
 
bool _field2CC
 
- Protected Attributes inherited from Titanic::TTnpcScriptBase
int _field54
 
int _val2
 
- Protected Attributes inherited from Titanic::TTscriptBase
TTnode_nodesP
 
TThist_hist1P
 
TTstring _charName
 
TTstring _charClass
 
int _field20
 
int _field24
 
int _field28
 
int _field2C
 
int _field30
 
int _state
 
TThist_hist2P
 
int _field3C
 
TTresponse_respTailP
 
TTresponse_respHeadP
 
TTresponse_oldResponseP
 
int _status
 
- Static Protected Attributes inherited from Titanic::TTnpcScript
static TTsentenceEntries_defaultEntries
 

Member Function Documentation

◆ chooseResponse()

int Titanic::SuccUBusScript::chooseResponse ( const TTroomScript roomScript,
const TTsentence sentence,
uint  tag 
)
overridevirtual

Chooses and adds a conversation response based on a specified tag Id.

Implements Titanic::TTnpcScriptBase.

◆ process()

int Titanic::SuccUBusScript::process ( const TTroomScript roomScript,
const TTsentence sentence 
)
overridevirtual

Does NPC specific processing of the parsed sentence

Implements Titanic::TTnpcScriptBase.

◆ scriptChanged()

ScriptChangedResult Titanic::SuccUBusScript::scriptChanged ( const TTroomScript roomScript,
uint  id 
)
overridevirtual

Called when the script/id changes

Implements Titanic::TTnpcScriptBase.

◆ updateState()

int Titanic::SuccUBusScript::updateState ( uint  oldId,
uint  newId,
int  index 
)
overridevirtual

Handles updating NPC state based on specified dialogue Ids and dial positions

Reimplemented from Titanic::TTnpcScript.

◆ doSentenceEntry()

int Titanic::SuccUBusScript::doSentenceEntry ( int  val1,
const int *  srcIdP,
const TTroomScript roomScript,
const TTsentence sentence 
)
overridevirtual

Process a sentence fragment entry

Reimplemented from Titanic::TTnpcScript.


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