xoreos
0.0.5
|
#include <container.h>
Public Member Functions | |
ScriptContainer () | |
~ScriptContainer () | |
const Common::UString & | getScript (Script script) const |
bool | hasScript (Script script) const |
bool | runScript (Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Static Public Member Functions | |
static bool | runScript (const Common::UString &script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
static bool | runScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference()) |
Protected Member Functions | |
void | clearScripts () |
void | readScripts (const Aurora::GFF3Struct &gff) |
void | readScripts (const ScriptContainer &container) |
Private Attributes | |
Common::UString | _scripts [kScriptMAX] |
Definition at line 47 of file container.h.
Engines::Witcher::ScriptContainer::ScriptContainer | ( | ) |
Definition at line 108 of file container.cpp.
Engines::Witcher::ScriptContainer::~ScriptContainer | ( | ) |
Definition at line 111 of file container.cpp.
|
protected |
Definition at line 124 of file container.cpp.
References _scripts, and Engines::Witcher::kScriptMAX.
Referenced by readScripts().
const Common::UString & Engines::Witcher::ScriptContainer::getScript | ( | Script | script | ) | const |
Definition at line 114 of file container.cpp.
References _scripts, and Engines::Witcher::kScriptMAX.
Referenced by hasScript(), and runScript().
bool Engines::Witcher::ScriptContainer::hasScript | ( | Script | script | ) | const |
Definition at line 120 of file container.cpp.
References Common::UString::empty(), and getScript().
Referenced by Engines::Witcher::Door::click().
|
protected |
Definition at line 129 of file container.cpp.
References _scripts, ARRAYSIZE, clearScripts(), Aurora::GFF3Struct::getString(), Engines::Witcher::kScriptNames, Engines::Witcher::ScriptName::name, and Engines::Witcher::ScriptName::script.
Referenced by Engines::Witcher::Creature::load(), Engines::Witcher::Area::loadARE(), Engines::Witcher::Module::loadModule(), Engines::Witcher::Waypoint::loadProperties(), and Engines::Witcher::Situated::loadProperties().
|
protected |
Definition at line 140 of file container.cpp.
References _scripts, and Engines::Witcher::kScriptMAX.
bool Engines::Witcher::ScriptContainer::runScript | ( | Script | script, |
const Aurora::NWScript::ObjectReference | owner = Aurora::NWScript::ObjectReference() , |
||
const Aurora::NWScript::ObjectReference | triggerer = Aurora::NWScript::ObjectReference() |
||
) |
Definition at line 145 of file container.cpp.
References getScript().
Referenced by Engines::Witcher::Placeable::activate(), Engines::Witcher::Door::click(), Engines::Witcher::Placeable::close(), Engines::Witcher::Door::close(), Engines::Witcher::Placeable::deactivate(), Engines::Witcher::Module::enter(), Engines::Witcher::Module::enterArea(), Engines::Witcher::Module::handleActions(), Engines::Witcher::Module::leave(), Engines::Witcher::Placeable::open(), Engines::Witcher::Door::open(), and runScript().
|
static |
Definition at line 151 of file container.cpp.
References Aurora::NWScript::NCSFile::getEmptyState(), and runScript().
|
static |
Definition at line 158 of file container.cpp.
References Common::UString::c_str(), Common::UString::empty(), Common::exceptionDispatcherWarning(), Aurora::NWScript::Variable::getFloat(), Aurora::NWScript::Variable::getInt(), Aurora::NWScript::Variable::getType(), Aurora::NWScript::kTypeFloat, Aurora::NWScript::kTypeInt, and Aurora::NWScript::NCSFile::run().
|
private |
Definition at line 75 of file container.h.
Referenced by clearScripts(), getScript(), and readScripts().