Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/zone.h')
-rw-r--r--src/core/zone.h60
1 files changed, 44 insertions, 16 deletions
diff --git a/src/core/zone.h b/src/core/zone.h
index 32463df..6048a99 100644
--- a/src/core/zone.h
+++ b/src/core/zone.h
@@ -11,7 +11,8 @@
#include <list>
#include <map>
-namespace core {
+namespace core
+{
class Zone;
@@ -23,7 +24,8 @@ namespace core
{
/// a Zone contains a compartment of the game universe
-class Zone {
+class Zone
+{
public:
/// type definition for the content of a zone
typedef std::list<Entity *> Content;
@@ -58,8 +60,10 @@ public:
static void clear();
/// the zone registry
- static inline Registry & registry() { return zone_registry; }
-
+ static inline Registry & registry() {
+ return zone_registry;
+ }
+
/* ---- Zone class ----------------------------------------- */
/// create a new zone
@@ -77,22 +81,34 @@ public:
void print();
/// zone id
- inline unsigned int id() const { return zone_id; }
+ inline unsigned int id() const {
+ return zone_id;
+ }
/// zone label
- inline std::string const & label() const { return zone_label; }
+ inline std::string const & label() const {
+ return zone_label;
+ }
/// zone name
- inline std::string const & name() const { return zone_name; }
+ inline std::string const & name() const {
+ return zone_name;
+ }
/// the name of the texture to be used as sky for this zone
- inline std::string const & sky() const { return zone_sky; }
+ inline std::string const & sky() const {
+ return zone_sky;
+ }
/// texture id for the sky
- inline size_t sky_texture() const { return zone_sky_texture; }
+ inline size_t sky_texture() const {
+ return zone_sky_texture;
+ }
/// default zone view
- inline Entity *default_view() {return zone_defaultview; }
+ inline Entity *default_view() {
+ return zone_defaultview;
+ }
/// find an entity inside a zone
Entity *find_entity(Entity *entity);
@@ -109,19 +125,29 @@ public:
/* ---- mutators ------------------------------------------- */
/// set the Zone label
- inline void set_label(std::string const & label) { zone_label.assign(label); }
+ inline void set_label(std::string const & label) {
+ zone_label.assign(label);
+ }
/// set the Zone label
- inline void set_name(std::string const & name) { zone_name.assign(name); }
+ inline void set_name(std::string const & name) {
+ zone_name.assign(name);
+ }
/// set the sky texture name to be used for this zone
- inline void set_sky(std::string const & sky) { zone_sky.assign(sky); }
+ inline void set_sky(std::string const & sky) {
+ zone_sky.assign(sky);
+ }
/// set the texture id for the sky
- inline void set_sky_texture(size_t texture) { zone_sky_texture = texture; }
+ inline void set_sky_texture(size_t texture) {
+ zone_sky_texture = texture;
+ }
///set the default view
- inline void set_default_view(Entity *entity) { zone_defaultview = entity; }
+ inline void set_default_view(Entity *entity) {
+ zone_defaultview = entity;
+ }
/* ---- serializers ---------------------------------------- */
@@ -134,7 +160,9 @@ public:
/* ---- zone content --------------------------------------- */
/// the entities belonging to this zone
- inline Content & content() { return zone_content; }
+ inline Content & content() {
+ return zone_content;
+ }
/// add an entity to this zone
void add(Entity *entity);