xoreos  0.0.5
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Engines::KotOR2::Module Class Reference

#include <module.h>

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

Classes

struct  Action
 

Public Member Functions

 Module (::Engines::Console &console)
 
 ~Module ()
 
void clear ()
 Clear the whole context. More...
 
bool isLoaded () const
 Is a module currently loaded and ready to run? More...
 
bool isRunning () const
 Is a module currently running? More...
 
void load (const Common::UString &module, const Common::UString &entryLocation="", ObjectType entryLocationType=kObjectTypeAll)
 Load a module. More...
 
void usePC (Creature *pc)
 Use this character as the player character. More...
 
void exit ()
 Exit the currently running module. More...
 
const Aurora::IFOFilegetIFO () const
 Return the IFO of the currently loaded module. More...
 
const Common::UStringgetName () const
 Return the module's name. More...
 
AreagetCurrentArea ()
 Return the area the PC is currently in. More...
 
CreaturegetPC ()
 Return the currently playing PC. More...
 
void showMenu ()
 Show the ingame main menu. More...
 
void delayScript (const Common::UString &script, const Aurora::NWScript::ScriptState &state, Aurora::NWScript::Object *owner, Aurora::NWScript::Object *triggerer, uint32 delay)
 
void movePC (float x, float y, float z)
 Move the player character to this position within the current area. More...
 
void movePC (const Common::UString &module, const Common::UString &object, ObjectType type=kObjectTypeAll)
 Move the player character to this object within this area. More...
 
void movedPC ()
 Notify the module that the PC was moved. More...
 
void enter ()
 Enter the loaded module, starting it. More...
 
void leave ()
 Leave the running module, quitting it. More...
 
void clickObject (Object *object)
 
void addEvent (const Events::Event &event)
 Add a single event for consideration into the event queue. More...
 
void processEventQueue ()
 Process the current event queue. More...
 
void toggleFreeRoamCamera ()
 
void toggleWalkmesh ()
 
void toggleTriggers ()
 
void startConversation (const Common::UString &name, Aurora::NWScript::Object *owner=0)
 
void playAnimationOnActiveObject (const Common::UString &baseAnim, const Common::UString &headAnim)
 
- 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 show ()
 Show the object's model(s). More...
 
virtual void hide ()
 Hide the object's model(s). 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 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 Engines::KotOR2::ObjectContainer
 ObjectContainer ()
 
 ~ObjectContainer ()
 
void clearObjects ()
 
void addObject (KotOR2::Object &object)
 Add an object to this container. More...
 
void removeObject (KotOR2::Object &object)
 Remove an object from this container. More...
 
::Aurora::NWScript::ObjectgetFirstObjectByType (ObjectType type) const
 Return the first object of this type. More...
 
::Aurora::NWScript::ObjectSearchfindObjectsByType (ObjectType type) const
 Return a search context to iterate over all objects of this type. More...
 
- Public Member Functions inherited from Aurora::NWScript::ObjectContainer
 ObjectContainer ()
 
 ~ObjectContainer ()
 
void clearObjects ()
 
void addObject (Object &object)
 Add an object to this container. More...
 
void removeObject (Object &object)
 Remove an object from this container. More...
 
ObjectgetObjectByID (uint32 id) const
 Find a specific object by ID. More...
 
ObjectgetFirstObject () const
 Return the first object. More...
 
ObjectgetFirstObjectByTag (const Common::UString &tag) const
 Return the first object with this tag. More...
 
ObjectSearchfindObjects () const
 Return a search context to iterate over all objects. More...
 
ObjectSearchfindObjectsByTag (const Common::UString &tag) const
 Return a search context to iterate over all objects with this tag. More...
 

Static Public Member Functions

static Common::UString getName (const Common::UString &module)
 
- 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())
 
- Static Public Member Functions inherited from Engines::KotOR2::ObjectContainer
static KotOR2::ObjecttoObject (::Aurora::NWScript::Object *object)
 
