Public Member Functions | |
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 | updateState (uint oldId, uint newId, int index) |
virtual int | preResponse (uint id) |
virtual uint | getDialsBitset () const |
virtual const TTscriptMapping * | getMapping (int index) |
virtual int | doSentenceEntry (int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) |
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) |
Static Public Member Functions | |
static void | init () |
static void | deinit () |
Protected Member Functions | |
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) |
TTscriptRange * | findRange (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 | |
static int | getRoom54 (int roomId) |
static CPetControl * | getPetControl (CGameManager *gameManager) |
static bool | sentence2C (const TTsentence *sentence) |
Protected Attributes | |
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 | |
static TTsentenceEntries * | _defaultEntries |
Additional Inherited Members | |
Public Attributes inherited from Titanic::TTnpcScriptBase | |
int | _charId |
Public Attributes inherited from Titanic::TTscriptBase | |
int | _id |
|
protected |
Loads response data for the NPC from the given resource
|
protected |
Load ranges data for the NPC from the given resource
|
protected |
Reset script flags
|
protected |
Setup dials
|
protected |
Perform test on various state values
|
protected |
Gets a random number between 1 and a given max
|
inlineprotected |
Gets a random number of 0 or 1
|
protected |
Returns a dialogue Id by script tag value Id
|
staticprotected |
Returns a pointer to the PET control
|
protected |
Adds a new item to the list of number ranges
|
protected |
Finds an entry in the list of prevoiusly registered number ranges
|
protected |
Scans through a list of sentence entries for a matching standardized response
|
inlineprotected |
Scans through a list of sentence entries for a matching standardized response
|
protected |
Adds a random conversation response
|
protected |
Updates the current dial with the given delta
|
protected |
Gets the True Talk state value
|
protected |
Gets the assigned room's room, floor, and elevator number
|
protected |
Uses a porition of the state _array to set up a new response
|
overridevirtual |
Chooses and adds a conversation response based on a specified tag Id. This default implementation does a lookup into a list of known tags, and chooses a random dialogue Id from the available ones for that tag
Implements Titanic::TTnpcScriptBase.
|
overridevirtual |
Does NPC specific processing of the parsed sentence
Implements Titanic::TTnpcScriptBase.
|
inlineoverridevirtual |
Called when the script/id changes
Implements Titanic::TTnpcScriptBase.
|
inlineoverridevirtual |
Called when the script/id changes
Implements Titanic::TTnpcScriptBase.
|
virtual |
Translate a passed Id to a dialogue Id if necessary, and adds it to the response
|
virtual |
Handles scanning the word list for a given Id, and if found adds it to the sentence concept list
|
inlinevirtual |
Returns true if the NPC's dial region affects quote responses
Reimplemented in Titanic::DoorbotScript, and Titanic::BarbotScript.
|
virtual |
Given an Id for a previously registered set of random number values, picks one of the array values and returns it.. depending on flags, either a random value, or each value in turn
|
virtual |
Resets the prior used index for the specified range
|
virtual |
Handles updating NPC state based on specified dialogue Ids and dial positions
Reimplemented in Titanic::DeskbotScript, Titanic::BellbotScript, Titanic::MaitreDScript, Titanic::DoorbotScript, Titanic::BarbotScript, Titanic::LiftbotScript, and Titanic::SuccUBusScript.
|
virtual |
Handles getting a pre-response
Reimplemented in Titanic::DeskbotScript, Titanic::BellbotScript, Titanic::MaitreDScript, Titanic::DoorbotScript, Titanic::BarbotScript, and Titanic::LiftbotScript.
|
inlinevirtual |
Returns a bitset of the dials being off or not
Reimplemented in Titanic::DeskbotScript, Titanic::DoorbotScript, Titanic::BarbotScript, and Titanic::LiftbotScript.
|
inlinevirtual |
Handles any post-response NPC processing
|
virtual |
Returns the number of range records that are non-random
|
virtual |
Sets a given dial to be pointing in a specified region (0 to 2)
Reimplemented in Titanic::DoorbotScript, Titanic::BarbotScript, and Titanic::LiftbotScript.
|
virtual |
Sets the value for an NPC's dial
|
virtual |
Returns a dial's region number
|
virtual |
Gets the value for a dial
dialNum | Dial number |
randomizeFlag | If set, introduces a slight random variance so that the displayed dial will oscillate randomly around it's real level |
|
virtual |
Handles a randomzied response
Reimplemented in Titanic::DeskbotScript, Titanic::BellbotScript, and Titanic::DoorbotScript.
|
inline |
Called with the script and id changes