From 0f0b8b91ac6b4c6bce83c0d7c7586724b1528668 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 24 Nov 2010 20:21:42 +0000 Subject: Added support for generic [entity] sections to intro.ini. --- src/game/intro/intro.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/game/intro/intro.cc b/src/game/intro/intro.cc index 2147d02..cd77388 100644 --- a/src/game/intro/intro.cc +++ b/src/game/intro/intro.cc @@ -50,6 +50,7 @@ bool Intro::load_world() std::string strval; core::EntityGlobe *globe = 0; + core::Entity *entity = 0; math::Color color; math::Vector3f v; float f; @@ -65,6 +66,11 @@ bool Intro::load_world() zone->set_sky("sky"); core::Zone::add(zone); + } else if (ini.got_section("entity")) { + if (zone) { + entity = new core::Entity(); + } + } else if (ini.got_section("convoy")) { if (zone) { convoy = new Convoy(zone); @@ -93,6 +99,14 @@ bool Intro::load_world() ini.unkown_key(); } + } else if (ini.in_section("entity")) { + + if (core::Parser::got_entity_key(ini, entity)) { + continue; + } else { + ini.unkown_key(); + } + } else if (ini.in_section("convoy")) { if (ini.got_key_string("label", strval)) { -- cgit v1.2.3