static ModuletoModule (Aurora::NWScript::Object *object)
 
static AreatoArea (Aurora::NWScript::Object *object)
 
static WaypointtoWaypoint (Aurora::NWScript::Object *object)
 
static SituatedtoSituated (Aurora::NWScript::Object *object)
 
static PlaceabletoPlaceable (Aurora::NWScript::Object *object)
 
static DoortoDoor (Aurora::NWScript::Object *object)
 
static CreaturetoCreature (Aurora::NWScript::Object *object)
 
static CreaturetoPC (Aurora::NWScript::Object *object)
 
static CreaturetoPartyMember (Aurora::NWScript::Object *object)
 

Private Types

enum  ActionType { kActionNone = 0, kActionScript = 1 }
 
typedef std::list< Events::EventEventQueue
 
typedef std::multiset< ActionActionQueue
 

Private Member Functions

void unload (bool completeUnload=true)
 Unload the whole shebang. More...
 
void unloadResources ()
 
void unloadPC ()
 
void unloadIFO ()
 
void unloadArea ()
 
void unloadTexturePack ()
 
void load ()
 
void loadResources ()
 
void loadIFO ()
 
void loadArea ()
 
void loadTexturePack ()
 
void loadModule (const Common::UString &module, const Common::UString &entryLocation, ObjectType entryLocationType)
 Load the actual module. More...
 
void changeModule (const Common::UString &module, const Common::UString &entryLocation, ObjectType entryLocationType)
 Schedule a change to a new module. More...
 
void replaceModule ()
 Actually replace the currently running module. More...
 
bool getObjectLocation (const Common::UString &object, ObjectType location, float &entryX, float &entryY, float &entryZ, float &entryAngle)
 
bool getEntryObjectLocation (float &entryX, float &entryY, float &entryZ, float &entryAngle)
 
void getEntryIFOLocation (float &entryX, float &entryY, float &entryZ, float &entryAngle)
 
void enterArea ()
 
void leaveArea ()
 
void handleEvents ()
 
void handleActions ()
 
void handlePCMovement ()
 

Private Attributes

::Engines::Console_console
 
bool _hasModule
 Do we have a module? More...
 
bool _running
 Are we currently running a module? More...
 
std::list< Common::ChangeID_resources
 Resources added by the current module. More...
 
Aurora::IFOFile _ifo
 The current module's IFO. More...
 
Common::ScopedPtr< Creature_pc
 The player character we use. More...
 
int _currentTexturePack
 The current texture pack. More...
 
Common::ChangeID _textures
 Resources added by the current texture pack. More...
 
bool _exit
 Should we exit the module? More...
 
Common::UString _module
 The current module's name. More...
 
Common::UString _newModule
 The module we should change to. More...
 
Common::UString _entryLocation
 The tag of the object in the start location for this module. More...
 
ObjectType _entryLocationType
 The type(s) of the object in the start location for this module. More...
 
Common::ScopedPtr< Area_area
 The current module's area. More...
 
Common::ScopedPtr< DialogGUI_dialog
 Conversation/cutscene GUI. More...
 
EventQueue _eventQueue
 
ActionQueue _delayedActions
 
bool _freeCamEnabled
 
uint32 _prevTimestamp
 
float _frameTime
 
float _forwardBtnPressed
 
float _backwardsBtnPressed
 
bool _pcRunning
 
bool _inDialog
 
float _cameraHeight
 
Common::ScopedPtr< Engines::KotOR2::IngameGUI_ingame
 The ingame gui. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Engines::KotOR2::ScriptContainer
void clearScripts ()
 
void readScripts (const Aurora::GFF3Struct &gff)
 
void readScripts (const ScriptContainer &container)
 
- Protected Member Functions inherited from Aurora::NWScript::ObjectContainer
void lock ()
 
void unlock ()
 
- 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

