54 _module(&module), _resRef(resRef), _visible(false),
55 _activeObject(0), _highlightAll(false) {
121 (*o)->refreshLocalized();
268 const std::list<uint32> &ids =
object.getIDs();
270 for (std::list<uint32>::const_iterator
id = ids.begin();
id != ids.end(); ++id)
271 _objectMap.insert(std::make_pair(*
id, &
object));
293 _model->setPosition(1500.0f, 1500.0f, 0.0f);
301 object.setArea(
this);
308 for (Aurora::GFF3List::const_iterator d = list.begin(); d != list.end(); ++d) {
316 for (Aurora::GFF3List::const_iterator p = list.begin(); p != list.end(); ++p) {
324 for (Aurora::GFF3List::const_iterator d = list.begin(); d != list.end(); ++d) {
336 bool hasMove =
false;
337 for (std::list<Events::Event>::const_iterator e =
_eventQueue.begin();
343 if (e->button.button == SDL_BUTTON_LMASK) {
345 click(e->button.x, e->button.y);
348 if (e->key.keysym.sym == SDLK_TAB)
351 if (e->key.keysym.sym == SDLK_TAB)
393 if ((x < 0) || (y < 0))
416 if (o->second->isClickable())
417 o->second->highlight(enabled);
void loadGIT(const Aurora::GFF3Struct &git)
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.
void setMusicBattleTrack(uint32 track)
Set the music track ID playing in battle.
The global graphics manager.
void addObject(Witcher::Object &object)
Add an object to this container.
bool getLocString(const Common::UString &field, LocString &str) const
A class holding an UTF-8 string.
An object within a Witcher area.
void reset(PointerType o=0)
Resets the pointer with the new value.
void loadObject(Engines::Witcher::Object &object)
void playAmbientMusic(Common::UString music="")
Play the specified music (or the area's default) as ambient music.
Engines::Witcher::Object * _activeObject
The currently active (highlighted) object.
bool hasField(const Common::UString &field) const
Does this specific field exist?
void loadARE(const Aurora::GFF3Struct &are)
uint32 getMusicNightTrack() const
Return the music track ID playing by night.
void removeFocus()
Forcibly remove the focus from the currently highlighted object.
void readScripts(const Aurora::GFF3Struct &gff)
const GFF3Struct & getTopLevel() const
Returns the top-level struct.
uint64 getUint(const Common::UString &field, uint64 def=0) const
const Common::UString & getResRef() const
Return the area's resref (resource ID).
uint32 getMusicDayTrack() const
Return the music track ID playing by day.
void highlightAll(bool enabled)
Common::UString _musicNight
Music that plays by night.
virtual bool click(Object *triggerer=0)
The object was clicked.
A door in a The Witcher area.
Fake value for an area object.
Engines::Witcher::Object * getObjectAt(int x, int y)
void hide()
Hide the area.
Mouse button was pressed.
void processEventQueue()
Process the current event queue.
Keyboard key was pressed.
Basic exceptions to throw.
void removeObject(Witcher::Object &object)
Remove an object from this container.
A creature in a The Witcher area.
const char * c_str() const
Return the (utf8 encoded) string data.
uint32 _musicDayTrack
Music track ID that plays by day.
ObjectMap _objectMap
Map of all non-static objects in the area.
Utility templates and functions.
void show()
Show the area.
Handling BioWare's 2DAs (two-dimensional array).
A GFF (generic file format) V3.2/V3.3 file, found in all Aurora games except Sonic Chronicles: The Da...
const Aurora::LocString & getName() const
Return the object's name.
static const uint32 kStrRefInvalid
bool _highlightAll
Are we currently highlighting all objects?
The global sound manager, handling all sound output.
bool empty() const
Is the string empty?
#define TwoDAReg
Shortcut for accessing the 2da registry.
void checkActive(int x=-1, int y=-1)
#define SoundMan
Shortcut for accessing the sound manager.
Common::UString _resRef
The area's resref (resource ID).
bool _visible
Is the area currently visible?
A waypoint in a The Witcher area.
std::list< Events::Event > _eventQueue
The event queue.
#define CursorMan
Shortcut for accessing the cursor manager.
void stopAmbientMusic()
Stop the ambient music.
Common::UString _musicDay
Music that plays by day.
std::vector< const GFF3Struct * > GFF3List
Convenience class that locks a mutex on creation and unlocks it on destruction.
The Aurora cursor manager.
void loadProperties(const Aurora::GFF3Struct &props)
Sound::ChannelHandle playSound(const Common::UString &sound, Sound::SoundType soundType, bool loop, float volume, bool pitchVariance)
Play this sound resource.
virtual void enter()
The cursor entered the object.
An object that can be displayed by the graphics manager.
uint32 getMusicBattleTrack() const
Return the music track ID playing in battle.
const GFF3List & getList(const Common::UString &field) const
uint32 _musicBattleTrack
Music track ID that plays in battle.
uint32 getID() const
Get the object's unique ID.
Common::UString _musicBattle
Music that plays in battle.
void loadDoors(const Aurora::GFF3List &list)
Common::Mutex _mutex
Mutex securing access to the area.
Common::ScopedPtr< Graphics::Aurora::Model > _model
The actual area geometry model.
const GFF3Struct & getStruct(const Common::UString &field) const
The context needed to run a The Witcher module.
Common::UString _modelName
Name of area geometry ("tile") model.
void setActive(Engines::Witcher::Object *object)
The context holding a The Witcher area.
Sound::ChannelHandle _ambientMusic
Sound handle of the currently playing music.
void refreshLocalized()
Refresh all localized strings.
bool isStatic() const
Is the object static (not manipulable at all)?
uint32 _musicNightTrack
Music track ID that plays by night.
void addEvent(const Events::Event &event)
Add a single event for consideration into the area event queue.
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
Aurora::LocString _name
The object's name.
Generic Aurora engines utility functions.
ObjectList _objects
List of all objects in the area.
void loadPlaceables(const Aurora::GFF3List &list)
const Aurora::LocString & getName() const
Return the area's name.
virtual void leave()
The cursor left the object.
virtual void loadModel()
Load the object's model(s).
void notifyCameraMoved()
Notify the area that the camera has been moved.
Graphics::Aurora::Model * loadModelObject(const Common::UString &resref, const Common::UString &texture)
void setMusicDayTrack(uint32 track)
Set the music track ID playing by day.
void loadWaypoints(const Aurora::GFF3List &list)
Keyboard key was released.
Creature * getPC()
Return the currently playing PC.
#define GfxMan
Shortcut for accessing the graphics manager.
void setMusicNightTrack(uint32 track)
Set the music track ID playing by night.
A placeable object in a The Witcher area.
Area(Module &module, const Common::UString &resRef)
Generic Aurora engines model functions.