diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-25 15:06:09 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-25 15:06:09 +0000 |
commit | 36e52bc178b2ba25ecc1b3fc13e03f2aee1e8efa (patch) | |
tree | cae74734b43253360e716cb0ad91aba29fa9757e /src/game/game.cc | |
parent | 210a3278e709b3cbbf2fdd6ef21a2150485b9d97 (diff) |
planet updates
Diffstat (limited to 'src/game/game.cc')
-rw-r--r-- | src/game/game.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/game/game.cc b/src/game/game.cc index 4a77d7d..15ae029 100644 --- a/src/game/game.cc +++ b/src/game/game.cc @@ -11,6 +11,7 @@ #include "filesystem/filesystem.h" #include "filesystem/inifile.h" #include "game/game.h" +#include "game/planet.h" #include "game/ship.h" #include "game/star.h" #include "math/mathlib.h" @@ -156,6 +157,7 @@ void Game::init() return; } + Planet *planet = 0; Star *star = 0; core::Entity *entity = 0; @@ -168,12 +170,26 @@ void Game::init() if (worldini.section().compare("star") == 0) { if (worldini.got_key_string("name", star->entity_name)) continue; - else if (worldini.got_key_string("model", star->entity_modelname)) - continue; else if (worldini.got_key_vector3f("location", star->entity_location )) continue; else if (worldini.got_key_color("color", star->entity_color)) continue; + else if (worldini.got_key_angle("radius", star->entity_radius)) + continue; + else + con_warn << worldini.name() << " unknown key '" << worldini.key() << "' at line " << worldini.line() << std::endl; + + } else if (worldini.section().compare("planet") == 0) { + if (worldini.got_key_string("name", planet->entity_name)) + continue; + else if (worldini.got_key_string("texture", planet->entity_texture)) + continue; + else if (worldini.got_key_vector3f("location", planet->entity_location )) + continue; + else if (worldini.got_key_color("color", planet->entity_color)) + continue; + else if (worldini.got_key_angle("radius", planet->entity_radius)) + continue; else con_warn << worldini.name() << " unknown key '" << worldini.key() << "' at line " << worldini.line() << std::endl; @@ -219,6 +235,9 @@ void Game::init() } else if (worldini.got_section("star")) { star = new Star(); + } else if (worldini.got_section("planet")) { + planet = new Planet(); + } else if (worldini.got_section("entity")) { entity = new core::Entity(); entity->entity_flags += core::Entity::Static; |