Definition at line 57 of file module.h.

Member Typedef Documentation

◆ ActionQueue

typedef std::multiset<Action> Engines::KotOR2::Module::ActionQueue
private

Definition at line 161 of file module.h.

◆ EventQueue

Definition at line 160 of file module.h.

Member Enumeration Documentation

◆ ActionType

Enumerator
kActionNone 
kActionScript 

Definition at line 141 of file module.h.

Constructor & Destructor Documentation

◆ Module()

Engines::KotOR2::Module::Module ( ::Engines::Console console)

Definition at line 70 of file module.cpp.

References loadTexturePack().

Here is the call graph for this function:

◆ ~Module()

Engines::KotOR2::Module::~Module ( )

Definition at line 92 of file module.cpp.

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ addEvent()

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

Add a single event for consideration into the event queue.

Definition at line 438 of file module.cpp.

References _eventQueue.

◆ changeModule()

void Engines::KotOR2::Module::changeModule ( const Common::UString module,
const Common::UString entryLocation,
ObjectType  entryLocationType 
)
private

Schedule a change to a new module.

Definition at line 291 of file module.cpp.

References _entryLocation, _entryLocationType, and _newModule.

Referenced by load().

Here is the caller graph for this function:

◆ clear()

void Engines::KotOR2::Module::clear ( )

Clear the whole context.

Definition at line 99 of file module.cpp.

References unload().

Referenced by ~Module().

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

◆ clickObject()

void Engines::KotOR2::Module::clickObject ( Object object)

Definition at line 412 of file module.cpp.

References Common::UString::empty(), Engines::KotOR2::Creature::getConversation(), startConversation(), and Engines::KotOR2::ObjectContainer::toCreature().

Referenced by Engines::KotOR2::Area::click().

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

◆ delayScript()

void Engines::KotOR2::Module::delayScript ( const Common::UString script,
const Aurora::NWScript::ScriptState state,
Aurora::NWScript::Object owner,
Aurora::NWScript::Object triggerer,
uint32  delay 
)

◆ enter()

void Engines::KotOR2::Module::enter ( )
virtual

Enter the loaded module, starting it.

Reimplemented from Engines::KotOR2::Object.

Definition at line 318 of file module.cpp.

References _area, _cameraHeight, _console, _exit, _hasModule, _ifo, _ingame, Engines::KotOR2::Object::_name, _pc, _running, Common::UString::c_str(), Common::UString::empty(), enterArea(), getEntryIFOLocation(), getEntryObjectLocation(), Aurora::IFOFile::getStartMovie(), GfxMan, Engines::playVideo(), Engines::Console::printf(), and SatelliteCam.

Referenced by replaceModule().

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

◆ enterArea()

void Engines::KotOR2::Module::enterArea ( )
private

Definition at line 418 of file module.cpp.

References _area, _pc, Engines::KotOR2::kScriptEnter, Engines::KotOR2::kScriptModuleLoad, Engines::KotOR2::kScriptModuleStart, and Engines::KotOR2::ScriptContainer::runScript().

Referenced by enter().

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

◆ exit()

void Engines::KotOR2::Module::exit ( )

Exit the currently running module.

Definition at line 159 of file module.cpp.

References _exit.

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

Here is the caller graph for this function:

◆ getCurrentArea()

Area * Engines::KotOR2::Module::getCurrentArea ( )

Return the area the PC is currently in.

Definition at line 643 of file module.cpp.

References _area.

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

Here is the caller graph for this function:

◆ getEntryIFOLocation()

void Engines::KotOR2::Module::getEntryIFOLocation ( float &  entryX,
float &  entryY,
float &  entryZ,
float &  entryAngle 
)
private

Definition at line 394 of file module.cpp.

References _ifo, Aurora::IFOFile::getEntryDirection(), Aurora::IFOFile::getEntryPosition(), and Common::rad2deg().

Referenced by enter().

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

