Removed trailing whitespace from all *.?pp files
[supertux.git] / src / video / sdl / sdl_lightmap.cpp
index 9638c2a..641e8ad 100644 (file)
 
 SDLLightmap::SDLLightmap() :
   renderer(static_cast<SDLRenderer*>(Renderer::instance())->get_sdl_renderer()),
+  texture(),
   width(),
   height(),
   LIGHTMAP_DIV()
 {
   LIGHTMAP_DIV = 8;
 
+  width = SCREEN_WIDTH;
+  height = SCREEN_HEIGHT;
+
   SDL_Renderer* renderer = static_cast<SDLRenderer*>(Renderer::instance())->get_sdl_renderer();
   texture = SDL_CreateTexture(renderer,
                               SDL_PIXELFORMAT_RGB888,
                               SDL_TEXTUREACCESS_TARGET,
-                              SCREEN_WIDTH, SCREEN_HEIGHT);
+                              width, height);
   if (!texture)
   {
     std::stringstream msg;
@@ -52,7 +56,7 @@ void
 SDLLightmap::start_draw(const Color &ambient_color)
 {
   SDL_SetRenderTarget(renderer, texture);
+
   Uint8 r = static_cast<Uint8>(ambient_color.red * 255);
   Uint8 g = static_cast<Uint8>(ambient_color.green * 255);
   Uint8 b = static_cast<Uint8>(ambient_color.blue * 255);
@@ -108,7 +112,7 @@ SDLLightmap::draw_filled_rect(const DrawingRequest& request)
 void
 SDLLightmap::get_light(const DrawingRequest& request) const
 {
-  const GetLightRequest* getlightrequest 
+  const GetLightRequest* getlightrequest
     = (GetLightRequest*) request.request_data;
 
   SDL_Rect rect;