CAIScriptFile Class
The structure used for this class is CAIScriptFile
Quick Ref |
void CAIScriptFile::CAIScriptFile() |
void CAIScriptFile::~CAIScriptFile() |
void CAIScriptFile::Clear() |
short CAIScriptFile::DecodeActionID(CString name) |
short CAIScriptFile::DecodeActionType(CString IDLine, long& paramCount) |
unsigned char CAIScriptFile::DecodeSpecialCase(CString name) |
short CAIScriptFile::DecodeTriggerID(CString name) |
void CAIScriptFile::DecompileAction(CAIAction action, CGameObject* pAIObj) |
void CAIScriptFile::DecompileInt(long num, CString constFile) |
void CAIScriptFile::DecompileObject(CAIObjectType object, CGameObject* pAIObj) |
void CAIScriptFile::DecompilePoint(CPoint point) |
void CAIScriptFile::DecompileResponseSet(CAIResponseSet& resSet, CGameObject* pAIObj) |
void CAIScriptFile::DecompileScript(CAIScript& script, CGameObject* pAIObj) |
void CAIScriptFile::DecompileTrigger(CAITrigger& trigger, CGameObject* pAIObj) |
unsigned char CAIScriptFile::DontMergeStrings(CString IDLine) |
CString CAIScriptFile::GetIdLine(CAIIdList& ids, CString& name) |
CString CAIScriptFile::GetParameter(short parNum, CString IDLine) |
void CAIScriptFile::NewConditional() |
void CAIScriptFile::NewResponse(short weight) |
void CAIScriptFile::NewResponseSet() |
void CAIScriptFile::ParseConditionalString(CString data) |
void CAIScriptFile::ParseError(CString message) |
long CAIScriptFile::ParseInt(CString input, CString constFile) |
CAIObjectType CAIScriptFile::ParseObjectAtomic(CString input) |
CAIObjectType CAIScriptFile::ParseObjectFunction(CString input) |
CAIObjectType CAIScriptFile::ParseObjectType(CString& input) |
short CAIScriptFile::ParseOneLine(CString line) |
void CAIScriptFile::ParseResponseString(CString data) |
short CAIScriptFile::ParseTrigger(CString line) |
void CAIScriptFile::SaveEntry() |
int CAIScriptFile::WriteDecompileText(CString text) |
Constructors
Name |
Description |
Constructs a |
|
Destroys a |
CAIScriptFile::CAIScriptFile
Constructs a CAIScriptFile object
void CAIScriptFile::CAIScriptFile();
Remarks
Constructs a CAIScriptFile object
CAIScriptFile::~CAIScriptFile
Destroys the CAIScriptFile object
void CAIScriptFile::~CAIScriptFile();;
Remarks
Destroys the CAIScriptFile object
Methods
Name |
Description |
Clear the contents of a script file |
|
Decodes and returns an action id name for the name specified |
|
Decodes and returns an action type name for the line specified |
|
Decodes a special case |
|
Decodes and returns an trigger id name for the name specified |
|
Decompile an action |
|
Decompile an object |
|
Decompile an x and y point coordinate |
|
Decompile a response set |
|
Decompile a script |
|
Decompile a trigger |
|
Returns a parameter from a line in a script |
|
Returns a parameter type from the specified parameter name |
|
Creates a new condition |
|
Create a new response |
|
Create a new response set |
|
Parse a line in a script file for an action |
|
Parse a string that contains a conditional |
|
Parse an error message for a script file |
|
Parse a script file and returns an integer from the input |
|
Parse input for an atomic object and return a |
|
Parse input for an object function and return a |
|
Parse input for an object type and return a |
|
Parse a single line |
|
Parse a string containing response data |
|
Parse a string line containing a trigger |
|
Read a script line for a specific character and return the rest after that character |
|
Read a script line up to a specific character and return the portion before that |
|
Save entry to a script file |
|
Write decompiled text to a script |
CAIScriptFile::Clear
Clear the contents of a script file
void CAIScriptFile::Clear();
Remarks
CAIScriptFile::DecodeActionID
Decodes and returns an action id name for the name specified
short CAIScriptFile::DecodeActionID(CString name);
Parameters
CString name - action name
Return Value
Returns a short value representing the action id for the name specified
Remarks
CAIScriptFile::DecodeActionType
Decodes and returns an action type name for the line specified
short CAIScriptFile::DecodeActionType(
CString IDLine,
long& paramCount);
Parameters
CString IDLine - line identifier
long& paramCount - count of parameters
Return Value
Returns a short value representing the action type
Remarks
CAIScriptFile::DecodeSpecialCase
Decodes a special case
unsigned char CAIScriptFile::DecodeSpecialCase(CString name);
Parameters
CString name - special case name
Return Value
unsigned char
Remarks
CAIScriptFile::DecodeTriggerID
Decodes and returns an trigger id name for the name specified
short CAIScriptFile::DecodeTriggerID(CString name);
Parameters
CString name - trigger name
Return Value
Returns a
shortvalue representing the trigger id for the name specified
Remarks
CAIScriptFile::DecompileAction
Decompile an action
void CAIScriptFile::DecompileAction(
CAIAction action,
CGameObject* pAIObj);
Parameters
CAIAction action - the action to decompile
CGameObject* pAIObj - pointer to game object
Remarks
CAIScriptFile::DecompileInt
void CAIScriptFile::DecompileInt(
long num,
CString constFile);
Parameters
longnum -CString constFile - string containing filename to decompile
Remarks
CAIScriptFile::DecompileObject
Decompile a CAIObjectType object
void CAIScriptFile::DecompileObject(
CAIObjectType object,
CGameObject* pAIObj);
Parameters
CAIObjectType object - object to decompile
CGameObject* pAIObj - pointer to game object
Remarks
CAIScriptFile::DecompilePoint
Decompile an x and y point coordinate
void CAIScriptFile::DecompilePoint(CPoint point);
Parameters
CPoint point - x, y coordinate to decompile
Remarks
CAIScriptFile::DecompileResponseSet
Decompile a response set
void CAIScriptFile::DecompileResponseSet(
CAIResponseSet& resSet,
CGameObject* pAIObj);
Parameters
CAIResponseSet& resSet - address of response set to decompile
CGameObject* pAIObj - pointer to game object
Remarks
CAIScriptFile::DecompileScript
Decompile a script
void CAIScriptFile::DecompileScript(
CAIScript& script,
CGameObject* pAIObj);
Parameters
CAIScript& script - address of script to decompile
CGameObject* pAIObj - pointer to game object
Remarks
CAIScriptFile::DecompileTrigger
Decompile a CAITrigger trigger
void CAIScriptFile::DecompileTrigger(
CAITrigger& trigger,
CGameObject* pAIObj);
Parameters
CAITrigger& trigger - address of trigger to decompile
CGameObject* pAIObj - pointer to game object
Remarks
CAIScriptFile::DontMergeStrings
unsigned char CAIScriptFile::DontMergeStrings(CString IDLine);
Parameters
CString IDLine - line identifier
Return Value
unsigned char
Remarks
CAIScriptFile::GetConstFile
CString CAIScriptFile::GetConstFile(CString parameter);
Parameters
CString parameter -
Return Value
Returns a CString
Remarks
CAIScriptFile::GetIdLine
CString CAIScriptFile::GetIdLine(
CAIIdList& ids,
CString& name);
Parameters
Return Value
Returns a CString
Remarks
CAIScriptFile::GetParameter
Returns a parameter from a line in a script
CString CAIScriptFile::GetParameter(
short parNum,
CString IDLine);
Parameters
shortparNum - parameter number to fetchCString IDLine - line identifier
Return Value
Returns a CString
Remarks
CAIScriptFile::GetParameterType
Returns a parameter type from the specified parameter name
CString CAIScriptFile::GetParameterType(CString param);
Parameters
CString param - name of the parameter to return the type for
Return Value
Returns a CString
Remarks
CAIScriptFile::NewConditional
Creates a new condition
void CAIScriptFile::NewConditional();
Remarks
CAIScriptFile::NewResponse
Create a new response
void CAIScriptFile::NewResponse(short weight);
Parameters
shortweight -
Remarks
CAIScriptFile::NewResponseSet
Create a new response set
void CAIScriptFile::NewResponseSet();
Remarks
CAIScriptFile::ParseAction
Parse a line in a script file for an action
CAIAction CAIScriptFile::ParseAction(CString line);
Parameters
CString line - the line number of the script to parse for an action
Return Value
Returns a CAIAction
Remarks
CAIScriptFile::ParseConditionalString
Parse a string that contains a conditional
void CAIScriptFile::ParseConditionalString(CString data);
Parameters
CString data - string containing the conditional to parse
Remarks
CAIScriptFile::ParseError
Parse an error message for a script file
void CAIScriptFile::ParseError(CString message);
Parameters
CString message - the error message to parse
Remarks
CAIScriptFile::ParseInt
Parse a script file and returns an integer from the input
long CAIScriptFile::ParseInt(
CString input,
CString constFile);
Parameters
CString input - string containing input to parse
CString constFile - string containing script filename to parse an integer for
Return Value
Returns a long value
Remarks
CAIScriptFile::ParseObjectAtomic
Parse input for an atomic object and return a CAIObjectType
CAIObjectType CAIScriptFile::ParseObjectAtomic(CString input);
Parameters
CString input - string containing input to parse
Return Value
Returns a CAIObjectType
Remarks
CAIScriptFile::ParseObjectFunction
Parse input for an object function and return a CAIObjectType
CAIObjectType CAIScriptFile::ParseObjectFunction(CString input);
Parameters
CString input - string containing input to parse
Return Value
Returns a CAIObjectType
Remarks
CAIScriptFile::ParseObjectType
Parse input for an object type and return a CAIObjectType
CAIObjectType CAIScriptFile::ParseObjectType(CString& input);
Parameters
CString& input - address of string containing input to parse
Return Value
Returns a CAIObjectType
Remarks
CAIScriptFile::ParseOneLine
Parse a single line
short CAIScriptFile::ParseOneLine(CString line);
Parameters
CString line - string containing line to parse
Return Value
Returns a short value
Remarks
CAIScriptFile::ParsePoint
CPoint CAIScriptFile::ParsePoint(CString input);
Parameters
CString input - string containing input to parse
Return Value
Returns an x and y point coordinate as CPoint
Remarks
CAIScriptFile::ParseResponseString
Parse a string containing response data
void CAIScriptFile::ParseResponseString(CString data);
Parameters
CString data - string containing response data to parse
Remarks
CAIScriptFile::ParseTrigger
Parse a string line containing a trigger
short CAIScriptFile::ParseTrigger(CString line);
Parameters
CString line - string containing line that has a trigger to parse
Return Value
Returns a short value
Remarks
CAIScriptFile::ReadAfterChar
Read a script line for a specific character and return the rest of line after that character
CString CAIScriptFile::ReadAfterChar(
CString line,
char c);
Parameters
CString line - string containing line to read
charc - character byte to read after
Return Value
Returns a CString
Remarks
CAIScriptFile::ReadToChar
Read a script line up to a specific character and return the portion before that
CString CAIScriptFile::ReadToChar(
CString line,
char c);
Parameters
CString line - string containing line to read
charc - character byte to read up to
Return Value
Returns a CString
Remarks
CAIScriptFile::SaveEntry
Save entry to a script file
void CAIScriptFile::SaveEntry();
Remarks
CAIScriptFile::WriteDecompileText
Write decompiled text to a script
int CAIScriptFile::WriteDecompileText(CString text);
Parameters
CString text - string containing script text to write to script file
Return Value
Returns an int value
Remarks