void
Sector::parse(const lisp::Lisp& sector)
{
+ bool has_background = false;
lisp::ListIterator iter(§or);
while(iter.next()) {
const std::string& token = iter.item();
} else {
GameObject* object = parse_object(token, *(iter.lisp()));
if(object) {
+ if(dynamic_cast<Background *>(object)) {
+ has_background = true;
+ } else if(dynamic_cast<Gradient *>(object)) {
+ has_background = true;
+ }
add_object(object);
}
}
}
+ if(!has_background) {
+ Gradient* gradient = new Gradient();
+ gradient->set_gradient(Color(0.3, 0.4, 0.75), Color(1, 1, 1));
+ add_object(gradient);
+ }
+
update_game_objects();
if(solid_tilemaps.size() < 1) log_warning << "sector '" << name << "' does not contain a solid tile layer." << std::endl;