55 _module(&module),
_width(0),
_height(0), _startPosX(0.0f), _startPosY(0.0f),
56 _miniMapWidth(0), _miniMapHeight(0), _soundMapBank(-1), _sound(-1), _soundType(-1), _soundBank(-1),
57 _numberRings(0), _numberChaoEggs(0), _activeObject(0), _highlightAll(false) {
110 worldZ = floor(worldZ);
114 float &maxX,
float &maxY,
float &maxZ)
const {
160 float x, y, z, minX, minY, minZ, maxX, maxY, maxZ;
165 CameraMan.limit(minX, minY, minZ, maxX, maxY, maxZ);
183 bool hasMove =
false;
184 for (std::list<Events::Event>::const_iterator e =
_eventQueue.begin();
190 if (e->key.keysym.sym == SDLK_TAB)
193 if (e->key.keysym.sym == SDLK_TAB)
228 if ((tileSizeX != 64) || (tileSizeY != 64))
229 throw Common::Exception(
"Unsupported tile dimensions (%ux%u)", tileSizeX, tileSizeY);
262 throw Common::Exception(
"Background and area dimensions don't match (%ux%u vs. %ux%u)",
289 for (Aurora::GFF4List::const_iterator p = list.begin(); p != list.end(); ++p) {
340 o->second->highlight(enabled);
static const float kScreenHeight
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
void addObject(Sonic::Object &object)
Add an object to this container.
The context holding a Sonic Chronicles: The Dark Brotherhood area.
Common::ScopedPtr< AreaBackground > _bgPanel
Handling BioWare's GDAs (2DAs, two-dimensional array, within V4.0 GFFs).
int32 getInt(size_t row, uint32 columnHash, int32 def=0) const
The global graphics manager.
#define TalkMan
Shortcut for accessing the talk manager.
Common::UString getString(uint32 field, Common::Encoding encoding, const Common::UString &def="") const
Return a field string, read from the given encoding.
A class holding an UTF-8 string.
Common::UString _background
Common::UString _soundMap
float getStartY() const
Return the starting Y position within this area.
float getFloat(size_t row, uint32 columnHash, float def=0.0f) const
Area(Module &module, uint32 id)
A GFF (generic file format) V4.0/V4.1 file, found in Dragon Age: Origins, Dragon Age 2 and Sonic Chro...
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.
virtual void enter()
The cursor entered the object.
static const float kCameraAngle
uint32 getModelID() const
Return the ID of the object's model.
Exception that provides a stack of explanations.
Basic Sonic Chronicles: The Dark Brotherhood types and defines.
An object within a Sonic area.
Keyboard key was pressed.
std::vector< const GFF4Struct * > GFF4List
Handling version V4.0/V4.1 of BioWare's GFFs (generic file format).
Basic exceptions to throw.
void show()
Show the area.
void setActive(Object *object)
Utility templates and functions.
void processEventQueue()
Process the current event queue.
void getCameraLimits(float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ) const
The area mini map in Sonic Chronicles: The Dark Brotherhood.
static const float kScreenWidth
Common::ScopedPtr< AreaMiniMap > _mmPanel
void loadObject(Object &object)
The scrolling background image panel in Sonic Chronicles: The Dark Brotherhood.
void hide()
Hide the area.
bool hasField(uint32 field) const
Does this specific field exist?
uint32 getWidth() const
Return the width of the area, in pixels.
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
#define CursorMan
Shortcut for accessing the cursor manager.
Convenience class that locks a mutex on creation and unlocks it on destruction.
Object * getObjectAt(int x, int y)
size_t getRowCount() const
Return the number of rows in the array.
The Aurora cursor manager.
static const uint32 kAREID
void removeFocus()
Forcibly remove the focus from the currently highlighted object.
An object that can be displayed by the graphics manager.
uint32 getHeight() const
Return the height of the area, in pixels.
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.
The context needed to run a Sonic Chronicles: The Dark Brotherhood module.
Common::UString getString(size_t row, uint32 columnHash, const Common::UString &def="") const
uint32 getID() const
Get the object's unique ID.
virtual void leave()
The cursor left the object.
void highlightAll(bool enabled)
The global talk manager for Aurora strings.
void addEvent(const Events::Event &event)
Add a single event for consideration into the area event queue.
bool hasRow(size_t row) const
Does this row exist in the GDA?
#define CameraMan
Shortcut for accessing the camera manager.
std::list< Events::Event > _eventQueue
A placeable object in a Sonic Chronicles: The Dark Brotherhood area.
static const float kCameraHeight
void removeObject(Sonic::Object &object)
Remove an object from this container.
const GFF4List & getList(uint32 field) const
float getStartX() const
Return the starting X position within this area.
void notifyCameraMoved()
Notify the area that the camera has been moved.
Keyboard key was released.
static float deg2rad(float deg)
void enter()
Enter the area.
An object that can be displayed by the graphics manager.
const GFF4Struct & getTopLevel() const
Returns the top-level struct.
#define GfxMan
Shortcut for accessing the graphics manager.
void loadPlaceables(const Aurora::GFF4List &list)
Class to hold the GFF'd two-dimensional array of a GDA file.
const Common::UString & getName()
Return the area's localized name.
void leave()
Leave the area.