#include "video/sdl/sdl_surface_data.hpp"
#include "video/sdl/sdl_texture.hpp"
-SDLLightmap::SDLLightmap()
+SDLLightmap::SDLLightmap() :
+ screen(),
+ red_channel(),
+ blue_channel(),
+ green_channel(),
+ width(),
+ height(),
+ numerator(),
+ denominator(),
+ LIGHTMAP_DIV()
{
screen = SDL_GetVideoSurface();
//FIXME: support parameters request.alpha, request.angle, request.blend
const Surface* surface = (const Surface*) request.request_data;
- SDLTexture *sdltexture = dynamic_cast<SDLTexture *>(surface->get_texture());
+ boost::shared_ptr<SDLTexture> sdltexture = boost::dynamic_pointer_cast<SDLTexture>(surface->get_texture());
SDLSurfaceData *surface_data = reinterpret_cast<SDLSurfaceData *>(surface->get_surface_data());
DrawingEffect effect = request.drawing_effect;
= (SurfacePartRequest*) request.request_data;
const Surface* surface = surfacepartrequest->surface;
- SDLTexture *sdltexture = dynamic_cast<SDLTexture *>(surface->get_texture());
+ boost::shared_ptr<SDLTexture> sdltexture = boost::dynamic_pointer_cast<SDLTexture>(surface->get_texture());
DrawingEffect effect = request.drawing_effect;
if (surface->get_flipx()) effect = HORIZONTAL_FLIP;