Gutted SDLSurfaceData, as it doesn't really need to do anything at the moment
authorIngo Ruhnke <grumbel@gmail.com>
Mon, 11 Aug 2014 22:39:02 +0000 (00:39 +0200)
committerIngo Ruhnke <grumbel@gmail.com>
Mon, 11 Aug 2014 22:39:02 +0000 (00:39 +0200)
src/video/sdl/sdl_surface_data.hpp

index 244f4b4..a7f66f8 100644 (file)
 class SDLSurfaceData : public SurfaceData
 {
 private:
-  const Surface &surface;
-  SDL_Rect src_rects[NUM_EFFECTS];
 
 public:
-  SDLSurfaceData(const Surface &surface) :
-    surface(surface)
+  SDLSurfaceData(const Surface &surface)
   {
-    int numerator   = 1;
-    int denominator = 1;
-    //float xfactor = 1.0f; // FIXME: (float) config->screenwidth  / SCREEN_WIDTH;
-    //float yfactor = 1.0f; // FIXME: (float) config->screenheight / SCREEN_HEIGHT;
-
-    /* FIXME: 
-       if(xfactor < yfactor)
-       {
-       numerator = config->screenwidth;
-       denominator = SCREEN_WIDTH;
-       }
-       else
-       {
-       numerator = config->screenheight;
-       denominator = SCREEN_HEIGHT;
-       }
-    */
-
-    src_rects[NO_EFFECT].x = surface.get_x() * numerator / denominator;
-    src_rects[NO_EFFECT].y = surface.get_y() * numerator / denominator;
-    src_rects[NO_EFFECT].w = surface.get_width() * numerator / denominator;
-    src_rects[NO_EFFECT].h = surface.get_height() * numerator / denominator;
-
-    int flipped_x = surface.get_texture()->get_texture_width() - surface.get_x() - surface.get_width();
-    src_rects[HORIZONTAL_FLIP].x = flipped_x * numerator / denominator;
-    src_rects[HORIZONTAL_FLIP].y = surface.get_y() * numerator / denominator;
-    src_rects[HORIZONTAL_FLIP].w = surface.get_width() * numerator / denominator;
-    src_rects[HORIZONTAL_FLIP].h = surface.get_height() * numerator / denominator;
-
-    int flipped_y = surface.get_texture()->get_texture_height() - surface.get_y() - surface.get_height();
-    src_rects[VERTICAL_FLIP].x = flipped_y * numerator / denominator;
-    src_rects[VERTICAL_FLIP].y = surface.get_y() * numerator / denominator;
-    src_rects[VERTICAL_FLIP].w = surface.get_width() * numerator / denominator;
-    src_rects[VERTICAL_FLIP].h = surface.get_height() * numerator / denominator;
-  }
-
-  SDL_Rect *get_src_rect(DrawingEffect effect)
-  {
-    return src_rects + effect;
   }
 };