xoreos
0.0.5
|
#include <functions.h>
Classes | |
struct | FunctionDefaults |
struct | FunctionPointer |
struct | FunctionSignature |
Public Member Functions | |
Functions (Game &game) | |
~Functions () | |
Private Types | |
typedef void(Functions::* | funcPtr) (Aurora::NWScript::FunctionContext &ctx) |
Static Private Member Functions | |
static int32 | getRandom (int min, int max, int32 n=1) |
static Common::UString | formatFloat (float f, int width=18, int decimals=9) |
static Aurora::NWScript::Object * | getParamObject (const Aurora::NWScript::FunctionContext &ctx, size_t n) |
Private Attributes | |
Game * | _game |
Static Private Attributes | |
static const FunctionPointer | kFunctionPointers [] |
The table defining the name and function pointer of each engine function. More... | |
static const FunctionSignature | kFunctionSignatures [] |
The table defining the signature (return type and type of parameters) of each engine function. More... | |
static const FunctionDefaults | kFunctionDefaults [] |
The table defining the default values for the parameters of each engine function. More... | |
Definition at line 45 of file functions.h.
|
private |
Definition at line 51 of file functions.h.
Engines::KotOR2::Functions::Functions | ( | Game & | game | ) |
Definition at line 50 of file functions.cpp.
References registerFunctions().
Engines::KotOR2::Functions::~Functions | ( | ) |
Definition at line 54 of file functions.cpp.
References FunctionMan.
|
private |
Definition at line 36 of file functions_math.cpp.
References ABS(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 56 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Common::rad2deg().
|
private |
Definition at line 62 of file functions_action.cpp.
References _game, Aurora::NWScript::FunctionContext::getCaller(), Engines::KotOR2::Game::getModule(), Aurora::NWScript::FunctionContext::getParams(), and Engines::KotOR2::Module::startConversation().
|
private |
Definition at line 60 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Common::rad2deg().
|
private |
Definition at line 40 of file functions_action.cpp.
References _game, Engines::KotOR2::Module::delayScript(), Common::UString::empty(), Engines::KotOR2::Game::getModule(), getParamObject(), Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getScriptName(), and Aurora::NWScript::FunctionContext::getTriggerer().
|
private |
Definition at line 64 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Common::rad2deg().
|
private |
Definition at line 44 of file functions_math.cpp.
References Common::deg2rad(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 104 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 116 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 108 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 84 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 112 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 88 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 92 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 96 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 100 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 50 of file functions_action.cpp.
References _game, Engines::KotOR2::Module::delayScript(), Common::UString::empty(), Aurora::NWScript::FunctionContext::getCaller(), Engines::KotOR2::Game::getModule(), Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getScriptName(), and Aurora::NWScript::FunctionContext::getTriggerer().
|
private |
Definition at line 40 of file functions_math.cpp.
References ABS(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 227 of file functions_string.cpp.
References Common::UString::end(), Common::UString::findFirst(), Aurora::NWScript::FunctionContext::getParams(), Common::UString::getPosition(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 124 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 112 of file functions_string.cpp.
References formatFloat(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
staticprivate |
Definition at line 111 of file functions.cpp.
References Common::UString::format().
Referenced by floatToString(), and printFloat().
|
private |
Definition at line 41 of file functions_object.cpp.
References Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::FunctionContext::getTriggerer().
|
private |
Definition at line 45 of file functions_object.cpp.
References Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::FunctionContext::getTriggerer().
|
private |
Definition at line 50 of file functions_object.cpp.
References Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::FunctionContext::getTriggerer().
|
private |
Definition at line 43 of file functions_module.cpp.
References _game, Engines::KotOR2::Game::getModule(), Engines::KotOR2::Module::getPC(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 55 of file functions_object.cpp.
References getParamObject(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 49 of file functions_situated.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getReturn(), Engines::KotOR2::Situated::isOpen(), and Engines::KotOR2::ObjectContainer::toSituated().
|
private |
Definition at line 59 of file functions_object.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toPC().
|
private |
Definition at line 65 of file functions_situated.cpp.
References Aurora::NWScript::FunctionContext::getCaller(), Engines::KotOR2::Situated::getLastClosedBy(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toSituated().
|
private |
Definition at line 55 of file functions_situated.cpp.
References Aurora::NWScript::FunctionContext::getCaller(), Engines::KotOR2::Situated::getLastOpenedBy(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toSituated().
|
private |
Definition at line 75 of file functions_situated.cpp.
References Aurora::NWScript::FunctionContext::getCaller(), Engines::KotOR2::Situated::getLastUsedBy(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toSituated().
|
private |
Definition at line 40 of file functions_local.cpp.
References Common::composeString(), Aurora::NWScript::Variable::getInt(), Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::kTypeInt.
|
private |
Definition at line 58 of file functions_local.cpp.
References Common::composeString(), Aurora::NWScript::Variable::getInt(), Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::kTypeInt.
|
private |
Definition at line 37 of file functions_situated.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getReturn(), Engines::KotOR2::Situated::isLocked(), and Engines::KotOR2::ObjectContainer::toSituated().
|
private |
Definition at line 39 of file functions_module.cpp.
References _game, Engines::KotOR2::Game::getModule(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 47 of file functions_module.cpp.
References Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 67 of file functions_object.cpp.
References _game, Aurora::NWScript::ObjectContainer::findObjectsByTag(), Engines::KotOR2::Game::getModule(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
staticprivate |
Definition at line 115 of file functions.cpp.
References Aurora::NWScript::FunctionContext::getCaller(), Aurora::NWScript::FunctionContext::getParams(), Engines::KotOR2::Object::getType(), Engines::KotOR2::kObjectTypeInvalid, Engines::KotOR2::kObjectTypeSelf, and Engines::KotOR2::ObjectContainer::toObject().
Referenced by assignCommand(), getIsObjectValid(), getIsOpen(), getIsPC(), getLocked(), isObjectPartyMember(), musicBackgroundChangeDay(), musicBackgroundChangeNight(), musicBackgroundGetDayTrack(), musicBackgroundGetNightTrack(), musicBackgroundPlay(), musicBackgroundStop(), sendMessageToPC(), and setLocked().
|
private |
Definition at line 240 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and TalkMan.
|
private |
Definition at line 177 of file functions_string.cpp.
References Common::UString::begin(), Common::UString::c_str(), Common::UString::clear(), debugC(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getParams(), Common::UString::getPosition(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getString(), Common::kDebugEngineScripts, Common::UString::size(), and Common::UString::substr().
|
private |
Definition at line 150 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 158 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 162 of file functions_string.cpp.
References Common::UString::c_str(), Common::UString::clear(), debugC(), Common::UString::end(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getParams(), Common::UString::getPosition(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getString(), Common::kDebugEngineScripts, Common::UString::size(), and Common::UString::substr().
|
private |
Definition at line 154 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 207 of file functions_string.cpp.
References Common::UString::c_str(), Common::UString::clear(), debugC(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getParams(), Common::UString::getPosition(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getString(), Common::kDebugEngineScripts, Common::UString::size(), and Common::UString::substr().
|
private |
Definition at line 192 of file functions_string.cpp.
References Common::UString::c_str(), Common::UString::clear(), debugC(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getParams(), Common::UString::getPosition(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getString(), Common::UString::insert(), and Common::kDebugEngineScripts.
|
private |
Definition at line 120 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 120 of file functions_string.cpp.
References Common::UString::format(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 108 of file functions_string.cpp.
References Common::composeString(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 63 of file functions_object.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toPartyMember().
|
private |
Definition at line 126 of file functions.cpp.
|
private |
Definition at line 68 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 49 of file functions_sound.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getParams(), Engines::KotOR2::Area::setMusicDayTrack(), and Engines::KotOR2::ObjectContainer::toArea().
|
private |
Definition at line 55 of file functions_sound.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getParams(), Engines::KotOR2::Area::setMusicNightTrack(), and Engines::KotOR2::ObjectContainer::toArea().
|
private |
Definition at line 61 of file functions_sound.cpp.
References Engines::KotOR2::Area::getMusicDayTrack(), getParamObject(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toArea().
|
private |
Definition at line 67 of file functions_sound.cpp.
References Engines::KotOR2::Area::getMusicNightTrack(), getParamObject(), Aurora::NWScript::FunctionContext::getReturn(), and Engines::KotOR2::ObjectContainer::toArea().
|
private |
Definition at line 37 of file functions_sound.cpp.
References getParamObject(), Engines::KotOR2::Area::playAmbientMusic(), and Engines::KotOR2::ObjectContainer::toArea().
|
private |
Definition at line 43 of file functions_sound.cpp.
References getParamObject(), Engines::KotOR2::Area::stopAmbientMusic(), and Engines::KotOR2::ObjectContainer::toArea().
|
private |
Definition at line 92 of file functions_string.cpp.
References Common::UString::format(), Aurora::NWScript::formatTag(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 37 of file functions_movie.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Engines::playVideo().
|
private |
Definition at line 72 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 74 of file functions_string.cpp.
References formatFloat(), Aurora::NWScript::FunctionContext::getParams(), and status().
|
private |
Definition at line 70 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and status().
|
private |
Definition at line 86 of file functions_string.cpp.
References Aurora::NWScript::formatTag(), Aurora::NWScript::FunctionContext::getParams(), and status().
|
private |
Definition at line 82 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and status().
|
private |
Definition at line 99 of file functions_string.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and status().
|
private |
Definition at line 80 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), getRandom(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 58 of file functions.cpp.
References ARRAYSIZE, Engines::KotOR2::Functions::FunctionDefaults::defaults, Engines::KotOR2::Functions::FunctionPointer::func, FunctionMan, Engines::KotOR2::Functions::FunctionPointer::id, Engines::KotOR2::Functions::FunctionSignature::id, Engines::KotOR2::Functions::FunctionDefaults::id, kFunctionDefaults, kFunctionPointers, kFunctionSignatures, Aurora::NWScript::kTypeVoid, Engines::KotOR2::Functions::FunctionPointer::name, Engines::KotOR2::Functions::FunctionSignature::parameters, Engines::KotOR2::Functions::FunctionSignature::returnType, and unimplementedFunction().
Referenced by Functions().
|
private |
Definition at line 58 of file functions_string.cpp.
References Common::UString::c_str(), debugC(), Aurora::NWScript::FunctionContext::getName(), Engines::KotOR2::Object::getName(), getParamObject(), Aurora::NWScript::FunctionContext::getParams(), Common::kDebugEngineScripts, Engines::KotOR2::ObjectContainer::toPC(), and warning().
|
private |
Definition at line 49 of file functions_local.cpp.
References Common::composeString(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::kTypeInt.
|
private |
Definition at line 67 of file functions_local.cpp.
References Common::composeString(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::kTypeInt.
|
private |
Definition at line 43 of file functions_situated.cpp.
References getParamObject(), Aurora::NWScript::FunctionContext::getParams(), Engines::KotOR2::Situated::setLocked(), and Engines::KotOR2::ObjectContainer::toSituated().
|
private |
Definition at line 48 of file functions_math.cpp.
References Common::deg2rad(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 76 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 137 of file functions_string.cpp.
References Common::UString::c_str(), debugC(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), Common::kDebugEngineScripts, Common::parseString(), and Common::StackException::what().
|
private |
Definition at line 124 of file functions_string.cpp.
References Common::UString::c_str(), debugC(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), Common::kDebugEngineScripts, Common::parseString(), and Common::StackException::what().
|
private |
Definition at line 52 of file functions_math.cpp.
References Common::deg2rad(), Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 94 of file functions.cpp.
References Common::UString::c_str(), Aurora::NWScript::formatParams(), Aurora::NWScript::formatType(), Aurora::NWScript::FunctionContext::getName(), Aurora::NWScript::FunctionContext::getReturn(), Aurora::NWScript::Variable::getType(), and warning().
Referenced by registerFunctions().
|
private |
Definition at line 128 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::Variable::setVector().
|
private |
Definition at line 134 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), and Aurora::NWScript::FunctionContext::getReturn().
|
private |
Definition at line 141 of file functions_math.cpp.
References Aurora::NWScript::FunctionContext::getParams(), Aurora::NWScript::FunctionContext::getReturn(), and Aurora::NWScript::Variable::setVector().
|
private |
Definition at line 52 of file functions_string.cpp.
References Common::UString::c_str(), Common::DateTime::formatDateTimeISO(), Aurora::NWScript::FunctionContext::getParams(), Common::DateTime::kUTC, and status().
|
private |
Definition at line 75 of file functions.h.
Referenced by actionStartConversation(), assignCommand(), delayCommand(), getFirstPC(), getModule(), and getObjectByTag().
|
staticprivate |
The table defining the default values for the parameters of each engine function.
Definition at line 72 of file functions.h.
Referenced by registerFunctions().
|
staticprivate |
The table defining the name and function pointer of each engine function.
Definition at line 70 of file functions.h.
Referenced by registerFunctions().
|
staticprivate |
The table defining the signature (return type and type of parameters) of each engine function.
Definition at line 71 of file functions.h.
Referenced by registerFunctions().