From 66c776cc66d5c91ed3e798b0f5c5a30baf1f1d69 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 7 Oct 2012 21:47:01 +0000 Subject: Read info and locations keys from zone ini files. --- src/game/base/game.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game/base') 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(); } -- cgit v1.2.3