make sure all tiles are loaded
[supertux.git] / src / object / camera.cpp
index ae9adf3..1b60386 100644 (file)
@@ -32,6 +32,7 @@
 #include "gameloop.h"
 #include "app/globals.h"
 #include "sector.h"
+#include "object_factory.h"
 
 using namespace SuperTux;
 
@@ -64,6 +65,7 @@ Camera::parse(const lisp::Lisp& reader)
     do_backscrolling = true;
     reader.get("backscrolling", do_backscrolling);
   } else if(modename == "autoscroll") {
+    printf("autoscroll.\n");
     mode = AUTOSCROLL;
     
     const lisp::Lisp* path_lisp = reader.get_lisp("path");
@@ -176,7 +178,7 @@ Camera::scroll_normal(float elapsed_time)
   /****** Vertical Scrolling part ******/
   bool do_y_scrolling = true;
 
-  if(player->dying || sector->solids->get_height() == 19)
+  if(player->is_dying() || sector->solids->get_height() == 19)
     do_y_scrolling = false;
 
   if(do_y_scrolling) {
@@ -258,7 +260,7 @@ Camera::scroll_autoscroll(float elapsed_time)
 {
   Player* player = sector->player;
   
-  if(player->dying)
+  if(player->is_dying())
     return;
 
   if(auto_t - elapsed_time >= 0) {
@@ -288,3 +290,4 @@ Camera::scroll_autoscroll(float elapsed_time)
 
   keep_in_bounds();
 }
+