51 _module(&module), _activeObject(0), _highlightAll(false) {
104 if ((*o)->isActive()) {
148 if (sav.
hasField(
"PlaceableList")) {
194 const std::list<uint32> &ids =
object.getIDs();
196 for (std::list<uint32>::const_iterator
id = ids.begin();
id != ids.end(); ++id)
197 _objectMap.insert(std::make_pair(*
id, &
object));
202 for (Aurora::GFF3List::const_iterator w = list.begin(); w != list.end(); ++w) {
210 for (Aurora::GFF3List::const_iterator c = list.begin(); c != list.end(); ++c) {
218 for (Aurora::GFF3List::const_iterator c = list.begin(); c != list.end(); ++c) {
226 for (Aurora::GFF3List::const_iterator c = list.begin(); c != list.end(); ++c) {
238 bool hasMove =
false;
239 for (std::list<Events::Event>::const_iterator e =
_eventQueue.begin();
245 if (e->button.button == SDL_BUTTON_LMASK) {
247 click(e->button.x, e->button.y);
250 if (e->key.keysym.sym == SDLK_TAB)
253 if (e->key.keysym.sym == SDLK_TAB)
295 if ((x < 0) || (y < 0))
318 if (o->second->isClickable())
319 o->second->highlight(enabled);
Handling version V3.2/V3.3 of BioWare's GFFs (generic file format).
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like 'DATA', to ensure portability.
Generic Aurora engines resource utility functions.
void highlightAll(bool enabled)
The global graphics manager.
void addObject(Jade::Object &object)
Add an object to this container.
A class holding an UTF-8 string.
void loadWaypoints(const Aurora::GFF3List &list)
std::list< Common::ChangeID > _resources
The area's resource archives.
A waypoint in a Jade Empire area.
void addEvent(const Events::Event &event)
Add a single event for consideration into the area event queue.
void processEventQueue()
Process the current event queue.
bool hasField(const Common::UString &field) const
Does this specific field exist?
void loadCreatures(const Aurora::GFF3List &list)
Common::UString _layout
The area's layout resref (resource ID).
A placeable in a Jade Empire area.
const GFF3Struct & getTopLevel() const
Returns the top-level struct.
void removeObject(Jade::Object &object)
Remove an object from this container.
void setActive(Jade::Object *object)
void checkActive(int x=-1, int y=-1)
ObjectList _objects
List of all objects in the area.
void readScripts(const Aurora::GFF3Struct &gff)
A simple scoped smart pointer template.
Creature * getPC()
Return the currently playing PC.
void loadARE(const Aurora::GFF3Struct &are)
Mouse button was pressed.
std::list< Events::Event > _eventQueue
The event queue.
Keyboard key was pressed.
virtual void enter()
The cursor entered the object.
Basic exceptions to throw.
void indexMandatoryArchive(const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
ObjectMap _objectMap
Map of all non-static objects in the area.
bool _highlightAll
Are we currently highlighting all objects?
Utility templates and functions.
Area(Module &module, const Common::UString &resRef)
Module * _module
The module this area is in.
A trigger in a Jade Empire area.
bool _visible
Is the area currently visible?
A GFF (generic file format) V3.2/V3.3 file, found in all Aurora games except Sonic Chronicles: The Da...
void loadTriggers(const Aurora::GFF3List &list)
Jade::Object * getObjectAt(int x, int y)
virtual bool click(Object *triggerer=0)
The object was clicked.
void removeFocus()
Forcibly remove the focus from the currently highlighted object.
bool isStatic() const
Is the object static (not manipulable at all)?
#define CursorMan
Shortcut for accessing the cursor manager.
Basic reading stream interfaces.
std::vector< const GFF3Struct * > GFF3List
Convenience class that locks a mutex on creation and unlocks it on destruction.
An object within a Jade area.
The Aurora cursor manager.
An object that can be displayed by the graphics manager.
const GFF3List & getList(const Common::UString &field) const
uint32 getID() const
Get the object's unique ID.
Jade::Object * _activeObject
The currently active (highlighted) object.
A class representing an undoable change.
const GFF3Struct & getStruct(const Common::UString &field) const
void loadPlaceables(const Aurora::GFF3List &list)
void loadSAV(const Aurora::GFF3Struct &sav)
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
void loadObject(Jade::Object &object)
Common::Mutex _mutex
Mutex securing access to the area.
virtual void leave()
The cursor left the object.
Common::UString _resRef
The area's resref (resource ID).
Keyboard key was released.
An object that can be displayed by the graphics manager.
#define GfxMan
Shortcut for accessing the graphics manager.
The global resource manager for Aurora resources.
A creature in a Jade Empire area.