Implemented basic lightmap rendering, still a bit of an incomplete hack job, drawing...
[supertux.git] / src / video / sdl / sdl_lightmap.hpp
index 7dd1d56..df451be 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "video/lightmap.hpp"
 
+#include "SDL.h"
+
 class Color;
 struct DrawingRequest;
 
@@ -31,24 +33,21 @@ public:
   void start_draw(const Color &ambient_color);
   void end_draw();
   void do_draw();
+
   void draw_surface(const DrawingRequest& request);
   void draw_surface_part(const DrawingRequest& request);
   void draw_gradient(const DrawingRequest& request);
   void draw_filled_rect(const DrawingRequest& request);
+
   void get_light(const DrawingRequest& request) const;
 
 private:
-  Uint8 *red_channel;
-  Uint8 *blue_channel;
-  Uint8 *green_channel;
+  SDL_Renderer* renderer;
+  SDL_Texture* texture;
   int width;
   int height;
-  int numerator;
-  int denominator;
   int LIGHTMAP_DIV;
 
-  void light_blit(SDL_Surface *src, SDL_Rect *src_rect, int dstx, int dsty);
-
 private:
   SDLLightmap(const SDLLightmap&);
   SDLLightmap& operator=(const SDLLightmap&);