◆ getEntryObjectLocation()

bool Engines::KotOR2::Module::getEntryObjectLocation ( float &  entryX,
float &  entryY,
float &  entryZ,
float &  entryAngle 
)
private

Definition at line 390 of file module.cpp.

References _entryLocation, _entryLocationType, and getObjectLocation().

Referenced by enter().

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

◆ getIFO()

const Aurora::IFOFile & Engines::KotOR2::Module::getIFO ( ) const

Return the IFO of the currently loaded module.

Definition at line 635 of file module.cpp.

References _ifo.

◆ getName() [1/2]

const Common::UString & Engines::KotOR2::Module::getName ( ) const

Return the module's name.

Definition at line 639 of file module.cpp.

References Engines::KotOR2::Object::getName().

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

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

◆ getName() [2/2]

Common::UString Engines::KotOR2::Module::getName ( const Common::UString module)
static

◆ getObjectLocation()

bool Engines::KotOR2::Module::getObjectLocation ( const Common::UString object,
ObjectType  location,
float &  entryX,
float &  entryY,
float &  entryZ,
float &  entryAngle 
)
private

◆ getPC()

Creature * Engines::KotOR2::Module::getPC ( )

◆ handleActions()

void Engines::KotOR2::Module::handleActions ( )
private

Definition at line 535 of file module.cpp.

References _delayedActions, EventMan, kActionScript, and Engines::KotOR2::ScriptContainer::runScript().

Referenced by processEventQueue().

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

◆ handleEvents()

void Engines::KotOR2::Module::handleEvents ( )
private

◆ handlePCMovement()

void Engines::KotOR2::Module::handlePCMovement ( )
private

Definition at line 552 of file module.cpp.

References _area, _backwardsBtnPressed, _forwardBtnPressed, _frameTime, _pc, _pcRunning, FLT_MIN, Engines::KotOR2::kPCMovementSpeed, movePC(), Common::rad2deg(), and SatelliteCam.

Referenced by processEventQueue().

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

◆ isLoaded()

bool Engines::KotOR2::Module::isLoaded ( ) const

Is a module currently loaded and ready to run?

Definition at line 151 of file module.cpp.

References _area, _hasModule, and _pc.

◆ isRunning()

bool Engines::KotOR2::Module::isRunning ( ) const

Is a module currently running?

Definition at line 155 of file module.cpp.

References _exit, _running, and EventMan.

Referenced by load(), and processEventQueue().

Here is the caller graph for this function:

◆ leave()

void Engines::KotOR2::Module::leave ( )
virtual

Leave the running module, quitting it.

Reimplemented from Engines::KotOR2::Object.

Definition at line 403 of file module.cpp.

References _exit, _ingame, _running, and leaveArea().

Here is the call graph for this function:

◆ leaveArea()

void Engines::KotOR2::Module::leaveArea ( )
private

Definition at line 428 of file module.cpp.

References _area, _pc, Engines::KotOR2::kScriptExit, and Engines::KotOR2::ScriptContainer::runScript().

Referenced by leave(), and unload().

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

◆ load() [1/2]

void Engines::KotOR2::Module::load ( const Common::UString module,
const Common::UString entryLocation = "",
ObjectType  entryLocationType = kObjectTypeAll 
)

Load a module.

Definition at line 103 of file module.cpp.

References changeModule(), isRunning(), and loadModule().

Referenced by Engines::KotOR2::Console::cmdLoadModule(), and Engines::KotOR2::CharacterGeneration::start().

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

◆ load() [2/2]

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

Definition at line 167 of file module.cpp.

References loadArea(), loadIFO(), loadResources(), and loadTexturePack().

Referenced by loadModule(), and movePC().

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

◆ loadArea()

void Engines::KotOR2::Module::loadArea ( )
private

Definition at line 212 of file module.cpp.

References _area, _ifo, and Aurora::IFOFile::getEntryArea().

Referenced by load().

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

◆ loadIFO()

void Engines::KotOR2::Module::loadIFO ( )
private

◆ loadModule()

void Engines::KotOR2::Module::loadModule ( const Common::UString module,
const Common::UString entryLocation,
ObjectType  entryLocationType 
)
private

Load the actual module.

Definition at line 117 of file module.cpp.

References _entryLocation, _entryLocationType, _hasModule, _module, _newModule, Common::StackException::add(), Common::UString::c_str(), Common::UString::clear(), load(), and unload().

Referenced by load(), and replaceModule().

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

◆ loadResources()

void Engines::KotOR2::Module::loadResources ( )
private

Definition at line 174 of file module.cpp.

References _module, _resources, Engines::indexMandatoryArchive(), and Engines::indexOptionalArchive().

Referenced by load().

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

◆ loadTexturePack()

void Engines::KotOR2::Module::loadTexturePack ( )
private

Definition at line 222 of file module.cpp.

References _currentTexturePack, _textures, ConfigMan, Engines::indexOptionalArchive(), status(), TextureMan, Engines::KotOR2::texturePacks, and unloadTexturePack().

Referenced by load(), and Module().

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

◆ movedPC()

void Engines::KotOR2::Module::movedPC ( )

Notify the module that the PC was moved.

Definition at line 615 of file module.cpp.

References _area, _cameraHeight, _freeCamEnabled, _pc, CameraMan, and SatelliteCam.

Referenced by movePC().

Here is the caller graph for this function:

◆ movePC() [1/2]

void Engines::KotOR2::Module::movePC ( float  x,
float  y,
float  z 
)

Move the player character to this position within the current area.

Definition at line 595 of file module.cpp.

References _pc, and movedPC().

Referenced by Engines::KotOR2::Door::click(), handlePCMovement(), and movePC().

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

◆ movePC() [2/2]

void Engines::KotOR2::Module::movePC ( const Common::UString module,
const Common::UString object,
ObjectType  type = kObjectTypeAll 
)

Move the player character to this object within this area.

Definition at line 603 of file module.cpp.

References _module, Common::UString::empty(), getObjectLocation(), load(), and movePC().

Here is the call graph for this function:

◆ playAnimationOnActiveObject()

void Engines::KotOR2::Module::playAnimationOnActiveObject ( const Common::UString baseAnim,
const Common::UString headAnim 
)

◆ processEventQueue()

void Engines::KotOR2::Module::processEventQueue ( )

Process the current event queue.

Definition at line 442 of file module.cpp.

References _frameTime, _freeCamEnabled, _prevTimestamp, GfxMan, handleActions(), handleEvents(), handlePCMovement(), isRunning(), replaceModule(), and SatelliteCam.

Here is the call graph for this function:

◆ replaceModule()

void Engines::KotOR2::Module::replaceModule ( )
private

Actually replace the currently running module.

Definition at line 300 of file module.cpp.

References _console, _entryLocation, _entryLocationType, _exit, _newModule, Common::UString::empty(), enter(), Engines::Console::hide(), loadModule(), and unload().

Referenced by processEventQueue().

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

◆ showMenu()

void Engines::KotOR2::Module::showMenu ( )

Show the ingame main menu.

Definition at line 163 of file module.cpp.

Referenced by handleEvents().

Here is the caller graph for this function:

◆ startConversation()

void Engines::KotOR2::Module::startConversation ( const Common::UString name,
Aurora::NWScript::Object owner = 0 
)

◆ toggleFreeRoamCamera()

void Engines::KotOR2::Module::toggleFreeRoamCamera ( )

Definition at line 699 of file module.cpp.

References _area, _freeCamEnabled, and ConfigMan.

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

Here is the caller graph for this function:

◆ toggleTriggers()

void Engines::KotOR2::Module::toggleTriggers ( )

Definition at line 709 of file module.cpp.

References _area.

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

Here is the caller graph for this function:

◆ toggleWalkmesh()

void Engines::KotOR2::Module::toggleWalkmesh ( )

Definition at line 705 of file module.cpp.

References _area.

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

Here is the caller graph for this function:

◆ unload()

void Engines::KotOR2::Module::unload ( bool  completeUnload = true)
private

Unload the whole shebang.

Parameters
completeUnloadAlso unload the PC and texture packs. true: completely quit the module false: the PC can be transferred to a new module.

Definition at line 240 of file module.cpp.

References _delayedActions, _entryLocation, _entryLocationType, _eventQueue, _hasModule, _module, _newModule, Common::UString::clear(), GfxMan, Engines::KotOR2::kObjectTypeAll, leaveArea(), unloadArea(), unloadIFO(), unloadPC(), unloadResources(), and unloadTexturePack().

Referenced by clear(), loadModule(), and replaceModule().

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

◆ unloadArea()

void Engines::KotOR2::Module::unloadArea ( )
private

Definition at line 278 of file module.cpp.

References _area.

Referenced by unload().

Here is the caller graph for this function:

◆ unloadIFO()

void Engines::KotOR2::Module::unloadIFO ( )
private

Definition at line 274 of file module.cpp.

References _ifo, and Aurora::IFOFile::unload().

Referenced by unload().

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

◆ unloadPC()

void Engines::KotOR2::Module::unloadPC ( )
private

Definition at line 282 of file module.cpp.

References _pc.

Referenced by unload().

Here is the caller graph for this function:

◆ unloadResources()

void Engines::KotOR2::Module::unloadResources ( )
private

Definition at line 266 of file module.cpp.

References _resources, and Engines::deindexResources().

Referenced by unload().

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

◆ unloadTexturePack()

void Engines::KotOR2::Module::unloadTexturePack ( )
private

Definition at line 286 of file module.cpp.

References _currentTexturePack, _textures, and Engines::deindexResources().

Referenced by loadTexturePack(), and unload().

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

◆ usePC()

void Engines::KotOR2::Module::usePC ( Creature pc)

Use this character as the player character.

Definition at line 143 of file module.cpp.

References _pc.

Referenced by Engines::KotOR2::CharacterGeneration::start().

Here is the caller graph for this function:

Member Data Documentation

◆ _area

Common::ScopedPtr<Area> Engines::KotOR2::Module::_area
private

◆ _backwardsBtnPressed

float Engines::KotOR2::Module::_backwardsBtnPressed
private

Definition at line 202 of file module.h.

Referenced by handleEvents(), handlePCMovement(), and startConversation().

◆ _cameraHeight

float Engines::KotOR2::Module::_cameraHeight
private

Definition at line 205 of file module.h.

Referenced by enter(), and movedPC().

◆ _console

::Engines::Console* Engines::KotOR2::Module::_console
private

Definition at line 164 of file module.h.

Referenced by enter(), handleEvents(), and replaceModule().

◆ _currentTexturePack

int Engines::KotOR2::Module::_currentTexturePack
private

The current texture pack.

Definition at line 178 of file module.h.

Referenced by loadTexturePack(), and unloadTexturePack().

◆ _delayedActions

ActionQueue Engines::KotOR2::Module::_delayedActions
private

Definition at line 196 of file module.h.

Referenced by delayScript(), handleActions(), and unload().

◆ _dialog

Common::ScopedPtr<DialogGUI> Engines::KotOR2::Module::_dialog
private

Conversation/cutscene GUI.

Definition at line 193 of file module.h.

Referenced by handleEvents(), and startConversation().

◆ _entryLocation

Common::UString Engines::KotOR2::Module::_entryLocation
private

The tag of the object in the start location for this module.

Definition at line 188 of file module.h.

Referenced by changeModule(), getEntryObjectLocation(), loadModule(), replaceModule(), and unload().

◆ _entryLocationType

