fix some more timings and the long standing gradient software bug (which was function...
[supertux.git] / lib / video / drawing_context.h
index 6c7e774..03dce32 100644 (file)
@@ -86,9 +86,9 @@ namespace SuperTux
       void do_drawing();
 
       const Vector& get_translation() const
-        {  return transform.translation;  }
+      {  return transform.translation;  }
       Uint32 get_drawing_effect() const
-        {  return transform.draw_effect;  }
+      {  return transform.drawing_effect;  }
 
       void set_translation(const Vector& newtranslation)
         {  transform.translation = newtranslation;  }
@@ -105,19 +105,22 @@ namespace SuperTux
 
     private:
       class Transform
-        {
-        public:
-          Vector translation; // only translation for now...
+      {
+      public:
+        Vector translation;
+        Uint32 drawing_effect;
+        float zoom;
+        int alpha;
 
-          Vector apply(const Vector& v) const
-            {
-              return v - translation;
-            }
+        Transform()
+          : drawing_effect(NONE_EFFECT), zoom(1), alpha(255)
+        { }
 
-          Uint32 draw_effect;
-          float zoom;
-          int alpha;
-        };
+        Vector apply(const Vector& v) const
+        {
+          return v - translation;
+        }
+      };
 
       /// the transform stack
       std::vector<Transform> transformstack;
@@ -156,14 +159,14 @@ namespace SuperTux
 
       struct DrawingRequest
         {
+          RequestType type;
+          Vector pos;                
+          
           int layer;
           Uint32 drawing_effect;
           float zoom;
           int alpha;
 
-          RequestType type;
-          Vector pos;
-
           void* request_data;
 
           bool operator<(const DrawingRequest& other) const