Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-01-06 18:28:28 +0000
committerStijn Buys <ingar@osirion.org>2012-01-06 18:28:28 +0000
commit3ad930b43ba47fd2cd8abe41d04bbecddd1d037e (patch)
treefbe1524f783735e0c648262d89e772587b0679ee /src/game/base
parent92dfee736b9985db6509a6fdb567d78de402a0f9 (diff)
Read the "ambient" key from zone ini files.
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/game.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 2d8ddf5..9800eb8 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -1068,6 +1068,8 @@ bool Game::load_world()
if (inifile.got_key_label("zone", label)) {
zone = new core::Zone(label);
+ // set default ambient light color
+ zone->set_ambient_color(0.1f, 0.1f, 0.1f);
core::Zone::add(zone);
} else {
inifile.unknown_key();
@@ -1119,6 +1121,8 @@ bool Game::load_zone(core::Zone *zone)
con_print << "^BLoading zone " << zone->label() << "..." << std::endl;
size_t count = 0;
+
+ math::Color color;
core::Entity *entity = 0;
core::Inventory *inventory = 0;
@@ -1254,6 +1258,9 @@ bool Game::load_zone(core::Zone *zone)
} else if (zoneini.got_key_string("sky", strval)) {
zone->set_sky(strval);
continue;
+ } else if (zoneini.got_key_color("ambient", color)) {
+ zone->set_ambient_color(color);
+ continue;
} else {
zoneini.unknown_key();
}