diff options
author | Stijn Buys <ingar@osirion.org> | 2012-10-07 21:47:01 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-10-07 21:47:01 +0000 |
commit | 66c776cc66d5c91ed3e798b0f5c5a30baf1f1d69 (patch) | |
tree | a8c5c5bd8dadc0659528d16954a664e1523a8865 /src | |
parent | 60b0e02ab6b8910b3870d16a6eef9d67c6a6f34e (diff) |
Read info and locations keys from zone ini files.
Diffstat (limited to 'src')
-rw-r--r-- | src/game/base/game.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc index c116b8b..3fbcbb0 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -1145,6 +1145,7 @@ bool Game::load_zone(core::Zone *zone) long l; std::string strval; + math::Vector3f vectorval; while (zoneini.getline()) { @@ -1264,6 +1265,18 @@ bool Game::load_zone(core::Zone *zone) } else if (zoneini.got_key_color("ambient", color)) { zone->set_ambient_color(color); continue; + } else if (zoneini.got_key_vector3f("location", vectorval)) { + zone->set_location(vectorval); + continue; + } else if (zoneini.got_key_string("info", strval)) { + core::Info *info = core::Info::find(zone->info()); + if (!info) { + std::string labelstr(zone->label()); + info = new core::Info(core::Zone::infotype(), labelstr.c_str()); + zone->set_info(info); + } + info->add_text(strval); + continue; } else { zoneini.unknown_key(); } |