28 #include <boost/bind.hpp> 46 namespace DragonAge2 {
67 assert((fSig.
id ==
id) && (fDef.
id ==
id));
88 FunctionMan.registerFunction(fPtr.
name,
id, boost::bind(f,
this, _1), signature, defaults);
113 object->setPosition(x, y, z);
A container of Dragon Age II objects.
std::vector< class Variable > Parameters
A class holding an UTF-8 string.
Common::UString formatType(Type type)
Construct a string describing this variable type.
static Aurora::NWScript::Object * getParamObject(const Aurora::NWScript::FunctionContext &ctx, size_t n)
Aurora::NWScript::Type parameters[15]
Object * getCaller() const
The context handling the gameplay in Dragon Age II.
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
Aurora::NWScript::Type returnType
void jumpTo(DragonAge2::Object *object, float x, float y, float z)
const Aurora::NWScript::Variable * defaults[7]
An object in a Dragon Age II area.
ObjectType getType() const
Return the exact type of the object.
The NWScript function manager.
static const FunctionSignature kFunctionSignatures[]
The table defining the signature (return type and type of parameters) of each engine function...
const char * c_str() const
Return the (utf8 encoded) string data.
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
Utility templates and functions.
Fake value to describe the calling object in a script.
std::vector< Type > Signature
const Common::UString & getName() const
void(Functions::* funcPtr)(Aurora::NWScript::FunctionContext &ctx)
void warning(const char *s,...)
static DragonAge2::Object * toObject(::Aurora::NWScript::Object *object)
static const FunctionDefaults kFunctionDefaults[]
The table defining the default values for the parameters of each engine function. ...
Common::UString formatParams(const FunctionContext &ctx)
Construct a string describing parameters of this function.
static Common::UString formatFloat(float f, int width=18, int decimals=9)
static const FunctionPointer kFunctionPointers[]
The table defining the name and function pointer of each engine function.
Basic Dragon Age II type definitions.
void unimplementedFunction(Aurora::NWScript::FunctionContext &ctx)
NWScript utility functions.
Dragon Age II engine functions.
Tables defining the engine functions in Dragon Age II.