|
xoreos
0.0.5
|
#include <area.h>


Public Member Functions | |
| Area (Module &module, uint32 id) | |
| ~Area () | |
| const Common::UString & | getName () |
| Return the area's localized name. More... | |
| uint32 | getWidth () const |
| Return the width of the area, in pixels. More... | |
| uint32 | getHeight () const |
| Return the height of the area, in pixels. More... | |
| float | getStartX () const |
| Return the starting X position within this area. More... | |
| float | getStartY () const |
| Return the starting Y position within this area. More... | |
| void | enter () |
| Enter the area. More... | |
| void | leave () |
| Leave the area. More... | |
| void | show () |
| Show the area. More... | |
| void | hide () |
| Hide the area. 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... | |
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... | |
| 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 | 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 Events::Notifyable | |
| Notifyable () | |
| virtual | ~Notifyable () |
Static Public Member Functions | |
| static void | getCameraPosition (float x, float y, float &cameraX, float &cameraY, float &cameraZ) |
| Return a position that would position the camera on these coordinates within the area. More... | |
| static void | getWorldPosition (float x, float y, float z, float &worldX, float &worldY, float &worldZ) |
| Return a position that would position on object at these coordinates within the area. More... | |
Protected Member Functions | |
| void | notifyCameraMoved () |
| Notify the area that the camera has been moved. More... | |
Private Types | |
| typedef Common::PtrList< Object > | ObjectList |
| typedef std::map< uint32, Object * > | ObjectMap |
Private Member Functions | |
| void | load () |
| void | loadDefinition () |
| void | loadBackground () |
| void | loadMiniMap () |
| void | loadLayout () |
| void | loadObject (Object &object) |
| void | loadPlaceables (const Aurora::GFF4List &list) |
| void | getCameraLimits (float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ) const |
| void | checkActive () |
| void | setActive (Object *object) |
| Object * | getObjectAt (int x, int y) |
| void | highlightAll (bool enabled) |
Additional Inherited Members | |
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 |
|
private |
|
private |
Definition at line 54 of file area.cpp.
References Aurora::NWScript::Object::_id, _module, Engines::Sonic::ObjectContainer::addObject(), load(), and ObjectMan.

| Engines::Sonic::Area::~Area | ( | ) |
| void Engines::Sonic::Area::addEvent | ( | const Events::Event & | event | ) |
Add a single event for consideration into the area event queue.
Definition at line 178 of file area.cpp.
References _eventQueue.
|
private |
Definition at line 321 of file area.cpp.
References _highlightAll, _mutex, CursorMan, getObjectAt(), and setActive().
Referenced by notifyCameraMoved(), and processEventQueue().


|
virtual |
Enter the area.
Reimplemented from Engines::Sonic::Object.
Definition at line 156 of file area.cpp.
References _bgPanel, _startPosX, _startPosY, CameraMan, getCameraLimits(), getCameraPosition(), and Engines::Sonic::kCameraAngle.

|
private |
Definition at line 113 of file area.cpp.
References _height, _width, Common::deg2rad(), FLT_MAX, Engines::Sonic::kCameraAngle, Engines::Sonic::kScreenHeight, and Engines::Sonic::kScreenWidth.
Referenced by enter().


|
static |
Return a position that would position the camera on these coordinates within the area.
Definition at line 99 of file area.cpp.
References Common::deg2rad(), Engines::Sonic::kCameraAngle, Engines::Sonic::kCameraHeight, Engines::Sonic::kScreenHeight, and Engines::Sonic::kScreenWidth.
Referenced by enter().


| uint32 Engines::Sonic::Area::getHeight | ( | ) | const |
| const Common::UString & Engines::Sonic::Area::getName | ( | ) |
|
private |
Definition at line 296 of file area.cpp.
References _objectMap, Graphics::Renderable::getID(), and GfxMan.
Referenced by checkActive().


| float Engines::Sonic::Area::getStartX | ( | ) | const |
Return the starting X position within this area.
Definition at line 91 of file area.cpp.
References _startPosX.
| float Engines::Sonic::Area::getStartY | ( | ) | const |
Return the starting Y position within this area.
Definition at line 95 of file area.cpp.
References _startPosY.
| uint32 Engines::Sonic::Area::getWidth | ( | ) | const |
|
static |
Return a position that would position on object at these coordinates within the area.
Definition at line 105 of file area.cpp.
References Common::deg2rad(), Engines::Sonic::kCameraAngle, Engines::Sonic::kCameraHeight, Engines::Sonic::kScreenHeight, and Engines::Sonic::kScreenWidth.
Referenced by Engines::Sonic::Placeable::setPosition().


|
virtual |
Hide the area.
Reimplemented from Engines::Sonic::Object.
Definition at line 139 of file area.cpp.
References _bgPanel, _mmPanel, _objects, GfxMan, and removeFocus().
Referenced by ~Area().


|
private |
Definition at line 333 of file area.cpp.
References _highlightAll, and _objectMap.
Referenced by processEventQueue().

|
virtual |
Leave the area.
Reimplemented from Engines::Sonic::Object.
Definition at line 173 of file area.cpp.
References CameraMan.
|
private |
Definition at line 204 of file area.cpp.
References loadBackground(), loadDefinition(), loadLayout(), and loadMiniMap().
Referenced by Area().


|
private |
|
private |
Definition at line 211 of file area.cpp.
References _background, _height, Aurora::NWScript::Object::_id, _layout, _miniMap, _miniMapHeight, _miniMapWidth, _name, _numberChaoEggs, _numberRings, _sound, _soundBank, _soundMap, _soundMapBank, _soundType, _startPosX, _startPosY, _width, Common::UString::empty(), Aurora::GDAFile::getFloat(), Aurora::GDAFile::getInt(), Aurora::GDAFile::getRowCount(), Aurora::GDAFile::getString(), Aurora::GDAFile::hasRow(), TalkMan, and TwoDAReg.
Referenced by load().


|
private |
Definition at line 271 of file area.cpp.
References _layout, Aurora::NWScript::Object::_tag, Aurora::GFF4Struct::getList(), Aurora::GFF4Struct::getString(), Aurora::GFF4File::getTopLevel(), Aurora::GFF4Struct::hasField(), kAREID, Aurora::kFileTypeARE, and loadPlaceables().
Referenced by load().


|
private |
|
private |
Definition at line 281 of file area.cpp.
References _module, _objectMap, _objects, Engines::Sonic::ObjectContainer::addObject(), and Engines::Sonic::Object::getModelID().
Referenced by loadPlaceables().


|
private |
Definition at line 288 of file area.cpp.
References loadObject().
Referenced by loadLayout().


|
protectedvirtual |
Notify the area that the camera has been moved.
Reimplemented from Events::Notifyable.
Definition at line 350 of file area.cpp.
References checkActive().

| void Engines::Sonic::Area::processEventQueue | ( | ) |
Process the current event queue.
Definition at line 182 of file area.cpp.
References _eventQueue, checkActive(), highlightAll(), Events::kEventKeyDown, Events::kEventKeyUp, and Events::kEventMouseMove.

| void Engines::Sonic::Area::removeFocus | ( | ) |
Forcibly remove the focus from the currently highlighted object.
Definition at line 343 of file area.cpp.
References _activeObject, and Engines::Sonic::Object::leave().
Referenced by hide().


|
private |
Definition at line 308 of file area.cpp.
References _activeObject, Engines::Sonic::Object::enter(), and Engines::Sonic::Object::leave().
Referenced by checkActive().


|
virtual |
|
private |
Definition at line 144 of file area.h.
Referenced by removeFocus(), and setActive().
|
private |
Definition at line 112 of file area.h.
Referenced by loadBackground(), and loadDefinition().
|
private |
|
private |
Definition at line 136 of file area.h.
Referenced by addEvent(), and processEventQueue().
|
private |
Definition at line 116 of file area.h.
Referenced by getCameraLimits(), getHeight(), loadBackground(), and loadDefinition().
|
private |
Definition at line 146 of file area.h.
Referenced by checkActive(), and highlightAll().
|
private |
Definition at line 113 of file area.h.
Referenced by loadDefinition(), and loadLayout().
|
private |
Definition at line 121 of file area.h.
Referenced by loadDefinition(), and loadMiniMap().
|
private |
Definition at line 124 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 123 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 139 of file area.h.
Referenced by hide(), loadMiniMap(), and show().
|
private |
Definition at line 109 of file area.h.
Referenced by Area(), loadObject(), and ~Area().
|
private |
Definition at line 148 of file area.h.
Referenced by checkActive().
|
private |
Definition at line 111 of file area.h.
Referenced by getName(), and loadDefinition().
|
private |
Definition at line 134 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 133 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 142 of file area.h.
Referenced by getObjectAt(), highlightAll(), and loadObject().
|
private |
|
private |
Definition at line 129 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 131 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 126 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 128 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 130 of file area.h.
Referenced by loadDefinition().
|
private |
Definition at line 118 of file area.h.
Referenced by enter(), getStartX(), and loadDefinition().
|
private |
Definition at line 119 of file area.h.
Referenced by enter(), getStartY(), and loadDefinition().
|
private |
Definition at line 115 of file area.h.
Referenced by getCameraLimits(), getWidth(), loadBackground(), and loadDefinition().
1.8.14