xoreos  0.0.5
Classes | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
Engines::KotOR2::Area Class Reference

An area in Star Wars: Knights of the Old Republic II - The Sith Lords, holding all objects and rooms within, as well as general area properties like the current background music and ambient sounds. More...

#include <area.h>

Inheritance diagram for Engines::KotOR2::Area:
Inheritance graph
[legend]
Collaboration diagram for Engines::KotOR2::Area:
Collaboration graph
[legend]

Classes

struct  CameraStyle
 

Public Member Functions

 Area (Module &module, const Common::UString &resRef)
 
 ~Area ()
 
const Common::UStringgetResRef ()
 Return the area's resref (resource ID). More...
 
void show ()
 Show the object's model(s). More...
 
void hide ()
 Hide the object's model(s). More...
 
uint32 getMusicDayTrack () const
 Return the music track ID playing by day. More...
 
uint32 getMusicNightTrack () const
 Return the music track ID playing by night. More...
 
uint32 getMusicBattleTrack () const
 Return the music track ID playing in battle. More...
 
void setMusicDayTrack (uint32 track)
 Set the music track ID playing by day. More...
 
void setMusicNightTrack (uint32 track)
 Set the music track ID playing by night. More...
 
void setMusicBattleTrack (uint32 track)
 Set the music track ID playing in battle. More...
 
void stopSound ()
 Stop all sounds. More...
 
void stopAmbientMusic ()
 Stop the ambient music. More...
 
void stopAmbientSound ()
 Stop the ambient sound. More...
 
