X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fvideo%2Fsdl_lightmap.cpp;h=595da5398cff53e5ccd43d914336f852d0256453;hb=c13404a6b6a97ad0d5e1c9f905d7a7e37b797c13;hp=8e7c70fac02b1f21390669c7287da865917ea38e;hpb=c655b296af60a436a8ce2bf0e6ede4f72eae0580;p=supertux.git diff --git a/src/video/sdl_lightmap.cpp b/src/video/sdl_lightmap.cpp index 8e7c70fac..595da5398 100644 --- a/src/video/sdl_lightmap.cpp +++ b/src/video/sdl_lightmap.cpp @@ -48,8 +48,13 @@ namespace SDL { screen = SDL_GetVideoSurface(); - float xfactor = (float) config->screenwidth / SCREEN_WIDTH; - float yfactor = (float) config->screenheight / SCREEN_HEIGHT; + //float xfactor = 1.0f; // FIXME: (float) config->screenwidth / SCREEN_WIDTH; + //float yfactor = 1.0f; // FIXME: (float) config->screenheight / SCREEN_HEIGHT; + + numerator = 1; + denominator = 1; + + /* FIXME: if(xfactor < yfactor) { numerator = config->screenwidth; @@ -60,6 +65,7 @@ namespace SDL numerator = config->screenheight; denominator = SCREEN_HEIGHT; } + */ LIGHTMAP_DIV = 8 * numerator / denominator; @@ -470,7 +476,7 @@ namespace SDL if (transform == 0) { std::cerr << "Warning: Tried to draw NULL surface, skipped draw" << std::endl; return; - } + } SDL_Rect *src_rect = surface_data->get_src_rect(effect); int dstx = (int) request.pos.x * numerator / denominator; @@ -496,7 +502,7 @@ namespace SDL if (transform == 0) { std::cerr << "Warning: Tried to draw NULL surface, skipped draw" << std::endl; return; - } + } int ox, oy; if (effect == HORIZONTAL_FLIP)