xoreos  0.0.5
module.cpp
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #include "src/common/util.h"
26 #include "src/common/maths.h"
27 #include "src/common/error.h"
28 #include "src/common/configman.h"
29 #include "src/common/filelist.h"
30 #include "src/common/readfile.h"
31 
32 #include "src/aurora/resman.h"
33 #include "src/aurora/talkman.h"
34 #include "src/aurora/erffile.h"
35 #include "src/aurora/gff3file.h"
36 
37 #include "src/graphics/camera.h"
38 
39 #include "src/events/events.h"
40 
44 
46 #include "src/engines/nwn2/area.h"
48 
49 namespace Engines {
50 
51 namespace NWN2 {
52 
53 bool Module::Action::operator<(const Action &s) const {
54  return timestamp < s.timestamp;
55 }
56 
57 
59  _hasModule(false), _running(false), _exit(false), _pc(0), _currentArea(0), _ranPCSpawn(false) {
60 
61 }
62 
64  try {
65  clear();
66  } catch (...) {
67  }
68 }
69 
70 void Module::clear() {
71  unload();
72 }
73 
75  return _currentArea;
76 }
77 
79  return _pc;
80 }
81 
82 bool Module::isLoaded() const {
83  return _hasModule;
84 }
85 
86 bool Module::isRunning() const {
87  return !EventMan.quitRequested() && _running && !_exit && !_newArea.empty();
88 }
89 
90 void Module::load(const Common::UString &module) {
91  if (isRunning()) {
92  // We are currently running a module. Schedule a safe change instead
93 
94  changeModule(module);
95  return;
96  }
97 
98  // We are not currently running a module. Directly load the new module
99  loadModule(module);
100 }
101 
102 void Module::loadModule(const Common::UString &module) {
103  unload();
104 
105  if (module.empty())
106  throw Common::Exception("Tried to load an empty module");
107 
108  try {
109  indexMandatoryArchive(module, 1001, &_resModule);
110 
111  _ifo.load();
112 
113  if (_ifo.isSave())
114  throw Common::Exception("This is a save");
115 
116  checkXPs();
117  checkHAKs();
118 
119  _tag = _ifo.getTag();
120  _name = _ifo.getName().getString();
121 
122  readScripts(*_ifo.getGFF());
124 
125  } catch (Common::Exception &e) {
126  e.add("Can't load module \"%s\"", module.c_str());
127  throw e;
128  }
129 
130  _newModule.clear();
131 
132  _hasModule = true;
133 }
134 
136  uint16 hasXP = 0;
137 
138  hasXP |= ConfigMan.getBool("NWN2_hasXP1") ? 1 : 0;
139  hasXP |= ConfigMan.getBool("NWN2_hasXP2") ? 2 : 0;
140  hasXP |= ConfigMan.getBool("NWN2_hasXP3") ? 4 : 0;
141 
142  uint16 xp = _ifo.getExpansions();
143 
144  for (int i = 0; i < 16; i++, xp >>= 1, hasXP >>= 1)
145  if ((xp & 1) && !(hasXP & 1))
146  throw Common::Exception("Module requires expansion %d and we don't have it", i + 1);
147 }
148 
150  const std::vector<Common::UString> &haks = _ifo.getHAKs();
151 
152  for (std::vector<Common::UString>::const_iterator h = haks.begin(); h != haks.end(); ++h)
153  if (!ResMan.hasArchive(*h + ".hak"))
154  throw Common::Exception("Required hak \"%s\" does not exist", h->c_str());
155 }
156 
158  _newModule = module;
159 }
160 
162  if (_newModule.empty())
163  return;
164 
165  _console->hide();
166 
167  assert(_pc);
168 
169  Common::UString newModule = _newModule;
170  Creature *pc = _pc;
171 
172  unload();
173 
174  _exit = true;
175 
176  loadModule(newModule);
177  enter(*pc, false);
178 }
179 
180 void Module::enter(Creature &pc, bool isNewCampaign) {
181  if (!isLoaded())
182  throw Common::Exception("Module::enter(): Lacking a module?!?");
183 
184  try {
185 
186  loadTLK();
187  loadHAKs();
188  loadAreas();
189 
190  } catch (Common::Exception &e) {
191  e.add("Can't initialize module \"%s\"", _name.c_str());
192  throw e;
193  }
194 
195  if (isNewCampaign)
196  _ranPCSpawn = false;
197 
198  _pc = &pc;
199  addObject(*_pc);
200 
201  float entryX, entryY, entryZ, entryDirX, entryDirY;
202  _ifo.getEntryPosition(entryX, entryY, entryZ);
203  _ifo.getEntryDirection(entryDirX, entryDirY);
204 
205  const float entryAngle = -Common::rad2deg(atan2(entryDirX, entryDirY));
206 
207  _pc->setPosition(entryX, entryY, entryZ);
208  _pc->setOrientation(0.0f, 0.0f, 1.0f, entryAngle);
209 
210  _pc->loadModel();
211 
212  _console->printf("Entering module \"%s\" with character \"%s\"", _name.c_str(), _pc->getName().c_str());
213 
216  runScript(kScriptEnter , this, _pc);
217 
218  Common::UString startMovie = _ifo.getStartMovie();
219  if (!startMovie.empty())
220  playVideo(startMovie);
221 
223 
224  CameraMan.reset();
225 
226  // Roughly head position
227  CameraMan.setPosition(entryX, entryY, entryZ + 1.8f);
228  CameraMan.setOrientation(90.0f, 0.0f, entryAngle);
229  CameraMan.update();
230 
231  _running = true;
232  _exit = false;
233 }
234 
236  runScript(kScriptExit, this, _pc);
237 
238  _running = false;
239  _exit = true;
240 
241  unloadPC();
242 }
243 
244 void Module::addEvent(const Events::Event &event) {
245  _eventQueue.push_back(event);
246 }
247 
249  if (!isRunning())
250  return;
251 
252  replaceModule();
253  enterArea();
254 
255  if (!isRunning())
256  return;
257 
258  handleEvents();
259  handleActions();
260 }
261 
264  return;
265 
266  if (_currentArea) {
268  _pc->setArea(0);
269 
270  _pc->hide();
271 
272  _currentArea->hide();
273 
274  _currentArea = 0;
275  }
276 
277  if (_newArea.empty()) {
278  _exit = true;
279  return;
280  }
281 
282  AreaMap::iterator area = _areas.find(_newArea);
283  if (area == _areas.end() || !area->second) {
284  warning("Failed entering area \"%s\": No such area", _newArea.c_str());
285  _exit = true;
286  return;
287  }
288 
289  _currentArea = area->second;
290 
291  _currentArea->show();
292  _pc->show();
293 
295 
297 
298  if (!_ranPCSpawn) {
299  runScript(kScriptPCLoaded, this, _pc);
300 
301  _ranPCSpawn = true;
302  }
303 
304  EventMan.flushEvents();
305 
306  _console->printf("Entering area \"%s\" (\"%s\", \"%s\")", _currentArea->getResRef().c_str(),
308 }
309 
311  for (EventQueue::const_iterator event = _eventQueue.begin(); event != _eventQueue.end(); ++event)
312  _currentArea->addEvent(*event);
313 
314  _eventQueue.clear();
315 
317 }
318 
320  uint32 now = EventMan.getTimestamp();
321 
322  while (!_delayedActions.empty()) {
323  ActionQueue::iterator action = _delayedActions.begin();
324 
325  if (now < action->timestamp)
326  break;
327 
328  if (action->type == kActionScript)
329  ScriptContainer::runScript(action->script, action->state,
330  action->owner, action->triggerer);
331 
332  _delayedActions.erase(action);
333  }
334 }
335 
337  unloadPC();
338  unloadAreas();
339  unloadHAKs();
340  unloadTLK();
341  unloadModule();
342 }
343 
345  _tag.clear();
346 
347  _ifo.unload();
348 
350 
351  _newModule.clear();
352 
353  _eventQueue.clear();
354  _delayedActions.clear();
355 
356  _hasModule = false;
357  _running = false;
358  _exit = true;
359 }
360 
362  if (_ifo.getTLK().empty())
363  return;
364 
365  TalkMan.addTable(_ifo.getTLK(), _ifo.getTLK() + "f", true, 0, &_resTLK);
366 }
367 
369  TalkMan.removeTable(_resTLK);
370 }
371 
373  const std::vector<Common::UString> &haks = _ifo.getHAKs();
374 
375  _resHAKs.resize(haks.size());
376 
377  for (size_t i = 0; i < haks.size(); i++)
378  indexMandatoryArchive(haks[i] + ".hak", 1002 + i, &_resHAKs[i]);
379 }
380 
382  std::vector<Common::ChangeID>::iterator hak;
383  for (hak = _resHAKs.begin(); hak != _resHAKs.end(); ++hak)
384  deindexResources(*hak);
385 
386  _resHAKs.clear();
387 }
388 
390  status("Loading areas...");
391 
392  const std::vector<Common::UString> &areas = _ifo.getAreas();
393  for (size_t i = 0; i < areas.size(); i++) {
394  status("Loading area \"%s\" (%d / %d)", areas[i].c_str(), (int)i, (int)areas.size() - 1);
395 
396  std::pair<AreaMap::iterator, bool> result;
397 
398  result = _areas.insert(std::make_pair(areas[i], (Area *) 0));
399  if (!result.second)
400  throw Common::Exception("Area tag collision: \"%s\"", areas[i].c_str());
401 
402  try {
403  result.first->second = new Area(*this, areas[i].c_str());
404  } catch (Common::Exception &e) {
405  e.add("Can't load area \"%s\"", areas[i].c_str());
406  throw;
407  }
408  }
409 }
410 
412  _areas.clear();
413  _newArea.clear();
414 
415  _currentArea = 0;
416 }
417 
419  if (!_pc)
420  return;
421 
422  removeObject(*_pc);
423 
424  _pc->hide();
425  _pc = 0;
426 }
427 
428 void Module::movePC(const Common::UString &area) {
429  if (!_pc)
430  return;
431 
432  float x, y, z;
433  _pc->getPosition(x, y, z);
434 
435  movePC(area, x, y, z);
436 }
437 
438 void Module::movePC(float x, float y, float z) {
439  if (!_pc)
440  return;
441 
442  movePC(_currentArea, x, y, z);
443 }
444 
445 void Module::movePC(const Common::UString &area, float x, float y, float z) {
446  if (!_pc)
447  return;
448 
449  Area *pcArea = 0;
450 
451  AreaMap::iterator a = _areas.find(area);
452  if (a != _areas.end())
453  pcArea = a->second;
454 
455  movePC(pcArea, x, y, z);
456 }
457 
458 void Module::movePC(Area *area, float x, float y, float z) {
459  if (!_pc)
460  return;
461 
462  _pc->setArea(area);
463  _pc->setPosition(x, y, z);
464 
465  movedPC();
466 }
467 
469  if (!_pc)
470  return;
471 
472  float x, y, z;
473  _pc->getPosition(x, y, z);
474 
475  // Roughly head position
476  CameraMan.setPosition(x, y, z + 1.8f);
477  CameraMan.update();
478 
479  _newArea.clear();
480  if (_pc->getArea())
481  _newArea = _pc->getArea()->getResRef();
482 }
483 
485  return _ifo;
486 }
487 
489  return NWN2::Object::getName();
490 }
491 
494 }
495 
497  const Aurora::NWScript::ScriptState &state,
499  Aurora::NWScript::Object *triggerer, uint32 delay) {
500  Action action;
501 
502  action.type = kActionScript;
503  action.script = script;
504  action.state = state;
505  action.owner = owner;
506  action.triggerer = triggerer;
507  action.timestamp = EventMan.getTimestamp() + delay;
508 
509  _delayedActions.insert(action);
510 }
511 
513  try {
514  const Common::FileList modules(ConfigMan.getString("NWN2_moduleDir"));
515 
516  const Aurora::ERFFile mod(new Common::ReadFile(modules.findFirst(module + ".mod", true)));
517  const uint32 ifoIndex = mod.findResource("module", Aurora::kFileTypeIFO);
518 
519  const Aurora::GFF3File ifo(mod.getResource(ifoIndex), MKTAG('I', 'F', 'O', ' '));
520 
521  return ifo.getTopLevel().getString("Mod_Name");
522 
523  } catch (...) {
524  }
525 
526  return "";
527 }
528 
530  try {
531  const Common::FileList modules(ConfigMan.getString("NWN2_moduleDir"));
532 
533  const Aurora::ERFFile mod(new Common::ReadFile(modules.findFirst(module + ".mod", true)));
534  const uint32 ifoIndex = mod.findResource("module", Aurora::kFileTypeIFO);
535 
536  const Aurora::GFF3File ifo(mod.getResource(ifoIndex), MKTAG('I', 'F', 'O', ' '));
537 
538  return ifo.getTopLevel().getString("Mod_Description");
539 
540  } catch (...) {
541  }
542 
543  return "";
544 }
545 
546 } // End of namespace NWN2
547 
548 } // End of namespace Engines
Handling version V3.2/V3.3 of BioWare&#39;s GFFs (generic file format).
#define ResMan
Shortcut for accessing the sound manager.
Definition: resman.h:557
#define MKTAG(a0, a1, a2, a3)
A wrapper macro used around four character constants, like &#39;DATA&#39;, to ensure portability.
Definition: endianness.h:140
Creature * _pc
The player character we use.
Definition: module.h:170
bool isSave() const
Is the module a save file?
Definition: ifofile.cpp:259
void playVideo(const Common::UString &video)
Play this video resource.
Definition: util.cpp:54
void unloadHAKs()
Unload the HAKs required by the module.
Definition: module.cpp:381
Generic Aurora engines resource utility functions.
EventQueue _eventQueue
Definition: module.h:180
void add(const char *s,...) GCC_PRINTF(2
Definition: error.cpp:58
Module(::Engines::Console &console)
Definition: module.cpp:58
bool isLoaded() const
Is a module currently loaded and ready to run?
Definition: module.cpp:82
#define TalkMan
Shortcut for accessing the talk manager.
Definition: talkman.h:111
const Common::UString & getTLK() const
Return the custom TLK table this module uses.
Definition: ifofile.cpp:275
A class holding an UTF-8 string.
Definition: ustring.h:48
Area * getArea() const
Return the area this object is currently in.
Definition: object.cpp:122
The global config manager.
void leave()
Leave the running module, quitting it.
Definition: module.cpp:235
void unload()
Unload a currently loaded IFO.
Definition: ifofile.cpp:97
An area in Neverwinter Nights 2, holding all objects, room tiles and terrain within, as well as general area properties like the current background music and ambient sounds.
Definition: area.h:65
bool _ranPCSpawn
Did we run the PC spawn script?
Definition: module.h:176
Mathematical helpers.
const Common::UString & getDescription() const
Return the object&#39;s description.
Definition: object.cpp:92
Camera management.
void delayScript(const Common::UString &script, const Aurora::NWScript::ScriptState &state, Aurora::NWScript::Object *owner, Aurora::NWScript::Object *triggerer, uint32 delay)
Definition: module.cpp:496
The context holding a Neverwinter Nights 2 area.
void addEvent(const Events::Event &event)
Add a single event for consideration into the event queue.
Definition: module.cpp:244
A simple streaming file reading class.
Definition: readfile.h:40
void loadAreas()
Load the areas.
Definition: module.cpp:389
void show()
Show the area.
Definition: area.cpp:216
void processEventQueue()
Process the current event queue.
Definition: module.cpp:248
const GFF3Struct & getTopLevel() const
Returns the top-level struct.
Definition: gff3file.cpp:91
void unloadModule()
Unload the module.
Definition: module.cpp:344
const Common::UString & getName()
Return the area&#39;s localized name.
Definition: area.cpp:126
void getEntryDirection(float &x, float &y) const
Return the entry direction.
Definition: ifofile.cpp:302
std::vector< Common::ChangeID > _resHAKs
Resources added by the HAKs of the module.
Definition: module.h:165
void loadModel()
Load the creature&#39;s model.
Definition: creature.cpp:289
Common::UString script
Definition: module.h:136
Common::UString _name
The object&#39;s display name.
Definition: object.h:147
An object within a NWN2 area.
Definition: object.h:58
void readVarTable(const Aurora::GFF3List &varTable)
Read the object&#39;s variable table.
Definition: object.cpp:200
Aurora::NWScript::ObjectReference triggerer
Definition: module.h:140
const Common::UString & getString(Language language, LanguageGender gender=kLanguageGenderCurrent) const
Get the string of that language.
Definition: locstring.cpp:82
Exception that provides a stack of explanations.
Definition: error.h:36
void load(const Common::UString &module)
Load a module.
Definition: module.cpp:90
void loadModule(const Common::UString &module)
Load the actual module.
Definition: module.cpp:102
Area * _currentArea
The current area.
Definition: module.h:174
SDL_Event Event
Definition: types.h:42
void deindexResources(Common::ChangeID &changeID)
Remove previously added resources from the ResourceManager.
Definition: resources.cpp:164
void addEvent(const Events::Event &event)
Add a single event for consideration into the area event queue.
Definition: area.cpp:536
bool operator<(const Action &s) const
Definition: module.cpp:53
The context needed to run a Neverwinter Nights 2 module.
const Common::UString & getName() const
Return the module&#39;s name.
Definition: module.cpp:488
const std::vector< Common::UString > & getHAKs() const
Return the list of required HAK files.
Definition: ifofile.cpp:307
Basic exceptions to throw.
void load(Common::SeekableReadStream *stream, bool repairNWNPremium=false)
Take over this stream and load an IFO out of it.
Definition: ifofile.cpp:101
A creature in a Neverwinter Nights 2 area.
void indexMandatoryArchive(const Common::UString &file, uint32 priority, const std::vector< byte > &password, Common::ChangeID *changeID)
Definition: resources.cpp:36
const char * c_str() const
Return the (utf8 encoded) string data.
Definition: ustring.cpp:249
Aurora::NWScript::ScriptState state
Definition: module.h:138
void removeObject(NWN2::Object &object)
Remove an object from this container.
uint16_t uint16
Definition: types.h:202
#define ConfigMan
Shortcut for accessing the config manager.
Definition: configman.h:176
void readScripts(const Aurora::GFF3Struct &gff)
Definition: container.cpp:131
Utility templates and functions.
An IFO (module information) file, describing global module properties in many Aurora games...
Definition: ifofile.h:69
void hide()
Hide the creature&#39;s model.
Definition: creature.cpp:116
void loadHAKs()
Load the HAKs required by the module.
Definition: module.cpp:372
void clear()
Definition: ptrmap.h:48
The global events manager.
A GFF (generic file format) V3.2/V3.3 file, found in all Aurora games except Sonic Chronicles: The Da...
Definition: gff3file.h:85
void unload()
Unload the whole shebang.
Definition: module.cpp:336
void addObject(NWN2::Object &object)
Add an object to this container.
Handling BioWare&#39;s ERFs (encapsulated resource file).
bool _exit
Should we exit the module?
Definition: module.h:157
const std::vector< Common::UString > & getAreas() const
Return the list of areas in the module.
Definition: ifofile.cpp:311
Common::UString _newArea
The new area to enter.
Definition: module.h:173
bool empty() const
Is the string empty?
Definition: ustring.cpp:245
void unloadTLK()
Unload the TLK used by the module.
Definition: module.cpp:368
Generic Aurora engines (debug) console.
StackException Exception
Definition: error.h:59
Fake value for a module object.
Definition: types.h:54
const Common::UString & getResRef()
Return the area&#39;s resref (resource ID).
Definition: area.cpp:122
Common::UString _newModule
The module we should change to.
Definition: module.h:178
void movePC(const Common::UString &area)
Move the player character to this area.
Definition: module.cpp:428
void warning(const char *s,...)
Definition: util.cpp:33
virtual void enter()
The cursor entered the object.
Definition: object.cpp:169
const Common::UString & getName() const
Return the object&#39;s name.
Definition: object.cpp:88
Module information, GFF.
Definition: types.h:83
void replaceModule()
Actually replace the currently running module.
Definition: module.cpp:161
#define EventMan
Shortcut for accessing the events manager.
Definition: events.h:210
void clear()
Clear the whole context.
Definition: module.cpp:70
Implementing the stream reading interfaces for files.
Common::ChangeID _resTLK
Resources added for the custom TLK.
Definition: module.h:162
void processEventQueue()
Process the current event queue.
Definition: area.cpp:540
void loadTLK()
Load the TLK used by the module.
Definition: module.cpp:361
Aurora::IFOFile _ifo
The module&#39;s IFO.
Definition: module.h:167
void unloadPC()
Unload the PC.
Definition: module.cpp:418
Class to hold resource data of an ERF archive file.
Definition: erffile.h:105
const GFF3Struct * getGFF() const
Return the IFO&#39;s GFF struct.
Definition: ifofile.cpp:244
uint32_t uint32
Definition: types.h:204
The global talk manager for Aurora strings.
A list of files.
Definition: filelist.h:35
AreaMap _areas
The areas in the current module.
Definition: module.h:172
const LocString & getName() const
Return the name of the module.
Definition: ifofile.cpp:267
Common::UString _tag
Definition: object.h:56
Area * getCurrentArea()
Return the area the PC is currently in.
Definition: module.cpp:74
void status(const char *s,...)
Definition: util.cpp:52
void unloadAreas()
Unload the areas.
Definition: module.cpp:411
virtual void getPosition(float &x, float &y, float &z) const
Return the object&#39;s position within its area.
Definition: object.cpp:142
void printf(const char *s,...) GCC_PRINTF(2
Definition: console.cpp:1093
void show()
Show the creature&#39;s model.
Definition: creature.cpp:111
bool _running
Are we currently running a module?
Definition: module.h:156
#define CameraMan
Shortcut for accessing the camera manager.
Definition: camera.h:83
Common::UString getString(const Common::UString &field, const Common::UString &def="") const
Definition: gff3file.cpp:527
bool isRunning() const
Is a module currently running?
Definition: module.cpp:86
static float rad2deg(float rad)
Definition: maths.h:93
void setArea(Area *)
Set the area this object is currently in.
Definition: object.cpp:126
Generic Aurora engines utility functions.
A list of files.
::Engines::Console * _console
Definition: module.h:153
bool runScript(Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
Definition: container.cpp:147
ActionQueue _delayedActions
Definition: module.h:181
bool _hasModule
Do we have a module?
Definition: module.h:155
Creature * getPC()
Return the currently playing PC.
Definition: module.cpp:78
void checkHAKs()
Do we have all HAKs needed for the module?
Definition: module.cpp:149
const Aurora::IFOFile & getIFO() const
Return the IFO of the currently loaded module.
Definition: module.cpp:484
const Common::UString & getTag() const
Return the module&#39;s tag.
Definition: ifofile.cpp:263
uint16 getExpansions() const
Return the list of required expansions.
Definition: ifofile.cpp:284
void getEntryPosition(float &x, float &y, float &z) const
Return the entry position.
Definition: ifofile.cpp:296
void setOrientation(float x, float y, float z, float angle)
Set the creature&#39;s orientation.
Definition: creature.cpp:129
const Common::UString & getDisplayName()
Return the area&#39;s localized display name.
Definition: area.cpp:130
const Common::UString & getEntryArea() const
Return the entry area.
Definition: ifofile.cpp:292
Common::ChangeID _resModule
Resources added by the module.
Definition: module.h:160
Aurora::NWScript::ObjectReference owner
Definition: module.h:139
void clear()
Clear the string&#39;s contents.
Definition: ustring.cpp:236
void checkXPs()
Do we have all expansions needed for the module?
Definition: module.cpp:135
const Common::UString & getStartMovie() const
Return the starting movie.
Definition: ifofile.cpp:288
void changeModule(const Common::UString &module)
Schedule a change to a new module.
Definition: module.cpp:157
const Common::UString & getDescription() const
Return the module&#39;s description.
Definition: module.cpp:492
void movedPC()
Notify the module that the PC was moved.
Definition: module.cpp:468
void setPosition(float x, float y, float z)
Set the creature&#39;s position.
Definition: creature.cpp:121
The global resource manager for Aurora resources.
void hide()
Hide the area.
Definition: area.cpp:246
void enterArea()
Enter a new area.
Definition: module.cpp:262