void playAmbientMusic (Common::UString music="")
 Play the specified music (or the area's default) as ambient music. More...
 
void playAmbientSound (Common::UString sound="")
 Play the specified sound (or the area's default) as ambient sound. More...
 
void addEvent (const Events::Event &event)
 Add a single event for consideration into the area event queue. More...
 
void processEventQueue ()
 Process the current event queue. More...
 
void removeFocus ()
 Forcibly remove the focus from the currently highlighted object. More...
 
float evaluateElevation (float x, float y)
 
bool testCollision (const glm::vec3 &orig, const glm::vec3 &dest) const
 
void toggleWalkmesh ()
 
void toggleTriggers ()
 
void evaluateTriggers (float x, float y)
 
void showAllRooms ()
 
void notifyObjectMoved (Object &o)
 
void notifyPCMoved ()
 
void getCameraStyle (float &distance, float &pitch, float &height) const
 
const std::vector< Common::UString > & getRoomsVisibleFrom (const Common::UString &room) const
 
KotOR2::ObjectgetActiveObject ()
 
KotOR2::ObjectgetObjectByTag (const Common::UString &tag)
 
- Public Member Functions inherited from Engines::KotOR2::Object
 Object (ObjectType type=kObjectTypeInvalid)
 
virtual ~Object ()
 
ObjectType getType () const
 Return the exact type of the object. More...
 
virtual void hideSoft ()
 Hide the object's model(s) if applicable. More...
 
virtual bool isVisible () const
 Is the object's model(s) visible? More...
 
const std::list< uint32 > & getIDs () const
 Return the object's model IDs. More...
 
const Common::UStringgetName () const
 Return the object's name. More...
 
const Common::UStringgetDescription () const
 Return the object's description. More...
 
const Common::UStringgetPortrait () const
 Return the object's portrait. More...
 
bool isStatic () const
 Is the object static (not manipulable at all)? More...
 
bool isUsable () const
 Can the object be used by the PC? More...
 
bool isClickable () const
 Can the player click the object? More...
 
virtual void getPosition (float &x, float &y, float &z) const
 Return the object's position within its area. More...
 
virtual void getOrientation (float &x, float &y, float &z, float &angle) const
 Return the object's orientation. More...
 
virtual void setPosition (float x, float y, float z)
 Set the object's position within its area. More...
 
virtual void setOrientation (float x, float y, float z, float angle)
 Set the object's orientation. More...
 
void makeLookAt (float x, float y)
 
void makeLookAt (Object *target)
 
RoomgetRoom ()
 Get a room the object is in. More...
 
void setRoom (Room *room)
 Set a room the object is in. More...
 
virtual void enter ()
 The cursor entered the object. More...
 
virtual void leave ()
 The cursor left the object. More...
 
virtual void highlight (bool enabled)
 (Un)Highlight the object. More...
 
virtual bool click (Object *triggerer=0)
 The object was clicked. More...
 
void stopSound ()
 Stop the current object sound. More...
 
void playSound (const Common::UString &sound, bool pitchVariance=false)
 Play an object sound. More...
 
virtual void playAnimation (const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
 
- Public Member Functions inherited from Aurora::NWScript::Object
 Object ()
 
uint32 getID () const
 
const Common::UStringgetTag () const
 
- Public Member Functions inherited from Aurora::NWScript::VariableContainer
 VariableContainer ()
 
virtual ~VariableContainer ()
 
bool hasVariable (const Common::UString &var) const
 
VariablegetVariable (const Common::UString &var, Type type=kTypeVoid)
 
const VariablegetVariable (const Common::UString &var) const
 
void setVariable (const Common::UString &var, const Variable &value)
 
void removeVariable (const Common::UString &var)
 
void clearVariables ()
 
- Public Member Functions inherited from Engines::KotOR2::ScriptContainer
 ScriptContainer ()
 
 ~ScriptContainer ()
 
const Common::UStringgetScript (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())
 
- Public Member Functions inherited from Events::Notifyable
 Notifyable ()
 
virtual ~Notifyable ()
 

Protected Member Functions

void notifyCameraMoved ()
 
- Protected Member Functions inherited from Engines::KotOR2::ScriptContainer
void clearScripts ()
 
void readScripts (const Aurora::GFF3Struct &gff)
 
void readScripts (const ScriptContainer &container)
 

Private Types

typedef Common::PtrList< RoomRoomList
 
typedef Common::PtrList< KotOR2::ObjectObjectList
 
typedef std::map< uint32, KotOR2::Object * > ObjectMap
 

Private Member Functions

void clear ()
 
void load ()
 
void loadLYT ()
 
void loadVIS ()
 
void loadARE (const Aurora::GFF3Struct &are)
 
void loadGIT (const Aurora::GFF3Struct &git)
 
void loadCameraStyle (uint32 id)
 
void loadRooms ()
 
void loadProperties (const Aurora::GFF3Struct &props)
 
void loadObject (KotOR2::Object &object)
 
void loadWaypoints (const Aurora::GFF3List &list)
 
void loadPlaceables (const Aurora::GFF3List &list)
 
void loadDoors (const Aurora::GFF3List &list)
 
void loadCreatures (const Aurora::GFF3List &list)
 
void loadTriggers (const Aurora::GFF3List &list)
 
void unload ()
 
void checkActive (int x=-1, int y=-1)
 
void setActive (KotOR2::Object *object)
 
KotOR2::ObjectgetObjectAt (int x, int y)
 
void highlightAll (bool enabled)
 
void click (int x, int y)
 
RoomgetRoomAt (float x, float y) const
 

Private Attributes

Module_module
 The module this area is in. More...
 
Common::UString _resRef
 The area's resref (resource ID). More...
 
Common::UString _displayName
 The area's localized display name. More...
 
Common::UString _ambientDay
 Ambient sound that plays by day. More...
 
Common::UString _ambientNight
 Ambient sound that plays by night. More...
 
uint32 _musicDayTrack
 Music track ID that plays by day. More...
 
uint32 _musicNightTrack
 Music track ID that plays by night. More...
 
uint32 _musicBattleTrack
 Music track ID that plays in battle. More...
 
Common::UString _musicDay
 Music that plays by day. More...
 
Common::UString _musicNight
 Music that plays by night. More...
 
Common::UString _musicBattle
 Music that plays in battle. More...
 
std::vector< Common::UString_musicBattleStinger
 Battle music stingers. More...
 
float _ambientDayVol
 Day ambient sound volume. More...
 
float _ambientNightVol
 Night ambient sound volume. More...
 
bool _visible
 Is the area currently visible? More...
 
Sound::ChannelHandle _ambientSound
 Sound handle of the currently playing sound. More...
 
Sound::ChannelHandle _ambientMusic
 Sound handle of the currently playing music. More...
 
Aurora::LYTFile _lyt
 The area's layout description. More...
 
Aurora::VISFile _vis
 The area's inter-room visibility description. More...
 
RoomList _rooms
 All rooms in the area. More...
 
ObjectList _objects
 List of all objects in the area. More...
 
ObjectMap _objectMap
 Map of all non-static objects in the area. More...
 
KotOR2::Object_activeObject
 The currently active (highlighted) object. More...
 
bool _highlightAll
 Are we currently highlighting all objects? More...
 
std::list< Events::Event_eventQueue
 The event queue. More...
 
Common::Mutex _mutex
 Mutex securing access to the area. More...
 
std::vector< Trigger * > _triggers
 .— Triggers More...
 
bool _triggersVisible
 
Trigger_activeTrigger
 
CameraStyle _cameraStyle
 '— More...
 
bool _walkmeshInvisible
 
std::list< Situated * > _situatedObjects
 

Friends

class Console
 

Additional Inherited Members

- Static Public Member Functions inherited from Engines::KotOR2::ScriptContainer
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 Attributes inherited from Engines::KotOR2::Object
ObjectType _type
 The object's type. More...
 
Common::UString _name
 The object's display name. More...
 
Common::UString _description
 The object's description. More...
 
Common::UString _portrait
 The object's portrait. More...
 
bool _static
 Is the object static? More...
 
bool _usable
 Is the object usable? More...
 
std::list< uint32_ids
 The object's model IDs. More...
 
float _position [3]
 The object's position. More...
 
float _orientation [4]
 The object's orientation. More...
 
Sound::ChannelHandle _sound
 The currently playing object sound. More...
 
Room_room
 Room the object is in. More...
 
- Protected Attributes inherited from Aurora::NWScript::Object
uint32 _id
 
Common::UString _tag
 

Detailed Description

An area in Star Wars: Knights of the Old Republic II - The Sith Lords, holding all objects and rooms within, as well as general area properties like the current background music and ambient sounds.

Note: the coordinate system of the in-world graphics is oriented as viewed from the top down. The negative Z axis goes down into the ground, while the positive Y axis points due north and the positive X axis points due east.

Definition at line 64 of file area.h.

Member Typedef Documentation

◆ ObjectList

Definition at line 144 of file area.h.

◆ ObjectMap

Definition at line 145 of file area.h.

◆ RoomList

Definition at line 142 of file area.h.

Constructor & Destructor Documentation

◆ Area()

Engines::KotOR2::Area::Area ( Module module,
const Common::UString resRef 
)

Definition at line 63 of file area.cpp.

References _module, Engines::KotOR2::ObjectContainer::addObject(), clear(), and load().

Here is the call graph for this function:

◆ ~Area()

Engines::KotOR2::Area::~Area ( )

Definition at line 85 of file area.cpp.

References _module, clear(), hide(), removeFocus(), and Engines::KotOR2::ObjectContainer::removeObject().

Here is the call graph for this function:

Member Function Documentation

◆ addEvent()

void Engines::KotOR2::Area::addEvent ( const Events::Event event)

Add a single event for consideration into the area event queue.

Definition at line 412 of file area.cpp.

References _eventQueue.

◆ checkActive()

void Engines::KotOR2::Area::checkActive ( int  x = -1,
int  y = -1 
)
private

Definition at line 468 of file area.cpp.

References _highlightAll, _mutex, CursorMan, getObjectAt(), and setActive().

Referenced by notifyCameraMoved(), and processEventQueue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void Engines::KotOR2::Area::clear ( )
private

Definition at line 108 of file area.cpp.

References _activeTrigger, _module, _objects, _rooms, _situatedObjects, _triggers, Common::PtrList< T, Deallocator >::clear(), and Engines::KotOR2::ObjectContainer::removeObject().

Referenced by Area(), and ~Area().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ click()

void Engines::KotOR2::Area::click ( int  x,
int  y 
)
private

Definition at line 480 of file area.cpp.

References _module, _mutex, Engines::KotOR2::Object::click(), Engines::KotOR2::Module::clickObject(), getObjectAt(), and Engines::KotOR2::Module::getPC().

Referenced by processEventQueue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluateElevation()

float Engines::KotOR2::Area::evaluateElevation ( float  x,
float  y 
)

◆ evaluateTriggers()

void Engines::KotOR2::Area::evaluateTriggers ( float  x,
float  y 
)

◆ getActiveObject()

KotOR2::Object * Engines::KotOR2::Area::getActiveObject ( )

Definition at line 672 of file area.cpp.

References _activeObject.

◆ getCameraStyle()

void Engines::KotOR2::Area::getCameraStyle ( float &  distance,
float &  pitch,
float &  height 
) const

◆ getMusicBattleTrack()

uint32 Engines::KotOR2::Area::getMusicBattleTrack ( ) const

Return the music track ID playing in battle.

Definition at line 127 of file area.cpp.

References _musicBattleTrack.

◆ getMusicDayTrack()

uint32 Engines::KotOR2::Area::getMusicDayTrack ( ) const

Return the music track ID playing by day.

Definition at line 119 of file area.cpp.

References _musicDayTrack.

Referenced by Engines::KotOR2::Functions::musicBackgroundGetDayTrack().

Here is the caller graph for this function:

◆ getMusicNightTrack()

uint32 Engines::KotOR2::Area::getMusicNightTrack ( ) const

Return the music track ID playing by night.

Definition at line 123 of file area.cpp.

References _musicNightTrack.

Referenced by Engines::KotOR2::Functions::musicBackgroundGetNightTrack().

Here is the caller graph for this function:

◆ getObjectAt()

KotOR2::Object * Engines::KotOR2::Area::getObjectAt ( int  x,
int  y 
)
private

Definition at line 443 of file area.cpp.

References _objectMap, Graphics::Renderable::getID(), and GfxMan.

Referenced by checkActive(), and click().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getObjectByTag()

KotOR2::Object * Engines::KotOR2::Area::getObjectByTag ( const Common::UString tag)

Definition at line 676 of file area.cpp.

References _objects.

Referenced by Engines::KotOR2::DialogGUI::makeLookAtPC(), Engines::KotOR2::DialogGUI::playDefaultAnimations(), and Engines::KotOR2::DialogGUI::playTalkAnimations().

Here is the caller graph for this function:

◆ getResRef()

const Common::UString& Engines::KotOR2::Area::getResRef ( )

Return the area's resref (resource ID).

◆ getRoomAt()

Room * Engines::KotOR2::Area::getRoomAt ( float  x,
float  y 
) const
private

Definition at line 685 of file area.cpp.

References _rooms, and FLT_MIN.

Referenced by notifyObjectMoved().

Here is the caller graph for this function:

◆ getRoomsVisibleFrom()

const std::vector< Common::UString > & Engines::KotOR2::Area::getRoomsVisibleFrom ( const Common::UString room) const

Definition at line 668 of file area.cpp.

References _vis, and Aurora::VISFile::getVisibilityArray().

Referenced by Engines::KotOR2::Console::cmdListRoomsVisibleFrom().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hide()

void Engines::KotOR2::Area::hide ( )
virtual

Hide the object's model(s).

Reimplemented from Engines::KotOR2::Object.

Definition at line 225 of file area.cpp.

References _objects, _rooms, _visible, GfxMan, removeFocus(), and stopSound().

Referenced by ~Area().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ highlightAll()

void Engines::KotOR2::Area::highlightAll ( bool  enabled)
private

Definition at line 491 of file area.cpp.

References _highlightAll, and _objectMap.

Referenced by processEventQueue().

Here is the caller graph for this function:

◆ load()

void Engines::KotOR2::Area::load ( )
private

Definition at line 95 of file area.cpp.

References _resRef, Aurora::GFF3File::getTopLevel(), Aurora::kFileTypeARE, Aurora::kFileTypeGIT, loadARE(), loadGIT(), loadLYT(), loadRooms(), loadVIS(), and MKTAG.

Referenced by Area().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadARE()

void Engines::KotOR2::Area::loadARE ( const Aurora::GFF3Struct are)
private

Definition at line 276 of file area.cpp.

References Engines::KotOR2::Object::_name, Aurora::NWScript::Object::_tag, Aurora::GFF3Struct::getString(), Aurora::GFF3Struct::getUint(), loadCameraStyle(), and Engines::KotOR2::ScriptContainer::readScripts().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadCameraStyle()

void Engines::KotOR2::Area::loadCameraStyle ( uint32  id)
private

Definition at line 290 of file area.cpp.

References _cameraStyle, Engines::KotOR2::Area::CameraStyle::distance, Aurora::TwoDARow::getFloat(), Aurora::TwoDAFile::getRow(), Engines::KotOR2::Area::CameraStyle::height, Engines::KotOR2::Area::CameraStyle::pitch, and TwoDAReg.

Referenced by loadARE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadCreatures()

void Engines::KotOR2::Area::loadCreatures ( const Aurora::GFF3List list)
private

Definition at line 395 of file area.cpp.

References loadObject().

Referenced by loadGIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadDoors()

void Engines::KotOR2::Area::loadDoors ( const Aurora::GFF3List list)
private

Definition at line 386 of file area.cpp.

References _module, _situatedObjects, and loadObject().

Referenced by loadGIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadGIT()

void Engines::KotOR2::Area::loadGIT ( const Aurora::GFF3Struct git)
private

Definition at line 298 of file area.cpp.

References Aurora::GFF3Struct::getList(), Aurora::GFF3Struct::getStruct(), Aurora::GFF3Struct::hasField(), loadCreatures(), loadDoors(), loadPlaceables(), loadProperties(), loadTriggers(), and loadWaypoints().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadLYT()

void Engines::KotOR2::Area::loadLYT ( )
private

Definition at line 248 of file area.cpp.

References _lyt, _resRef, Common::StackException::add(), Common::UString::c_str(), Aurora::kFileTypeLYT, Aurora::LYTFile::load(), and ResMan.

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadObject()

void Engines::KotOR2::Area::loadObject ( KotOR2::Object object)
private

Definition at line 355 of file area.cpp.

References _module, _objectMap, _objects, Engines::KotOR2::ObjectContainer::addObject(), Engines::KotOR2::Object::isStatic(), and notifyObjectMoved().

Referenced by loadCreatures(), loadDoors(), loadPlaceables(), loadTriggers(), and loadWaypoints().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadPlaceables()

void Engines::KotOR2::Area::loadPlaceables ( const Aurora::GFF3List list)
private

Definition at line 377 of file area.cpp.

References _situatedObjects, and loadObject().

Referenced by loadGIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadProperties()

void Engines::KotOR2::Area::loadProperties ( const Aurora::GFF3Struct props)
private

Definition at line 318 of file area.cpp.

References _ambientDay, _ambientDayVol, _ambientNight, _ambientNightVol, Aurora::TwoDAFile::getRow(), Aurora::TwoDARow::getString(), Aurora::GFF3Struct::getUint(), Aurora::kStrRefInvalid, setMusicBattleTrack(), setMusicDayTrack(), setMusicNightTrack(), and TwoDAReg.

Referenced by loadGIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadRooms()

void Engines::KotOR2::Area::loadRooms ( )
private

Definition at line 348 of file area.cpp.

References _lyt, _rooms, and Aurora::LYTFile::getRooms().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadTriggers()

void Engines::KotOR2::Area::loadTriggers ( const Aurora::GFF3List list)
private

Definition at line 403 of file area.cpp.

References _triggers, and loadObject().

Referenced by loadGIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadVIS()

void Engines::KotOR2::Area::loadVIS ( )
private

Definition at line 262 of file area.cpp.

References _resRef, _vis, Common::StackException::add(), Common::UString::c_str(), Aurora::kFileTypeVIS, Aurora::VISFile::load(), and ResMan.

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadWaypoints()

void Engines::KotOR2::Area::loadWaypoints ( const Aurora::GFF3List list)
private

Definition at line 369 of file area.cpp.

References loadObject().

Referenced by loadGIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ notifyCameraMoved()

void Engines::KotOR2::Area::notifyCameraMoved ( )
protectedvirtual

Reimplemented from Events::Notifyable.

Definition at line 509 of file area.cpp.

References checkActive().

Here is the call graph for this function:

◆ notifyObjectMoved()

void Engines::KotOR2::Area::notifyObjectMoved ( Object o)

Definition at line 607 of file area.cpp.

References Engines::KotOR2::Object::getPosition(), getRoomAt(), and Engines::KotOR2::Object::setRoom().

Referenced by loadObject(), and notifyPCMoved().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ notifyPCMoved()

void Engines::KotOR2::Area::notifyPCMoved ( )

◆ playAmbientMusic()

void Engines::KotOR2::Area::playAmbientMusic ( Common::UString  music = "")

Play the specified music (or the area's default) as ambient music.

Definition at line 176 of file area.cpp.

References _ambientMusic, _musicDay, Common::UString::empty(), Sound::kSoundTypeMusic, Engines::playSound(), and stopAmbientMusic().

Referenced by Engines::KotOR2::Functions::musicBackgroundPlay(), Engines::KotOR2::Game::playMusic(), and show().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ playAmbientSound()

void Engines::KotOR2::Area::playAmbientSound ( Common::UString  sound = "")

Play the specified sound (or the area's default) as ambient sound.

Definition at line 189 of file area.cpp.

References _ambientDay, _ambientDayVol, _ambientSound, Common::UString::empty(), Sound::kSoundTypeSFX, Engines::playSound(), and stopAmbientSound().

Referenced by show().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processEventQueue()

void Engines::KotOR2::Area::processEventQueue ( )

Process the current event queue.

Definition at line 416 of file area.cpp.

References _eventQueue, checkActive(), click(), highlightAll(), Events::kEventKeyDown, Events::kEventKeyUp, Events::kEventMouseDown, and Events::kEventMouseMove.

Here is the call graph for this function:

◆ removeFocus()

void Engines::KotOR2::Area::removeFocus ( )

Forcibly remove the focus from the currently highlighted object.

Definition at line 502 of file area.cpp.

References _activeObject, and Engines::KotOR2::Object::leave().

Referenced by hide(), and ~Area().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setActive()

void Engines::KotOR2::Area::setActive ( KotOR2::Object object)
private

Definition at line 455 of file area.cpp.

References _activeObject, Engines::KotOR2::Object::enter(), and Engines::KotOR2::Object::leave().

Referenced by checkActive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMusicBattleTrack()

void Engines::KotOR2::Area::setMusicBattleTrack ( uint32  track)

Set the music track ID playing in battle.

Definition at line 141 of file area.cpp.

References _musicBattle, _musicBattleStinger, _musicBattleTrack, Aurora::TwoDAFile::getRow(), Aurora::TwoDARow::getString(), Aurora::kStrRefInvalid, and TwoDAReg.

Referenced by loadProperties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMusicDayTrack()

void Engines::KotOR2::Area::setMusicDayTrack ( uint32  track)

Set the music track ID playing by day.

Definition at line 131 of file area.cpp.

References _musicDay, _musicDayTrack, and TwoDAReg.

Referenced by loadProperties(), and Engines::KotOR2::Functions::musicBackgroundChangeDay().

Here is the caller graph for this function:

◆ setMusicNightTrack()

void Engines::KotOR2::Area::setMusicNightTrack ( uint32  track)

Set the music track ID playing by night.

Definition at line 136 of file area.cpp.

References _musicNight, _musicNightTrack, and TwoDAReg.

Referenced by loadProperties(), and Engines::KotOR2::Functions::musicBackgroundChangeNight().

Here is the caller graph for this function:

◆ show()

void Engines::KotOR2::Area::show ( )
virtual

Show the object's model(s).

Reimplemented from Engines::KotOR2::Object.

Definition at line 202 of file area.cpp.

References _objects, _rooms, _visible, GfxMan, playAmbientMusic(), and playAmbientSound().

Here is the call graph for this function:

◆ showAllRooms()

void Engines::KotOR2::Area::showAllRooms ( )

Definition at line 589 of file area.cpp.

References _objects, _rooms, and GfxMan.

◆ stopAmbientMusic()

void Engines::KotOR2::Area::stopAmbientMusic ( )

Stop the ambient music.

Definition at line 168 of file area.cpp.

References _ambientMusic, and SoundMan.

Referenced by Engines::KotOR2::Functions::musicBackgroundStop(), playAmbientMusic(), Engines::KotOR2::Game::stopMusic(), and stopSound().

Here is the caller graph for this function:

◆ stopAmbientSound()

void Engines::KotOR2::Area::stopAmbientSound ( )

Stop the ambient sound.

Definition at line 172 of file area.cpp.

References _ambientSound, and SoundMan.

Referenced by playAmbientSound(), and stopSound().

Here is the caller graph for this function:

◆ stopSound()

void Engines::KotOR2::Area::stopSound ( )

Stop all sounds.

Definition at line 163 of file area.cpp.

References stopAmbientMusic(), and stopAmbientSound().

Referenced by hide().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testCollision()

bool Engines::KotOR2::Area::testCollision ( const glm::vec3 &  orig,
const glm::vec3 &  dest 
) const

Definition at line 535 of file area.cpp.

References _situatedObjects.

◆ toggleTriggers()

void Engines::KotOR2::Area::toggleTriggers ( )

Definition at line 558 of file area.cpp.

References _triggers, and _triggersVisible.

◆ toggleWalkmesh()

void Engines::KotOR2::Area::toggleWalkmesh ( )

Definition at line 544 of file area.cpp.

References _rooms, _situatedObjects, and _walkmeshInvisible.

◆ unload()

void Engines::KotOR2::Area::unload ( )
private

Friends And Related Function Documentation

◆ Console

friend class Console
friend

Definition at line 243 of file area.h.

Member Data Documentation

◆ _activeObject

KotOR2::Object* Engines::KotOR2::Area::_activeObject
private

The currently active (highlighted) object.

Definition at line 184 of file area.h.

Referenced by getActiveObject(), removeFocus(), and setActive().

◆ _activeTrigger

Trigger* Engines::KotOR2::Area::_activeTrigger
private

Definition at line 195 of file area.h.

Referenced by clear(), and evaluateTriggers().

◆ _ambientDay

Common::UString Engines::KotOR2::Area::_ambientDay
private

Ambient sound that plays by day.

Definition at line 153 of file area.h.

Referenced by loadProperties(), and playAmbientSound().

◆ _ambientDayVol

float Engines::KotOR2::Area::_ambientDayVol
private

Day ambient sound volume.

Definition at line 167 of file area.h.

Referenced by loadProperties(), and playAmbientSound().

◆ _ambientMusic

Sound::ChannelHandle Engines::KotOR2::Area::_ambientMusic
private

Sound handle of the currently playing music.

Definition at line 173 of file area.h.

Referenced by playAmbientMusic(), and stopAmbientMusic().

◆ _ambientNight

Common::UString Engines::KotOR2::Area::_ambientNight
private

Ambient sound that plays by night.

Definition at line 154 of file area.h.

Referenced by loadProperties().

◆ _ambientNightVol

float Engines::KotOR2::Area::_ambientNightVol
private

Night ambient sound volume.

Definition at line 168 of file area.h.

Referenced by loadProperties().

◆ _ambientSound

Sound::ChannelHandle Engines::KotOR2::Area::_ambientSound
private

Sound handle of the currently playing sound.

Definition at line 172 of file area.h.

Referenced by playAmbientSound(), and stopAmbientSound().

◆ _cameraStyle

CameraStyle Engines::KotOR2::Area::_cameraStyle
private

'—

Definition at line 198 of file area.h.

Referenced by getCameraStyle(), and loadCameraStyle().

◆ _displayName

Common::UString Engines::KotOR2::Area::_displayName
private

The area's localized display name.

Definition at line 151 of file area.h.

◆ _eventQueue

std::list<Events::Event> Engines::KotOR2::Area::_eventQueue
private

The event queue.

Definition at line 188 of file area.h.

Referenced by addEvent(), and processEventQueue().

◆ _highlightAll

bool Engines::KotOR2::Area::_highlightAll
private

Are we currently highlighting all objects?

Definition at line 186 of file area.h.

Referenced by checkActive(), and highlightAll().

◆ _lyt

Aurora::LYTFile Engines::KotOR2::Area::_lyt
private

The area's layout description.

Definition at line 175 of file area.h.

Referenced by loadLYT(), and loadRooms().

◆ _module

Module* Engines::KotOR2::Area::_module
private

The module this area is in.

Definition at line 148 of file area.h.

Referenced by Area(), clear(), click(), evaluateElevation(), evaluateTriggers(), loadDoors(), loadObject(), notifyPCMoved(), and ~Area().

◆ _musicBattle

Common::UString Engines::KotOR2::Area::_musicBattle
private

Music that plays in battle.

Definition at line 162 of file area.h.

Referenced by setMusicBattleTrack().

◆ _musicBattleStinger

std::vector<Common::UString> Engines::KotOR2::Area::_musicBattleStinger
private

Battle music stingers.

Definition at line 165 of file area.h.

Referenced by setMusicBattleTrack().

◆ _musicBattleTrack

uint32 Engines::KotOR2::Area::_musicBattleTrack
private

Music track ID that plays in battle.

Definition at line 158 of file area.h.

Referenced by getMusicBattleTrack(), and setMusicBattleTrack().

◆ _musicDay

Common::UString Engines::KotOR2::Area::_musicDay
private

Music that plays by day.

Definition at line 160 of file area.h.

Referenced by playAmbientMusic(), and setMusicDayTrack().

◆ _musicDayTrack

uint32 Engines::KotOR2::Area::_musicDayTrack
private

Music track ID that plays by day.

Definition at line 156 of file area.h.

Referenced by getMusicDayTrack(), and setMusicDayTrack().

◆ _musicNight

Common::UString Engines::KotOR2::Area::_musicNight
private

Music that plays by night.

Definition at line 161 of file area.h.

Referenced by setMusicNightTrack().

◆ _musicNightTrack

uint32 Engines::KotOR2::Area::_musicNightTrack
private

Music track ID that plays by night.

Definition at line 157 of file area.h.

Referenced by getMusicNightTrack(), and setMusicNightTrack().

◆ _mutex

Common::Mutex Engines::KotOR2::Area::_mutex
private

Mutex securing access to the area.

Definition at line 190 of file area.h.

Referenced by checkActive(), and click().

◆ _objectMap

ObjectMap Engines::KotOR2::Area::_objectMap
private

Map of all non-static objects in the area.

Definition at line 181 of file area.h.

Referenced by getObjectAt(), highlightAll(), and loadObject().

◆ _objects

ObjectList Engines::KotOR2::Area::_objects
private

List of all objects in the area.

Definition at line 180 of file area.h.

Referenced by clear(), getObjectByTag(), hide(), loadObject(), notifyPCMoved(), show(), and showAllRooms().

◆ _resRef

Common::UString Engines::KotOR2::Area::_resRef
private

The area's resref (resource ID).

Definition at line 150 of file area.h.

Referenced by load(), loadLYT(), and loadVIS().

◆ _rooms

RoomList Engines::KotOR2::Area::_rooms
private

All rooms in the area.

Definition at line 178 of file area.h.

Referenced by clear(), evaluateElevation(), getRoomAt(), hide(), loadRooms(), notifyPCMoved(), show(), showAllRooms(), and toggleWalkmesh().

◆ _situatedObjects

std::list<Situated *> Engines::KotOR2::Area::_situatedObjects
private

Definition at line 200 of file area.h.

Referenced by clear(), loadDoors(), loadPlaceables(), testCollision(), and toggleWalkmesh().

◆ _triggers

std::vector<Trigger *> Engines::KotOR2::Area::_triggers
private

.— Triggers

Definition at line 193 of file area.h.

Referenced by clear(), evaluateTriggers(), loadTriggers(), and toggleTriggers().

◆ _triggersVisible

bool Engines::KotOR2::Area::_triggersVisible
private

Definition at line 194 of file area.h.

Referenced by toggleTriggers().

◆ _vis

Aurora::VISFile Engines::KotOR2::Area::_vis
private

The area's inter-room visibility description.

Definition at line 176 of file area.h.

Referenced by getRoomsVisibleFrom(), loadVIS(), and notifyPCMoved().

◆ _visible

bool Engines::KotOR2::Area::_visible
private

Is the area currently visible?

Definition at line 170 of file area.h.

Referenced by hide(), and show().

◆ _walkmeshInvisible

bool Engines::KotOR2::Area::_walkmeshInvisible
private

Definition at line 199 of file area.h.

Referenced by toggleWalkmesh().


The documentation for this class was generated from the following files: