diff options
Diffstat (limited to 'src/core/parser.cc')
-rw-r--r-- | src/core/parser.cc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/core/parser.cc b/src/core/parser.cc index efcc58b..943cfb7 100644 --- a/src/core/parser.cc +++ b/src/core/parser.cc @@ -122,6 +122,32 @@ bool Parser::got_entity_key(filesystem::IniFile &inifile, core::Entity *entity) return true; } + // special globe keys + if (entity->type() == Entity::Globe) { + EntityGlobe *globe = static_cast<EntityGlobe *>(entity); + + if (inifile.got_key_string("texture", strval)) { + globe->set_texturename(strval); + return true; + + } else if (inifile.got_key_string("corona", strval)) { + globe->set_coronaname(strval); + return true; + + } else if (inifile.got_key_float("rotationspeed", f)) { + globe->set_rotationspeed(f); + return true; + + } else if (inifile.got_key_bool("bright", blnval)) { + if (blnval) { + globe->set_flag(core::Entity::Bright); + } else { + globe->unset_flag(core::Entity::Bright); + } + return true; + } + } + return false; } |