From a85c3ca1ff34775f2fc93013306dec21b34b0359 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 17 Sep 2010 23:05:58 +0000 Subject: Initial inventory loading, ships docking ships --- src/filesystem/inifile.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/filesystem/inifile.cc') 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(); -- cgit v1.2.3