ObjectType Engines::KotOR2::Module::_entryLocationType
private

The type(s) of the object in the start location for this module.

Definition at line 190 of file module.h.

Referenced by changeModule(), getEntryObjectLocation(), loadModule(), replaceModule(), and unload().

◆ _eventQueue

EventQueue Engines::KotOR2::Module::_eventQueue
private

Definition at line 195 of file module.h.

Referenced by addEvent(), handleEvents(), and unload().

◆ _exit

bool Engines::KotOR2::Module::_exit
private

Should we exit the module?

Definition at line 182 of file module.h.

Referenced by enter(), exit(), isRunning(), leave(), and replaceModule().

◆ _forwardBtnPressed

float Engines::KotOR2::Module::_forwardBtnPressed
private

Definition at line 201 of file module.h.

Referenced by handleEvents(), handlePCMovement(), and startConversation().

◆ _frameTime

float Engines::KotOR2::Module::_frameTime
private

Definition at line 200 of file module.h.

Referenced by handlePCMovement(), and processEventQueue().

◆ _freeCamEnabled

bool Engines::KotOR2::Module::_freeCamEnabled
private

Definition at line 198 of file module.h.

Referenced by handleEvents(), movedPC(), processEventQueue(), and toggleFreeRoamCamera().

◆ _hasModule

bool Engines::KotOR2::Module::_hasModule
private

Do we have a module?

Definition at line 166 of file module.h.

Referenced by enter(), isLoaded(), loadModule(), and unload().

◆ _ifo

Aurora::IFOFile Engines::KotOR2::Module::_ifo
private

The current module's IFO.

Definition at line 173 of file module.h.

Referenced by enter(), getEntryIFOLocation(), getIFO(), loadArea(), loadIFO(), and unloadIFO().

◆ _inDialog

bool Engines::KotOR2::Module::_inDialog
private

Definition at line 204 of file module.h.

Referenced by handleEvents(), and startConversation().

◆ _ingame

Common::ScopedPtr<Engines::KotOR2::IngameGUI> Engines::KotOR2::Module::_ingame
private

The ingame gui.

Definition at line 207 of file module.h.

Referenced by enter(), handleEvents(), leave(), and startConversation().

◆ _module

Common::UString Engines::KotOR2::Module::_module
private

The current module's name.

Definition at line 184 of file module.h.

Referenced by loadModule(), loadResources(), movePC(), and unload().

◆ _newModule

Common::UString Engines::KotOR2::Module::_newModule
private

The module we should change to.

Definition at line 185 of file module.h.

Referenced by changeModule(), loadModule(), replaceModule(), and unload().

◆ _pc

Common::ScopedPtr<Creature> Engines::KotOR2::Module::_pc
private

The player character we use.

Definition at line 175 of file module.h.

Referenced by enter(), enterArea(), getPC(), handlePCMovement(), isLoaded(), leaveArea(), movedPC(), movePC(), unloadPC(), and usePC().

◆ _pcRunning

bool Engines::KotOR2::Module::_pcRunning
private

Definition at line 203 of file module.h.

Referenced by handlePCMovement().

◆ _prevTimestamp

uint32 Engines::KotOR2::Module::_prevTimestamp
private

Definition at line 199 of file module.h.

Referenced by processEventQueue().

◆ _resources

std::list<Common::ChangeID> Engines::KotOR2::Module::_resources
private

Resources added by the current module.

Definition at line 170 of file module.h.

Referenced by loadResources(), and unloadResources().

◆ _running

bool Engines::KotOR2::Module::_running
private

Are we currently running a module?

Definition at line 167 of file module.h.

Referenced by enter(), isRunning(), and leave().

◆ _textures

Common::ChangeID Engines::KotOR2::Module::_textures
private

Resources added by the current texture pack.

Definition at line 180 of file module.h.

Referenced by loadTexturePack(), and unloadTexturePack().


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