25 #include <boost/make_shared.hpp> 154 object->setVariable(ctx.
getParams()[1].getString(), ctx.
getParams()[2].getEngineType());
160 object->setVariable(ctx.
getParams()[1].getString(), ctx.
getParams()[2].getEngineType());
166 object->setVariable(ctx.
getParams()[1].getString(), ctx.
getParams()[2].getEngineType());
172 object->setVariable(ctx.
getParams()[1].getString(), ctx.
getParams()[2].getEngineType());
178 object->setVariable(ctx.
getParams()[1].getString(), ctx.
getParams()[2].getEngineType());
184 object->setVariable(ctx.
getParams()[1].getString(), ctx.
getParams()[2].getEngineType());
227 object->setNonLocalizedName(ctx.
getParams()[1].getString());
252 object->getPosition(x, y, z);
257 #define SQR(x) ((x) * (x)) 263 if (!object1 || !object2)
308 size_t count = MAX<int32>(ctx.
getParams()[2].getInt(), 0);
318 const bool includeSelf = ctx.
getParams()[5].getInt() != 0;
320 result.push_back(boost::make_shared<Aurora::NWScript::Variable>(target));
330 std::list<Object *> objects;
331 while ((
object = search->next())) {
334 if (!daObject || (daObject == target))
342 if (type & objectType)
343 objects.push_back(daObject);
348 for (std::list<Object *>::iterator it = objects.begin(); it != objects.end() && count > 0; ++it, count--)
349 result.push_back(boost::make_shared<Aurora::NWScript::Variable>(*it));
368 size_t count = MAX<int32>(ctx.
getParams()[3].getInt(), 0);
378 const bool includeSelf = ctx.
getParams()[6].getInt() != 0;
380 result.push_back(boost::make_shared<Aurora::NWScript::Variable>(target));
390 std::list<Object *> objects;
391 while ((
object = search->next())) {
394 if (!daObject || (daObject == target))
402 if (type & objectType)
403 objects.push_back(daObject);
408 for (std::list<Object *>::iterator it = objects.begin(); it != objects.end() && count > 0; ++it, count--)
409 result.push_back(boost::make_shared<Aurora::NWScript::Variable>(*it));
427 const bool includeSelf = ctx.
getParams()[2].getInt() != 0;
428 if (includeSelf && (target->
getTag() == tag)) {
436 std::list<Object *> objects;
437 while ((
object = search->next())) {
440 if (!daObject || (daObject == target))
443 objects.push_back(daObject);
448 if (!objects.empty())
void isObjectValid(Aurora::NWScript::FunctionContext &ctx)
void getLocalFloat(Aurora::NWScript::FunctionContext &ctx)
std::vector< boost::shared_ptr< Variable > > Array
void getObjectByTag(Aurora::NWScript::FunctionContext &ctx)
void setName(Aurora::NWScript::FunctionContext &ctx)
A class able to sort objects by distance to a target object.
A class holding an UTF-8 string.
Area * getCurrentArea() const
Return the area the PC is currently in.
The context holding a Dragon Age: Origins campaign.
void UT_getNearestObjectByTag(Aurora::NWScript::FunctionContext &ctx)
void getLocalResource(Aurora::NWScript::FunctionContext &ctx)
Context of an NWScript function.
void setLocalFloat(Aurora::NWScript::FunctionContext &ctx)
Campaigns & getCampaigns()
Return the campaigns context.
A container of Dragon Age: Origins objects.
void setLocalItemProperty(Aurora::NWScript::FunctionContext &ctx)
static Aurora::NWScript::Object * getParamObject(const Aurora::NWScript::FunctionContext &ctx, size_t n)
void setLocalLocation(Aurora::NWScript::FunctionContext &ctx)
void setLocalResource(Aurora::NWScript::FunctionContext &ctx)
A simple scoped smart pointer template.
void setLocalEffect(Aurora::NWScript::FunctionContext &ctx)
const Common::UString & getTag() const
void getLocalEffect(Aurora::NWScript::FunctionContext &ctx)
void getLocalInt(Aurora::NWScript::FunctionContext &ctx)
ObjectType getType() const
Return the exact type of the object.
void getDistanceBetween(Aurora::NWScript::FunctionContext &ctx)
void getLocalItemProperty(Aurora::NWScript::FunctionContext &ctx)
The context handling the gameplay in Dragon Age: Origins.
void getObjectType(Aurora::NWScript::FunctionContext &ctx)
Utility templates and functions.
void getLocalString(Aurora::NWScript::FunctionContext &ctx)
void setLocalCommand(Aurora::NWScript::FunctionContext &ctx)
void getPosition(Aurora::NWScript::FunctionContext &ctx)
void setVector(float x, float y, float z)
void setLocalString(Aurora::NWScript::FunctionContext &ctx)
ObjectSearch * findObjectsByTag(const Common::UString &tag) const
Return a search context to iterate over all objects with this tag.
ObjectSearch * findObjects() const
Return a search context to iterate over all objects.
static DragonAge::Object * toObject(::Aurora::NWScript::Object *object)
bool empty() const
Is the string empty?
A scoped plain pointer, allowing pointer-y access and normal deletion.
void getLocalObject(Aurora::NWScript::FunctionContext &ctx)
void setLocalObject(Aurora::NWScript::FunctionContext &ctx)
Campaign * getCurrentCampaign() const
Return the currently running campaign.
void getTag(Aurora::NWScript::FunctionContext &ctx)
void getLocalCommand(Aurora::NWScript::FunctionContext &ctx)
An object in a Dragon Age: Origins area.
"effect", "event", "location", "talent"...
void getLocalPlayer(Aurora::NWScript::FunctionContext &ctx)
void setLocalPlayer(Aurora::NWScript::FunctionContext &ctx)
const Array & getArray() const
Common::UString & getString()
void getName(Aurora::NWScript::FunctionContext &ctx)
Basic Dragon Age: Origins type definitions.
Dragon Age: Origins engine functions.
void getNearestObject(Aurora::NWScript::FunctionContext &ctx)
void getArea(Aurora::NWScript::FunctionContext &ctx)
void getLocalLocation(Aurora::NWScript::FunctionContext &ctx)
The context managing and running the Dragon Age: Origins campaigns.
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
void getNearestObjectByTag(Aurora::NWScript::FunctionContext &ctx)
void clear()
Clear the string's contents.
void getLocalEvent(Aurora::NWScript::FunctionContext &ctx)
void setLocalInt(Aurora::NWScript::FunctionContext &ctx)
void getResRef(Aurora::NWScript::FunctionContext &ctx)
void setLocalEvent(Aurora::NWScript::FunctionContext &ctx)