List of scripts. May have one level of hierarchy in the ScriptGroup list. More...
#include <Scripts.h>
Inherits MemoryPoolObject, and Snapshot.
Public Member Functions | |
| ScriptList () | |
| ScriptGroup * | getScriptGroup (void) |
| Script * | getScript (void) |
| void | WriteScriptListDataChunk (DataChunkOutput &chunkWriter) |
| void | addGroup (ScriptGroup *pGrp, Int ndx) |
| void | addScript (Script *pScr, Int ndx) |
| void | deleteScript (Script *pScr) |
| void | deleteGroup (ScriptGroup *pGrp) |
| void | discard (void) |
| ScriptList * | duplicate (void) const |
| ScriptList * | duplicateAndQualify (const AsciiString &qualifier, const AsciiString &playerTemplateName, const AsciiString &newPlayerName) const |
Public Member Functions inherited from MemoryPoolObject | |
| void | deleteInstance () |
Public Member Functions inherited from Snapshot | |
| Snapshot (void) | |
| ~Snapshot (void) | |
Static Public Member Functions | |
| static void | updateDefaults (void) |
| static void | reset (void) |
| static Int | getNextID (void) |
| static Bool | ParseScriptListDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| static Bool | ParseScriptsDataChunk (DataChunkInput &file, DataChunkInfo *info, void *userData) |
| Reads a set of scripts into m_readScripts. Use getReadScripts to access. | |
| static void | WriteScriptsDataChunk (DataChunkOutput &chunkWriter, ScriptList *scriptLists[], Int numLists) |
| Writes sides (including build list info.) | |
| static Int | getReadScripts (ScriptList *scriptLists[MAX_PLAYER_COUNT]) |
Protected Member Functions | |
| virtual void | crc (Xfer *xfer) |
| virtual void | xfer (Xfer *xfer) |
| virtual void | loadPostProcess (void) |
Protected Member Functions inherited from MemoryPoolObject | |
| virtual | ~MemoryPoolObject () |
| void * | operator new (size_t s) |
| void | operator delete (void *p) |
| virtual MemoryPool * | getObjectMemoryPool ()=0 |
Protected Attributes | |
| ScriptGroup * | m_firstGroup |
| Script * | m_firstScript |
Static Protected Attributes | |
| static Int | m_curId = 0 |
| static ScriptList * | s_readLists [MAX_PLAYER_COUNT] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL} |
| static Int | s_numInReadList = 0 |
List of scripts. May have one level of hierarchy in the ScriptGroup list.
| ScriptList::ScriptList | ( | void | ) |
Ctor.
Definition at line 214 of file Scripts.cpp.
| void ScriptList::addGroup | ( | ScriptGroup * | pGrp, |
| Int | ndx ) |
Add a script group to the current list of groups. Offset to position ndx.
Definition at line 430 of file Scripts.cpp.
Add a script to the current list of scripts. Offset to position ndx.
Definition at line 454 of file Scripts.cpp.
|
protectedvirtual |
| void ScriptList::deleteGroup | ( | ScriptGroup * | pGrp | ) |
Delete a group from the current list of groups.
Definition at line 502 of file Scripts.cpp.
| void ScriptList::deleteScript | ( | Script * | pScr | ) |
Delete a script from the current list of scripts.
Definition at line 476 of file Scripts.cpp.
| void ScriptList::discard | ( | void | ) |
ScriptList::discard - Deletes a script list, but not any children.
Definition at line 420 of file Scripts.cpp.
| ScriptList * ScriptList::duplicate | ( | void | ) | const |
ScriptList::duplicate - Creates a full, "deep" copy of scriptlist.
Definition at line 330 of file Scripts.cpp.
| ScriptList * ScriptList::duplicateAndQualify | ( | const AsciiString & | qualifier, |
| const AsciiString & | playerTemplateName, | ||
| const AsciiString & | newPlayerName ) const |
ScriptList::duplicateAndQualify - Creates a full, "deep" copy of scriptlist, adding the qualifier to names.
Definition at line 375 of file Scripts.cpp.
|
static |
Returns array of script list pointers. This can only be called once after scripts are read, and the caller is responsible for deleting the scripts.
ScriptList::getReadScripts - Gets the scripts read in from a file by . ScriptList::ParseScriptsDataChunk.
Definition at line 563 of file Scripts.cpp.
|
inline |
|
protectedvirtual |
|
static |
ScriptList::ParseScriptListDataChunk - read a Scripts chunk. Format is the newer CHUNKY format. See ScriptList::WriteScriptListDataChunk for the writer. Input: DataChunkInput
Definition at line 619 of file Scripts.cpp.
|
static |
Reads a set of scripts into m_readScripts. Use getReadScripts to access.
ScriptList::ParseScriptsDataChunk - read a Scripts chunk. Format is the newer CHUNKY format. See ScriptList::ScriptList for the writer. Input: DataChunkInput
Definition at line 531 of file Scripts.cpp.
|
static |
Deletes any script lists attached to sides. Used for editor cleanup.
Definition at line 197 of file Scripts.cpp.
|
static |
ScriptList::updateDefaults - checks for empty script lists, and adds some default stuff so you don't get a totally blank screen in the editor.
Definition at line 181 of file Scripts.cpp.
| void ScriptList::WriteScriptListDataChunk | ( | DataChunkOutput & | chunkWriter | ) |
ScriptList::WriteScriptListDataChunk - Writes a Scripts chunk. Format is the newer CHUNKY format. Input: DataChunkInput
Definition at line 604 of file Scripts.cpp.
|
static |
Writes sides (including build list info.)
ScriptList::WriteScriptsDataChunk - Writes a Scripts chunk. Format is the newer CHUNKY format. See ScriptEngine::ParseScriptsDataChunk for the reader. Input: DataChunkInput
Definition at line 582 of file Scripts.cpp.
|
protectedvirtual |
Xfer method Version Info: 1: Initial version
Implements Snapshot.
Definition at line 249 of file Scripts.cpp.
|
protected |