xoreos  0.0.5
arealayout.h
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 #ifndef ENGINES_JADE_AREALAYOUT_H
26 #define ENGINES_JADE_AREALAYOUT_H
27 
28 #include <list>
29 
30 #include "src/common/ptrlist.h"
31 #include "src/common/configfile.h"
32 #include "src/common/ustring.h"
33 #include "src/common/changeid.h"
34 
35 #include "src/aurora/lytfile.h"
36 #include "src/aurora/visfile.h"
37 
38 namespace Engines {
39 
40 namespace Jade {
41 
42 class Room;
43 class Object;
44 
46 class AreaLayout {
47 public:
48  AreaLayout(const Common::UString &resRef);
49  virtual ~AreaLayout();
50 
51  // General properties
52 
54  const Common::UString &getResRef();
55 
56  // Visibility
57 
58  virtual void show();
59  virtual void hide();
60 
61  // Update Camera with configuration from the current room.
62  void updateCamera();
63 
64 protected:
65  // Only used to init class Area.
66  AreaLayout();
67 
70 
71  std::list<Common::ChangeID> _resources;
72 
73  bool _visible;
74 
75  // Loading helpers
76 
77  virtual void clear();
78  virtual void load();
79 
80  virtual void loadResources();
81 
82 private:
84 
85 
87 
91 
92  void loadLYT();
93  void loadVIS();
94  void loadART();
95 
96  void loadRooms();
97 
98  Room *currentRoom() const;
99 };
100 
101 } // End of namespace Jade
102 
103 } // End of namespace Engines
104 
105 #endif // ENGINES_JADE_AREALAYOUT_H
This class allows reading/writing INI style config files.
Definition: configfile.h:113
A class holding an UTF-8 string.
Definition: ustring.h:48
std::list< Common::ChangeID > _resources
The area&#39;s resource archives.
Definition: arealayout.h:71
const Common::UString & getResRef()
Return the area&#39;s resref (resource ID).
Definition: arealayout.cpp:64
Room * currentRoom() const
Definition: arealayout.cpp:218
An LYT, BioWare&#39;s Layout Format.
Definition: lytfile.h:55
Common::UString _layout
The area&#39;s layout resref (resource ID).
Definition: arealayout.h:69
Aurora::LYTFile _lyt
The area&#39;s layout description.
Definition: arealayout.h:88
A list storing pointer to objects, with automatic deletion.
Helper class to represent an undoable change.
A class storing a basic configuration file.
Common::ConfigFile _art
The area&#39;s environment properties.
Definition: arealayout.h:90
A Jade area layout.
Definition: arealayout.h:46
bool _visible
Is the area currently visible?
Definition: arealayout.h:73
Handling BioWare&#39;s VISs (Visibility files).
A VIS, BioWare&#39;s Visibility Format.
Definition: visfile.h:52
virtual void loadResources()
Definition: arealayout.cpp:163
Unicode string handling.
RoomList _rooms
All rooms in the area.
Definition: arealayout.h:86
Common::UString _resRef
The area&#39;s resref (resource ID).
Definition: arealayout.h:68
Common::PtrList< Room > RoomList
Definition: arealayout.h:83
Aurora::VISFile _vis
The area&#39;s inter-room visibility description.
Definition: arealayout.h:89
Handling BioWare&#39;s LYTs (Layout files).