- updated TODO
[supertux.git] / src / sprite.cpp
index c4d552f..68315f1 100644 (file)
@@ -30,14 +30,14 @@ Sprite::Sprite(lisp_object_t* cur)
 
   LispReader reader(cur);
 
-  if(!reader.read_string("name",   &name))
+  if(!reader.read_string("name", name))
     st_abort("Sprite wihtout name", "");
-  reader.read_int("x-hotspot", &x_hotspot);
-  reader.read_int("y-hotspot", &y_hotspot);
-  reader.read_float("fps",     &fps);
+  reader.read_int("x-hotspot", x_hotspot);
+  reader.read_int("y-hotspot", y_hotspot);
+  reader.read_float("fps",     fps);
 
   std::vector<std::string> images;
-  if(!reader.read_string_vector("images", &images))
+  if(!reader.read_string_vector("images", images))
     st_abort("Sprite contains no images: ", name.c_str());
 
   for(std::vector<std::string>::size_type i = 0; i < images.size(); ++i)
@@ -75,7 +75,7 @@ Sprite::update(float /*delta*/)
 
 void
 Sprite::draw(DrawingContext& context, const Vector& pos, int layer,
-    int special_drawing)
+    uint32_t drawing_effect)
 {
   time = SDL_GetTicks();
   unsigned int frame = get_current_frame();
@@ -84,15 +84,7 @@ Sprite::draw(DrawingContext& context, const Vector& pos, int layer,
   {
     Surface* surface = surfaces[frame];
     
-#if 0 // TODO
-    if(special_drawing == SD_SEMI_TRANSPARENT)
-      surfaces[frame]->draw(x - x_hotspot, y - y_hotspot, 128);
-    if(special_drawing == SD_VERTICAL_FLIP)
-      surfaces[frame]->draw(x - x_hotspot, y - y_hotspot, 255, true);
-    else
-      surfaces[frame]->draw(x - x_hotspot, y - y_hotspot);
-#endif
-    context.draw_surface(surface, pos - Vector(x_hotspot, y_hotspot), layer);
+    context.draw_surface(surface, pos - Vector(x_hotspot, y_hotspot), layer, drawing_effect);
   }
 }