xoreos
0.0.5
|
#include <module.h>
Public Member Functions | |
Module (::Engines::Console &console) | |
~Module () | |
void | clear () |
Clear the whole context. More... | |
void | run () |
Run the module. More... | |
void | exit () |
Exit the module. More... | |
bool | isRunning () const |
Is the module currently running? More... | |
Area * | getCurrentArea () |
Return the area the PC is currently in. More... | |
void | movePC (int32 area) |
Move the player character to this area. More... | |
Public Member Functions inherited from Engines::Sonic::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. More... | |
virtual void | hide () |
Hide the object's model. More... | |
uint32 | getModelID () const |
Return the ID of the object's model. 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... | |
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... | |
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::Sonic::ObjectContainer | |
ObjectContainer () | |
~ObjectContainer () | |
void | clearObjects () |
void | addObject (Sonic::Object &object) |
Add an object to this container. More... | |
void | removeObject (Sonic::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... | |
Protected Member Functions | |
void | unload () |
void | loadArea () |
void | unloadArea () |
void | handleEvents () |
bool | handleCameraEvents (const Events::Event &event) |
Protected Member Functions inherited from Aurora::NWScript::ObjectContainer | |
void | lock () |
void | unlock () |
Protected Attributes | |
::Engines::Console * | _console |
bool | _running |
Are we currently running a module? More... | |
bool | _exit |
Should we exit the module? More... | |
int32 | _newArea |
The new area to enter. More... | |
Common::ScopedPtr< Area > | _area |
The current area. More... | |
Protected Attributes inherited from Engines::Sonic::Object | |
ObjectType | _type |
The object's type. More... | |
uint32 | _modelID |
The ID of the object's model. More... | |
float | _position [3] |
The object's position. More... | |
float | _orientation [4] |
The object's orientation. More... | |
Protected Attributes inherited from Aurora::NWScript::Object | |
uint32 | _id |
Common::UString | _tag |
Additional Inherited Members | |
Static Public Member Functions inherited from Engines::Sonic::ObjectContainer | |
static Sonic::Object * | toObject (::Aurora::NWScript::Object *object) |
static Module * | toModule (Aurora::NWScript::Object *object) |
static Area * | toArea (Aurora::NWScript::Object *object) |
static Placeable * | toPlaceable (Aurora::NWScript::Object *object) |
Engines::Sonic::Module::Module | ( | ::Engines::Console & | console | ) |
Definition at line 44 of file module.cpp.
References Aurora::NWScript::Object::_id, Common::generateIDNumber(), and ObjectMan.
Engines::Sonic::Module::~Module | ( | ) |
Definition at line 50 of file module.cpp.
References clear(), and ObjectMan.
void Engines::Sonic::Module::clear | ( | ) |
Clear the whole context.
Definition at line 59 of file module.cpp.
References unload().
Referenced by ~Module().
void Engines::Sonic::Module::exit | ( | ) |
Area * Engines::Sonic::Module::getCurrentArea | ( | ) |
Return the area the PC is currently in.
Definition at line 199 of file module.cpp.
References _area.
|
protected |
Definition at line 164 of file module.cpp.
References CameraMan, Events::kEventKeyDown, and Events::kEventMouseMove.
Referenced by handleEvents().
|
protected |
Definition at line 134 of file module.cpp.
References _area, _console, CameraMan, EventMan, handleCameraEvents(), Engines::Console::isVisible(), Events::kEventKeyDown, Engines::Console::processEvent(), and Engines::Console::show().
Referenced by run().
bool Engines::Sonic::Module::isRunning | ( | ) | const |
|
protected |
Definition at line 104 of file module.cpp.
References _area, _exit, _newArea, and unloadArea().
Referenced by run().
void Engines::Sonic::Module::movePC | ( | int32 | area | ) |
Move the player character to this area.
Definition at line 203 of file module.cpp.
References _newArea.
Referenced by Engines::Sonic::Console::cmdGotoArea().
void Engines::Sonic::Module::run | ( | ) |
Run the module.
Definition at line 63 of file module.cpp.
References _exit, _newArea, _running, Common::StackException::add(), EventMan, handleEvents(), and loadArea().
|
protected |
Definition at line 130 of file module.cpp.
References unloadArea().
Referenced by clear().
|
protected |
Definition at line 121 of file module.cpp.
References _area.
Referenced by loadArea(), and unload().
|
protected |
The current area.
Definition at line 76 of file module.h.
Referenced by getCurrentArea(), handleEvents(), loadArea(), and unloadArea().
|
protected |
Definition at line 69 of file module.h.
Referenced by handleEvents().
|
protected |
Should we exit the module?
Definition at line 72 of file module.h.
Referenced by exit(), loadArea(), and run().
|
protected |
The new area to enter.
Definition at line 74 of file module.h.
Referenced by loadArea(), movePC(), and run().
|
protected |
Are we currently running a module?
Definition at line 71 of file module.h.
Referenced by isRunning(), and run().