Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-09-17 23:05:58 +0000
committerStijn Buys <ingar@osirion.org>2010-09-17 23:05:58 +0000
commita85c3ca1ff34775f2fc93013306dec21b34b0359 (patch)
treedc45be555858f53413d2477680247c8758b98d2a /src/filesystem/inifile.cc
parent417eeaa34b8374de18358cc64511d7298bc33756 (diff)
Initial inventory loading, ships docking ships
Diffstat (limited to 'src/filesystem/inifile.cc')
-rw-r--r--src/filesystem/inifile.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/filesystem/inifile.cc b/src/filesystem/inifile.cc
index e9ab283..8cf186c 100644
--- a/src/filesystem/inifile.cc
+++ b/src/filesystem/inifile.cc
@@ -159,6 +159,17 @@ bool IniFile::got_key_string(const char * keylabel, std::string & valuestring)
}
}
+bool IniFile::got_key_label(const char * keylabel, std::string & labelstring)
+{
+ if (last_read_was_key && (key_current.compare(keylabel) == 0)) {
+ labelstring.assign(value_current);
+ aux::to_label(labelstring);
+ return true;
+ } else {
+ return false;
+ }
+}
+
bool IniFile::got_key_vector3f(const char * keylabel, math::Vector3f & v)
{
if (last_read_was_key && (key_current.compare(keylabel) == 0)) {
@@ -298,6 +309,16 @@ void IniFile::unknown_section() const
con_warn << name() << " unknown section '" << section() << "' at line " << line() << std::endl;
}
+void IniFile::unknown_error(const char *text) const
+{
+ con_warn << name() << " " << (text && text[0] ? text : "unknown error") << " at line " << line() << std::endl;
+}
+
+void IniFile::unknown_error(const std::string &text) const
+{
+ con_warn << name() << " " << text << " at line " << line() << std::endl;
+}
+
void IniFile::close()
{
inifile_stream.close();