xoreos
0.0.5
|
#include <module.h>
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 | loadTexturePack () |
Load texture pack used by the module. More... | |
void | usePC (Creature *pc) |
Use this character as the player character. More... | |
void | exit () |
Exit the currently running module. More... | |
const Aurora::IFOFile & | getIFO () const |
Return the IFO of the currently loaded module. More... | |
const Common::UString & | getName () const |
Return the module's name. More... | |
Area * | getCurrentArea () |
Return the area the PC is currently in. More... | |
Creature * | getPC () |
Return the currently playing PC. More... | |
Graphics::Aurora::FadeQuad & | getFadeQuad () |
Return the fade quad. 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... | |
size_t | getPartyMemberCount () |
Get the count of party members. More... | |
void | addToParty (Creature *creature) |
Add a creature to the party. More... | |
bool | isObjectPartyMember (Creature *creature) |
Check if the specified creature is a party member. More... | |
Creature * | getPartyMember (int index) |
Get a party member by index. More... | |
void | switchPlayerCharacter (int npc) |
Switch the player character. More... | |
void | showPartySelectionGUI (int forceNPC1, int forceNPC2) |
Show the party selection GUI. More... | |
void | addAvailablePartyMember (int slot, const Common::UString &templ) |
Add available party member by template. More... | |
bool | isAvailableCreature (int slot) |
Check if there is a party member available for this id. More... | |
void | setReturnStrref (uint32 id) |
Set the return string for the 'Return to Ebon Hawk' button. More... | |
void | setReturnQueryStrref (uint32 id) |
Set the string for the return dialog. More... | |
void | setReturnEnabled (bool enabled) |
Enable or disable the 'Return to Ebon Hawk' button. More... | |
void | setGlobalBoolean (const Common::UString &id, bool value) |
Set a global boolean. More... | |
bool | getGlobalBoolean (const Common::UString &id) const |
Get a global boolean. More... | |
void | setGlobalNumber (const Common::UString &id, int value) |
Get a global number. More... | |
int | getGlobalNumber (const Common::UString &id) const |
Set a global number. More... | |
void | enter () |
Enter the loaded module, starting it. More... | |
void | leave () |
Leave the running module, quitting it. More... | |
void | clickObject (Object *object) |
Open the inventory of a container. More... | |
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 | loadSavedGame (SavedGame *save) |
void | startConversation (const Common::UString &name, Aurora::NWScript::Object *owner=0) |
void | playAnimationOnActiveObject (const Common::UString &baseAnim, const Common::UString &headAnim) |
void | addItemToActiveObject (const Common::UString &item, int count) |
Public Member Functions inherited from Engines::KotOR::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::UString & | getName () const |
Return the object's name. More... | |
const Common::UString & | getDescription () const |
Return the object's description. More... | |
const Common::UString & | getPortrait () const |
Return the object's portrait. More... | |
void | setMaxHitPoints (int maxHP) |
Set the maximum hit points for the objects. More... | |
int | getMaxHitPoints () |
Get the maximum hit points for the objects. More... | |
void | setCurrentHitPoints (int hitpoints) |
Set the current hitpoints. More... | |
int | getCurrentHitPoints () |
Return the objects current hitpoints. More... | |
void | setMinOneHitPoints (bool enabled) |
Set if the object has a minimum of one hp. More... | |
bool | getMinOneHitPoints () const |
Get if the object has a minimum of one hp. 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) |
Room * | getRoom () |
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::UString & | getTag () const |
Public Member Functions inherited from Aurora::NWScript::VariableContainer | |
VariableContainer () | |
virtual | ~VariableContainer () |
bool | hasVariable (const Common::UString &var) const |
Variable & | getVariable (const Common::UString &var, Type type=kTypeVoid) |
const Variable & | getVariable (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::KotOR::ScriptContainer | |
ScriptContainer () | |
~ScriptContainer () | |
const Common::UString & | getScript (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::KotOR::ObjectContainer | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (KotOR::Object &object) |
Add an object to this container. More... | |
void | removeObject (KotOR::Object &object) |
Remove an object from this container. More... | |
::Aurora::NWScript::Object * | getFirstObjectByType (ObjectType type) const |
Return the first object of this type. More... | |
::Aurora::NWScript::ObjectSearch * | findObjectsByType (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... | |
Object * | getObjectByID (uint32 id) const |
Find a specific object by ID. More... | |
Object * | getFirstObject () const |
Return the first object. More... | |
Object * | getFirstObjectByTag (const Common::UString &tag) const |
Return the first object with this tag. More... | |
ObjectSearch * | findObjects () const |
Return a search context to iterate over all objects. More... | |
ObjectSearch * | findObjectsByTag (const Common::UString &tag) const |
Return a search context to iterate over all objects with this tag. More... | |
Private Types | |
enum | ActionType { kActionNone = 0, kActionScript = 1 } |
typedef std::list< Events::Event > | EventQueue |
typedef std::multiset< Action > | ActionQueue |
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 | 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 () |
void | stopCameraMovement () |
void | stopPCMovement () |
Additional Inherited Members | |
Protected Member Functions inherited from Engines::KotOR::ScriptContainer | |
void | clearScripts () |
void | readScripts (const Aurora::GFF3Struct &gff, bool clear=true) |
void | readScripts (const ScriptContainer &container) |
Protected Member Functions inherited from Aurora::NWScript::ObjectContainer | |
void | lock () |
void | unlock () |
Protected Attributes inherited from Engines::KotOR::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... | |
int | _currentHitPoints |
The current hitpoints of the object. More... | |
int | _maxHitPoints |
The maximum hitpoints of the object. More... | |
bool | _minOneHitPoint |
If the object should have at least one hitpoint. 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 |
|
private |
|
private |
|
private |
Engines::KotOR::Module::Module | ( | ::Engines::Console & | console | ) |
Definition at line 75 of file module.cpp.
Engines::KotOR::Module::~Module | ( | ) |
Definition at line 99 of file module.cpp.
References clear().
void Engines::KotOR::Module::addAvailablePartyMember | ( | int | slot, |
const Common::UString & | templ | ||
) |
Add available party member by template.
Definition at line 851 of file module.cpp.
References _availableParty.
Referenced by Engines::KotOR::Functions::addAvailableNPCByTemplate().
void Engines::KotOR::Module::addEvent | ( | const Events::Event & | event | ) |
Add a single event for consideration into the event queue.
Definition at line 525 of file module.cpp.
References _eventQueue.
void Engines::KotOR::Module::addItemToActiveObject | ( | const Common::UString & | item, |
int | count | ||
) |
Definition at line 1031 of file module.cpp.
References _area, _pc, Engines::KotOR::Inventory::addItem(), Engines::KotOR::Placeable::getInventory(), Engines::KotOR::Creature::getInventory(), Engines::KotOR::Placeable::hasInventory(), Engines::KotOR::Inventory::removeItem(), Engines::KotOR::ObjectContainer::toCreature(), and Engines::KotOR::ObjectContainer::toPlaceable().
Referenced by Engines::KotOR::Console::cmdAddItem().
void Engines::KotOR::Module::addToParty | ( | Creature * | creature | ) |
Add a creature to the party.
Definition at line 740 of file module.cpp.
References _ingame, _party, _pc, Engines::KotOR::ObjectContainer::addObject(), Engines::KotOR::Creature::setPosition(), and Engines::KotOR::Creature::show().
Referenced by enter(), and showPartySelectionGUI().
|
private |
Schedule a change to a new module.
Definition at line 338 of file module.cpp.
References _entryLocation, _entryLocationType, and _newModule.
Referenced by load().
void Engines::KotOR::Module::clear | ( | ) |
Clear the whole context.
Definition at line 106 of file module.cpp.
References unload().
Referenced by ~Module().
void Engines::KotOR::Module::clickObject | ( | Object * | object | ) |
Open the inventory of a container.
Definition at line 498 of file module.cpp.
References _ingame, _pc, _prevTimestamp, Engines::KotOR::Placeable::close(), Common::UString::empty(), EventMan, Engines::KotOR::Situated::getConversation(), Engines::KotOR::Creature::getConversation(), Engines::KotOR::Placeable::getInventory(), Engines::KotOR::Placeable::hasInventory(), Engines::KotOR::kScriptDisturbed, Engines::KotOR::ScriptContainer::runScript(), startConversation(), stopCameraMovement(), stopPCMovement(), Engines::KotOR::ObjectContainer::toCreature(), Engines::KotOR::ObjectContainer::toPlaceable(), and Engines::KotOR::ObjectContainer::toSituated().
Referenced by Engines::KotOR::Area::click().
void Engines::KotOR::Module::delayScript | ( | const Common::UString & | script, |
const Aurora::NWScript::ScriptState & | state, | ||
Aurora::NWScript::Object * | owner, | ||
Aurora::NWScript::Object * | triggerer, | ||
uint32 | delay | ||
) |
Definition at line 911 of file module.cpp.
References _delayedActions, EventMan, kActionScript, Engines::KotOR::Module::Action::owner, Engines::KotOR::Module::Action::script, Engines::KotOR::Module::Action::state, Engines::KotOR::Module::Action::timestamp, Engines::KotOR::Module::Action::triggerer, and Engines::KotOR::Module::Action::type.
Referenced by Engines::KotOR::Functions::assignCommand(), and Engines::KotOR::Functions::delayCommand().
|
virtual |
Enter the loaded module, starting it.
Reimplemented from Engines::KotOR::Object.
Definition at line 365 of file module.cpp.
References _area, _cameraHeight, _console, _exit, _hasModule, _ifo, _ingame, Engines::KotOR::Object::_name, _party, _pc, _pcPositionLoaded, _running, addToParty(), Common::UString::c_str(), Common::UString::empty(), enterArea(), getEntryIFOLocation(), getEntryObjectLocation(), Aurora::IFOFile::getStartMovie(), GfxMan, Engines::playVideo(), Engines::Console::printf(), Common::rad2deg(), SatelliteCam, and usePC().
Referenced by replaceModule().
|
private |
Definition at line 474 of file module.cpp.
References _area, _pc, GfxMan, Engines::KotOR::kScriptEnter, Engines::KotOR::kScriptModuleLoad, Engines::KotOR::kScriptModuleStart, and Engines::KotOR::ScriptContainer::runScript().
Referenced by enter().
void Engines::KotOR::Module::exit | ( | ) |
Exit the currently running module.
Definition at line 197 of file module.cpp.
References _exit.
Referenced by Engines::KotOR::Console::cmdExitModule().
Area * Engines::KotOR::Module::getCurrentArea | ( | ) |
Return the area the PC is currently in.
Definition at line 907 of file module.cpp.
References _area.
Referenced by Engines::KotOR::Console::cmdListRoomsVisibleFrom(), Engines::KotOR::Functions::destroyObject(), Engines::KotOR::Functions::getArea(), Engines::KotOR::DialogGUI::makeLookAtPC(), Engines::KotOR::DialogGUI::playDefaultAnimations(), and Engines::KotOR::DialogGUI::playTalkAnimations().
|
private |
Definition at line 456 of file module.cpp.
References _ifo, Aurora::IFOFile::getEntryDirection(), Aurora::IFOFile::getEntryPosition(), and Common::rad2deg().
Referenced by enter().
|
private |
Definition at line 452 of file module.cpp.
References _entryLocation, _entryLocationType, and getObjectLocation().
Referenced by enter().
Graphics::Aurora::FadeQuad & Engines::KotOR::Module::getFadeQuad | ( | ) |
Return the fade quad.
Definition at line 185 of file module.cpp.
References _fade.
Referenced by Engines::KotOR::Functions::setGlobalFadeIn(), and Engines::KotOR::Functions::setGlobalFadeOut().
bool Engines::KotOR::Module::getGlobalBoolean | ( | const Common::UString & | id | ) | const |
Get a global boolean.
Definition at line 879 of file module.cpp.
References _globalBooleans.
Referenced by Engines::KotOR::Functions::getGlobalBoolean().
int Engines::KotOR::Module::getGlobalNumber | ( | const Common::UString & | id | ) | const |
Set a global number.
Definition at line 891 of file module.cpp.
References _globalNumbers.
Referenced by Engines::KotOR::Functions::getGlobalNumber().
const Aurora::IFOFile & Engines::KotOR::Module::getIFO | ( | ) | const |
Return the IFO of the currently loaded module.
Definition at line 899 of file module.cpp.
References _ifo.
const Common::UString & Engines::KotOR::Module::getName | ( | ) | const |
Return the module's name.
Definition at line 903 of file module.cpp.
References Engines::KotOR::Object::getName().
Referenced by Engines::KotOR::Console::cmdListModules().
|
static |
Definition at line 927 of file module.cpp.
References ConfigMan, Aurora::GFF3Struct::getList(), Aurora::GFF3Struct::getString(), Aurora::GFF3File::getTopLevel(), Aurora::kFileTypeARE, Aurora::kFileTypeIFO, and MKTAG.
|
private |
Definition at line 425 of file module.cpp.
References Aurora::NWScript::ObjectContainer::findObjectsByTag(), Aurora::NWScript::ObjectSearch::get(), Engines::KotOR::Object::getPosition(), Engines::KotOR::Object::getType(), Aurora::NWScript::ObjectSearch::next(), and Engines::KotOR::ObjectContainer::toObject().
Referenced by getEntryObjectLocation(), and movePC().
Creature * Engines::KotOR::Module::getPartyMember | ( | int | index | ) |
Get a party member by index.
Definition at line 764 of file module.cpp.
References _party.
Referenced by Engines::KotOR::Functions::getPartyMemberByIndex().
size_t Engines::KotOR::Module::getPartyMemberCount | ( | ) |
Creature * Engines::KotOR::Module::getPC | ( | ) |
Return the currently playing PC.
Definition at line 181 of file module.cpp.
References _pc.
Referenced by Engines::KotOR::Functions::actionMoveToObject(), Engines::KotOR::Functions::clearAllActions(), Engines::KotOR::Area::click(), Engines::KotOR::Console::cmdGetPCRoom(), Engines::KotOR::Area::evaluateTriggers(), Engines::KotOR::ActionExecutor::executeFollowLeader(), Engines::KotOR::Functions::getFirstPC(), Engines::KotOR::Functions::getItemInSlot(), Engines::KotOR::Functions::getPCSpeaker(), Engines::KotOR::DialogGUI::makeLookAtPC(), Engines::KotOR::Area::notifyPCMoved(), Engines::KotOR::Menu::showMenu(), and Engines::KotOR::Functions::signalEvent().
|
private |
Definition at line 678 of file module.cpp.
References _delayedActions, EventMan, kActionScript, and Engines::KotOR::ScriptContainer::runScript().
Referenced by processEventQueue().
|
private |
Definition at line 557 of file module.cpp.
References _area, _backwardsBtnPressed, _console, _dialog, _eventQueue, _forwardBtnPressed, _freeCamEnabled, _inDialog, _ingame, CameraMan, FreeRoamCam, Engines::Console::isVisible(), Events::kEventKeyDown, Events::kEventKeyUp, Engines::Console::processEvent(), SatelliteCam, Engines::Console::show(), and showMenu().
Referenced by processEventQueue().
|
private |
Definition at line 627 of file module.cpp.
References _area, _backwardsBtnPressed, _forwardBtnPressed, _frameTime, _ingame, _pc, _pcRunning, CameraMan, FLT_MIN, movePC(), Common::rad2deg(), SatelliteCam, and SoundMan.
Referenced by processEventQueue().
bool Engines::KotOR::Module::isAvailableCreature | ( | int | slot | ) |
Check if there is a party member available for this id.
Definition at line 859 of file module.cpp.
References _availableParty.
Referenced by Engines::KotOR::Functions::isAvailableCreature().
bool Engines::KotOR::Module::isLoaded | ( | ) | const |
Is a module currently loaded and ready to run?
Definition at line 189 of file module.cpp.
References _area, _hasModule, and _pc.
bool Engines::KotOR::Module::isObjectPartyMember | ( | Creature * | creature | ) |
Check if the specified creature is a party member.
Definition at line 760 of file module.cpp.
References _party.
Referenced by Engines::KotOR::Functions::isObjectPartyMember().
bool Engines::KotOR::Module::isRunning | ( | ) | const |
Is a module currently running?
Definition at line 193 of file module.cpp.
References _exit, _running, and EventMan.
Referenced by load(), and processEventQueue().
|
virtual |
Leave the running module, quitting it.
Reimplemented from Engines::KotOR::Object.
Definition at line 465 of file module.cpp.
References _exit, _ingame, _running, and leaveArea().
Referenced by Engines::KotOR::Menu::callbackRun().
|
private |
Definition at line 488 of file module.cpp.
References _area, _pc, Engines::KotOR::kScriptExit, and Engines::KotOR::ScriptContainer::runScript().
Referenced by leave(), and unload().
void Engines::KotOR::Module::load | ( | const Common::UString & | module, |
const Common::UString & | entryLocation = "" , |
||
ObjectType | entryLocationType = kObjectTypeAll |
||
) |
Load a module.
Definition at line 110 of file module.cpp.
References changeModule(), isRunning(), and loadModule().
Referenced by Engines::KotOR::Console::cmdLoadModule(), and Engines::KotOR::CharacterGenerationMenu::start().
|
private |
Definition at line 205 of file module.cpp.
References loadArea(), loadIFO(), loadResources(), and loadTexturePack().
Referenced by loadModule(), loadSavedGame(), and movePC().
|
private |
Definition at line 250 of file module.cpp.
References _area, _ifo, and Aurora::IFOFile::getEntryArea().
Referenced by load().
|
private |
Definition at line 241 of file module.cpp.
References _ifo, Engines::KotOR::Object::_name, Aurora::NWScript::Object::_tag, Aurora::IFOFile::getGFF(), Aurora::IFOFile::getName(), Aurora::LocString::getString(), Aurora::IFOFile::getTag(), Aurora::IFOFile::load(), and Engines::KotOR::ScriptContainer::readScripts().
Referenced by load().
|
private |
Load the actual module.
Definition at line 124 of file module.cpp.
References _area, _console, _entryLocation, _entryLocationType, _hasModule, _ingame, _module, _newModule, Common::StackException::add(), Common::UString::c_str(), Common::UString::clear(), Common::UString::contains(), Common::UString::end(), Common::UString::findFirst(), Common::UString::getPosition(), Engines::KotOR::GUI::hide(), load(), Engines::KotOR::GUI::show(), Common::UString::substr(), and unload().
Referenced by load(), and replaceModule().
|
private |
Definition at line 212 of file module.cpp.
References _module, _resources, Engines::indexMandatoryArchive(), and Engines::indexOptionalArchive().
Referenced by load().
void Engines::KotOR::Module::loadSavedGame | ( | SavedGame * | save | ) |
Definition at line 977 of file module.cpp.
References _pcPositionLoaded, Common::exceptionDispatcherWarning(), Engines::KotOR::SavedGame::getModuleName(), Engines::KotOR::SavedGame::getPC(), Engines::KotOR::SavedGame::isPCLoaded(), load(), and usePC().
Referenced by Engines::KotOR::SaveLoadMenu::tryLoadGame().
void Engines::KotOR::Module::loadTexturePack | ( | ) |
Load texture pack used by the module.
Definition at line 260 of file module.cpp.
References _currentTexturePack, _textures, ConfigMan, Engines::indexOptionalArchive(), status(), TextureMan, Engines::KotOR::texturePacks, and unloadTexturePack().
Referenced by Engines::KotOR::MainMenu::createClassSelection(), load(), and Engines::KotOR::MainMenu::MainMenu().
void Engines::KotOR::Module::movedPC | ( | ) |
Notify the module that the PC was moved.
Definition at line 716 of file module.cpp.
References _area, _cameraHeight, _freeCamEnabled, _pc, CameraMan, and SatelliteCam.
Referenced by movePC().
void Engines::KotOR::Module::movePC | ( | float | x, |
float | y, | ||
float | z | ||
) |
Move the player character to this position within the current area.
Definition at line 695 of file module.cpp.
References _ingame, _pc, and movedPC().
Referenced by Engines::KotOR::Door::click(), handlePCMovement(), and movePC().
void Engines::KotOR::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 704 of file module.cpp.
References _module, Common::UString::empty(), getObjectLocation(), load(), and movePC().
void Engines::KotOR::Module::playAnimationOnActiveObject | ( | const Common::UString & | baseAnim, |
const Common::UString & | headAnim | ||
) |
Definition at line 1014 of file module.cpp.
References _area, Common::UString::empty(), Engines::KotOR::Object::playAnimation(), Engines::KotOR::Creature::playDefaultHeadAnimation(), Engines::KotOR::Creature::playHeadAnimation(), and Engines::KotOR::ObjectContainer::toCreature().
Referenced by Engines::KotOR::Console::cmdPlayAnim().
void Engines::KotOR::Module::processEventQueue | ( | ) |
Process the current event queue.
Definition at line 529 of file module.cpp.
References _area, _frameTime, _freeCamEnabled, _prevTimestamp, GfxMan, handleActions(), handleEvents(), handlePCMovement(), isRunning(), replaceModule(), and SatelliteCam.
|
private |
Actually replace the currently running module.
Definition at line 347 of file module.cpp.
References _console, _entryLocation, _entryLocationType, _exit, _newModule, Common::UString::empty(), enter(), Engines::Console::hide(), loadModule(), and unload().
Referenced by processEventQueue().
void Engines::KotOR::Module::setGlobalBoolean | ( | const Common::UString & | id, |
bool | value | ||
) |
Set a global boolean.
Definition at line 875 of file module.cpp.
References _globalBooleans.
Referenced by Engines::KotOR::Functions::setGlobalBoolean().
void Engines::KotOR::Module::setGlobalNumber | ( | const Common::UString & | id, |
int | value | ||
) |
Get a global number.
Definition at line 887 of file module.cpp.
References _globalNumbers.
Referenced by Engines::KotOR::Functions::setGlobalNumber().
void Engines::KotOR::Module::setReturnEnabled | ( | bool | enabled | ) |
Enable or disable the 'Return to Ebon Hawk' button.
Definition at line 871 of file module.cpp.
References _ingame.
Referenced by Engines::KotOR::Functions::setReturnStrref().
void Engines::KotOR::Module::setReturnQueryStrref | ( | uint32 | id | ) |
Set the string for the return dialog.
Definition at line 867 of file module.cpp.
References _ingame.
Referenced by Engines::KotOR::Functions::setReturnStrref().
void Engines::KotOR::Module::setReturnStrref | ( | uint32 | id | ) |
Set the return string for the 'Return to Ebon Hawk' button.
Definition at line 863 of file module.cpp.
References _ingame.
Referenced by Engines::KotOR::Functions::setReturnStrref().
void Engines::KotOR::Module::showMenu | ( | ) |
Show the ingame main menu.
Definition at line 201 of file module.cpp.
Referenced by handleEvents().
void Engines::KotOR::Module::showPartySelectionGUI | ( | int | forceNPC1, |
int | forceNPC2 | ||
) |
Show the party selection GUI.
Definition at line 802 of file module.cpp.
References _availableParty, _dialog, _inDialog, _ingame, _partySelection, addToParty(), Engines::KotOR::PartyConfiguration::canCancel, Engines::KotOR::PartyConfiguration::forceNPC1, Engines::KotOR::PartyConfiguration::forceNPC2, Engines::KotOR::PartyConfiguration::slotSelected, and Engines::KotOR::PartyConfiguration::slotTemplate.
Referenced by Engines::KotOR::Functions::showPartySelectionGUI().
void Engines::KotOR::Module::startConversation | ( | const Common::UString & | name, |
Aurora::NWScript::Object * | owner = 0 |
||
) |
Definition at line 987 of file module.cpp.
References _dialog, _inDialog, _ingame, Common::UString::empty(), Engines::KotOR::Creature::getConversation(), stopCameraMovement(), stopPCMovement(), and Engines::KotOR::ObjectContainer::toCreature().
Referenced by Engines::KotOR::Functions::actionStartConversation(), and clickObject().
|
private |
Definition at line 1059 of file module.cpp.
References SatelliteCam.
Referenced by clickObject(), and startConversation().
|
private |
Definition at line 1063 of file module.cpp.
References _backwardsBtnPressed, _forwardBtnPressed, _pc, and _pcRunning.
Referenced by clickObject(), and startConversation().
void Engines::KotOR::Module::switchPlayerCharacter | ( | int | npc | ) |
Switch the player character.
Definition at line 773 of file module.cpp.
References _cameraHeight, _freeCamEnabled, _ingame, _party, _pc, CameraMan, and SatelliteCam.
void Engines::KotOR::Module::toggleFreeRoamCamera | ( | ) |
Definition at line 963 of file module.cpp.
References _area, _freeCamEnabled, and ConfigMan.
Referenced by Engines::KotOR::Console::cmdFlyCam().
void Engines::KotOR::Module::toggleTriggers | ( | ) |
Definition at line 973 of file module.cpp.
References _area.
Referenced by Engines::KotOR::Console::cmdShowTriggers().
void Engines::KotOR::Module::toggleWalkmesh | ( | ) |
Definition at line 969 of file module.cpp.
References _area.
Referenced by Engines::KotOR::Console::cmdShowWalkmesh().
|
private |
Unload the whole shebang.
completeUnload | Also unload the PC and texture packs. true: completely quit the module false: the PC can be transferred to a new module. |
Definition at line 280 of file module.cpp.
References _availableParty, _delayedActions, _entryLocation, _entryLocationType, _eventQueue, _globalBooleans, _globalNumbers, _hasModule, _module, _newModule, _party, Common::UString::clear(), GfxMan, Engines::KotOR::kObjectTypeAll, leaveArea(), unloadArea(), unloadIFO(), unloadPC(), unloadResources(), and unloadTexturePack().
Referenced by clear(), loadModule(), and replaceModule().
|
private |
Definition at line 325 of file module.cpp.
References _area.
Referenced by unload().
|
private |
Definition at line 321 of file module.cpp.
References _ifo, and Aurora::IFOFile::unload().
Referenced by unload().
|
private |
Definition at line 329 of file module.cpp.
References _pc.
Referenced by unload().
|
private |
Definition at line 313 of file module.cpp.
References _resources, and Engines::deindexResources().
Referenced by unload().
|
private |
Definition at line 333 of file module.cpp.
References _currentTexturePack, _textures, and Engines::deindexResources().
Referenced by loadTexturePack(), and unload().
void Engines::KotOR::Module::usePC | ( | Creature * | pc | ) |
Use this character as the player character.
Definition at line 177 of file module.cpp.
References _pc.
Referenced by enter(), loadSavedGame(), and Engines::KotOR::CharacterGenerationMenu::start().
|
private |
The current module's area.
Definition at line 242 of file module.h.
Referenced by addItemToActiveObject(), enter(), enterArea(), getCurrentArea(), handleEvents(), handlePCMovement(), isLoaded(), leaveArea(), loadArea(), loadModule(), movedPC(), playAnimationOnActiveObject(), processEventQueue(), toggleFreeRoamCamera(), toggleTriggers(), toggleWalkmesh(), and unloadArea().
|
private |
Definition at line 259 of file module.h.
Referenced by addAvailablePartyMember(), isAvailableCreature(), showPartySelectionGUI(), and unload().
|
private |
Definition at line 269 of file module.h.
Referenced by handleEvents(), handlePCMovement(), and stopPCMovement().
|
private |
Definition at line 273 of file module.h.
Referenced by enter(), movedPC(), and switchPlayerCharacter().
|
private |
Definition at line 214 of file module.h.
Referenced by enter(), handleEvents(), loadModule(), and replaceModule().
|
private |
The current texture pack.
Definition at line 228 of file module.h.
Referenced by loadTexturePack(), and unloadTexturePack().
|
private |
Definition at line 263 of file module.h.
Referenced by delayScript(), handleActions(), and unload().
|
private |
Conversation/cutscene GUI.
Definition at line 248 of file module.h.
Referenced by handleEvents(), showPartySelectionGUI(), and startConversation().
|
private |
The tag of the object in the start location for this module.
Definition at line 238 of file module.h.
Referenced by changeModule(), getEntryObjectLocation(), loadModule(), replaceModule(), and unload().
|
private |
The type(s) of the object in the start location for this module.
Definition at line 240 of file module.h.
Referenced by changeModule(), getEntryObjectLocation(), loadModule(), replaceModule(), and unload().
|
private |
Definition at line 262 of file module.h.
Referenced by addEvent(), handleEvents(), and unload().
|
private |
Should we exit the module?
Definition at line 232 of file module.h.
Referenced by enter(), exit(), isRunning(), leave(), and replaceModule().
|
private |
Definition at line 244 of file module.h.
Referenced by getFadeQuad().
|
private |
Definition at line 268 of file module.h.
Referenced by handleEvents(), handlePCMovement(), and stopPCMovement().
|
private |
Definition at line 267 of file module.h.
Referenced by handlePCMovement(), and processEventQueue().
|
private |
Definition at line 265 of file module.h.
Referenced by handleEvents(), movedPC(), processEventQueue(), switchPlayerCharacter(), and toggleFreeRoamCamera().
|
private |
Definition at line 253 of file module.h.
Referenced by getGlobalBoolean(), setGlobalBoolean(), and unload().
|
private |
Definition at line 254 of file module.h.
Referenced by getGlobalNumber(), setGlobalNumber(), and unload().
|
private |
Do we have a module?
Definition at line 216 of file module.h.
Referenced by enter(), isLoaded(), loadModule(), and unload().
|
private |
The current module's IFO.
Definition at line 223 of file module.h.
Referenced by enter(), getEntryIFOLocation(), getIFO(), loadArea(), loadIFO(), and unloadIFO().
|
private |
Definition at line 272 of file module.h.
Referenced by handleEvents(), showPartySelectionGUI(), and startConversation().
|
private |
The ingame ui.
Definition at line 246 of file module.h.
Referenced by addToParty(), clickObject(), enter(), handleEvents(), handlePCMovement(), leave(), loadModule(), movePC(), setReturnEnabled(), setReturnQueryStrref(), setReturnStrref(), showPartySelectionGUI(), startConversation(), and switchPlayerCharacter().
|
private |
The current module's name.
Definition at line 234 of file module.h.
Referenced by loadModule(), loadResources(), movePC(), and unload().
|
private |
The module we should change to.
Definition at line 235 of file module.h.
Referenced by changeModule(), loadModule(), replaceModule(), and unload().
|
private |
Definition at line 258 of file module.h.
Referenced by addToParty(), enter(), getPartyMember(), getPartyMemberCount(), isObjectPartyMember(), switchPlayerCharacter(), and unload().
|
private |
Definition at line 250 of file module.h.
Referenced by showPartySelectionGUI().
|
private |
The player character we use.
Definition at line 225 of file module.h.
Referenced by addItemToActiveObject(), addToParty(), clickObject(), enter(), enterArea(), getPC(), handlePCMovement(), isLoaded(), leaveArea(), movedPC(), movePC(), stopPCMovement(), switchPlayerCharacter(), unloadPC(), and usePC().
|
private |
Definition at line 271 of file module.h.
Referenced by enter(), and loadSavedGame().
|
private |
Definition at line 270 of file module.h.
Referenced by handlePCMovement(), and stopPCMovement().
|
private |
Definition at line 266 of file module.h.
Referenced by clickObject(), and processEventQueue().
|
private |
Resources added by the current module.
Definition at line 220 of file module.h.
Referenced by loadResources(), and unloadResources().
|
private |
Are we currently running a module?
Definition at line 217 of file module.h.
Referenced by enter(), isRunning(), and leave().
|
private |
Resources added by the current texture pack.
Definition at line 230 of file module.h.
Referenced by loadTexturePack(), and unloadTexturePack().