Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/model/mapfile.cc24
-rw-r--r--src/model/tags.h17
2 files changed, 41 insertions, 0 deletions
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc
index c687124..b78448c 100644
--- a/src/model/mapfile.cc
+++ b/src/model/mapfile.cc
@@ -1625,6 +1625,9 @@ Model * MapFile::load(std::string const &name)
} else if (mapfile.got_key_int("flare", u)) {
tag_light->set_flare(u);
continue;
+
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_light->set_info(str);
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1694,6 +1697,9 @@ Model * MapFile::load(std::string const &name)
} else {
mapfile.unknown_value();
}
+
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_flare->set_info(str);
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1730,6 +1736,9 @@ Model * MapFile::load(std::string const &name)
} else if (mapfile.got_key_float("scale", s)) {
tag_particles->set_scale(s);
+
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_particles->set_info(str);
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1776,6 +1785,9 @@ Model * MapFile::load(std::string const &name)
} else if (mapfile.got_key("angles")) {
continue;
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_sound->set_info(str);
+
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1811,6 +1823,9 @@ Model * MapFile::load(std::string const &name)
} else {
tag_submodel->set_scale(1.0f);
}
+
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_submodel->set_info(str);
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1836,6 +1851,9 @@ Model * MapFile::load(std::string const &name)
} else if (mapfile.got_key_float("radius", r)) {
tag_dock->set_radius(r * SCALE);
continue;
+
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_dock->set_info(str);
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1863,6 +1881,9 @@ Model * MapFile::load(std::string const &name)
tag_weapon->set_cone(r);
continue;
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_weapon->set_info(str);
+
} else if (mapfile.got_key()) {
mapfile.unknown_key();
@@ -1890,6 +1911,9 @@ Model * MapFile::load(std::string const &name)
tag_weapon->set_cone(r);
continue;
+ } else if (mapfile.got_key_string("info", str)) {
+ tag_weapon->set_info(str);
+
} else if (mapfile.got_key()) {
mapfile.unknown_key();
diff --git a/src/model/tags.h b/src/model/tags.h
index 7f7d5d7..5be7576 100644
--- a/src/model/tags.h
+++ b/src/model/tags.h
@@ -60,6 +60,14 @@ public:
{
return tag_location;
}
+
+ /**
+ * @brief tag info text
+ * */
+ inline const std::string & info() const
+ {
+ return tag_info;
+ }
/* ---- mutators ------------------------------------------- */
/**
@@ -77,6 +85,14 @@ public:
{
tag_location.assign(x, y, z);
}
+
+ /**
+ * @brief set the info text
+ * */
+ inline void set_info(const std::string &text)
+ {
+ tag_info.assign(text);
+ }
/* ---- actors --------------------------------------------- */
@@ -90,6 +106,7 @@ public:
private:
math::Vector3f tag_location;
+ std::string tag_info;
};
/* ---- class Light ------------------------------------------------ */