bool Sector::show_collrects = false;
bool Sector::draw_solids_only = false;
-Sector::Sector()
- : currentmusic(LEVEL_MUSIC), gravity(10),
+Sector::Sector(Level* parent)
+ : level(parent), currentmusic(LEVEL_MUSIC), gravity(10),
player(0), solids(0), camera(0)
{
add_object(new Player(player_status));
delete *i;
}
+Level*
+Sector::get_level()
+{
+ return level;
+}
+
GameObject*
Sector::parse_object(const std::string& name, const lisp::Lisp& reader)
{
{
if(rect.p1.x > solids->get_width() * 32
|| rect.p1.y > solids->get_height() * 32
- || rect.p2.x < 0 || rect.p2.y < 0)
+ || rect.p2.x < 0)
return false;
return true;