90 _objects[
object.getType()].push_back(&
object);
98 _objects[
object.getType()].remove(&
object);
106 ObjectMap::const_iterator l =
_objects.find(type);
118 ObjectMap::const_iterator l =
_objects.find(type);
120 return new SearchType(kEmptyObjectList.begin(), kEmptyObjectList.end());
130 return dynamic_cast<Module *
>(object);
134 return dynamic_cast<Area *
>(object);
138 return dynamic_cast<Waypoint *
>(object);
142 return dynamic_cast<Situated *
>(object);
146 return dynamic_cast<Placeable *
>(object);
150 return dynamic_cast<Door *
>(object);
154 return dynamic_cast<Creature *
>(object);
163 if (!pc || !pc->
isPC())
A creature in a Star Wars: Knights of the Old Republic area.
static Module * toModule(Aurora::NWScript::Object *object)
A waypoint in a Star Wars: Knights of the Old Republic area.
std::list< KotOR::Object * > ::const_iterator iterator
static Door * toDoor(Aurora::NWScript::Object *object)
::Aurora::NWScript::Object * getObject(const iterator &t)
SearchType(const type &l)
::Aurora::NWScript::Object * getFirstObjectByType(ObjectType type) const
Return the first object of this type.
SearchList::type ObjectList
static SoundObject * toSoundObject(Aurora::NWScript::Object *object)
bool isPartyMember() const
bool isPC() const
Is the creature a player character?
An ingame sound in kotor.
ObjectType
Object type, matches the bitfield in nwscript.nss.
SearchRange(const range &r)
Utility templates and functions.
A container of Star Wars: Knights of the Old Republic objects.
A situated object in a Star Wars: Knights of the Old Republic area.
A door in a Star Wars: Knights of the Old Republic area.
bool operator()(KotOR::Object *a, KotOR::Object *b)
Low-level type definitions to handle fixed width types portably.
void removeObject(Object &object)
Remove an object from this container.
ObjectDistanceSort(const KotOR::Object &target)
Object * get()
Return the current object in the search context.
std::list< KotOR::Object * > type
An area in Star Wars: Knights of the Old Republic, holding all objects and rooms within, as well as general area properties like the current background music and ambient sounds.
float getDistance(KotOR::Object &a)
The context holding a Star Wars: Knights of the Old Republic area.
A placeable in a Star Wars: Knights of the Old Republic area.
static KotOR::Object * toObject(::Aurora::NWScript::Object *object)
static Creature * toPC(Aurora::NWScript::Object *object)
static Placeable * toPlaceable(Aurora::NWScript::Object *object)
::Aurora::NWScript::ObjectSearch * findObjectsByType(ObjectType type) const
Return a search context to iterate over all objects of this type.
static Creature * toPartyMember(Aurora::NWScript::Object *object)
static Creature * toCreature(Aurora::NWScript::Object *object)
static Situated * toSituated(Aurora::NWScript::Object *object)
SearchType(const iterator &a, const iterator &b)
An object in a Star Wars: Knights of the Old Republic area.
static Area * toArea(Aurora::NWScript::Object *object)
The context needed to run a Star Wars: Knights of the Old Republic module.
virtual void getPosition(float &x, float &y, float &z) const
Return the object's position within its area.
static Waypoint * toWaypoint(Aurora::NWScript::Object *object)
void removeObject(KotOR::Object &object)
Remove an object from this container.
void addObject(KotOR::Object &object)
Add an object to this container.
void addObject(Object &object)
Add an object to this container.