diff --git a/src/storyscreen/part.cpp b/src/storyscreen/part.cpp index 1662acaa58cc..e24114e31af4 100644 --- a/src/storyscreen/part.cpp +++ b/src/storyscreen/part.cpp @@ -28,7 +28,6 @@ #include "game_events/pump.hpp" #include "image.hpp" #include "serialization/string_utils.hpp" -#include "sdl/utils.hpp" #include "variable.hpp" namespace storyscreen { @@ -63,35 +62,6 @@ void floating_image::assign(const floating_image& fi) autoscaled_ = fi.autoscaled_; centered_ = fi.centered_; } -floating_image::render_input floating_image::get_render_input(double xscale, double yscale, SDL_Rect& dst_rect) const -{ - render_input ri = { - {0,0,0,0}, - file_.empty() ? nullptr : image::get_image(file_) - }; - - if(!ri.image.null()) { - if(autoscaled_) { - ri.image = scale_surface( - ri.image, - static_cast(ri.image->w * xscale), - static_cast(ri.image->h * yscale) - ); - } - - ri.rect.x = static_cast(x_*xscale) + dst_rect.x; - ri.rect.y = static_cast(y_*yscale) + dst_rect.y; - ri.rect.w = ri.image->w; - ri.rect.h = ri.image->h; - - if(centered_) { - ri.rect.x -= ri.rect.w / 2; - ri.rect.y -= ri.rect.h / 2; - } - } - return ri; -} - background_layer::background_layer() : scale_horizontally_(true) , scale_vertically_(true) diff --git a/src/storyscreen/part.hpp b/src/storyscreen/part.hpp index 42d6d3a17882..e02f41233401 100644 --- a/src/storyscreen/part.hpp +++ b/src/storyscreen/part.hpp @@ -24,8 +24,6 @@ #include #include -#include "sdl/surface.hpp" - class config; class vconfig; class display; @@ -39,12 +37,6 @@ namespace storyscreen { class floating_image { public: - struct render_input - { - SDL_Rect rect; /**< Corrected rectangle for rendering surf. */ - surface image; /**< Surface, scaled if required. */ - }; - /** * WML-based constructor. * @param cfg Object corresponding to a [image] block's contents from @@ -69,7 +61,7 @@ class floating_image /** * Returns the referential X coordinate of the image. - * The actual (corrected) value is determined at render time - see get_render_input(). + * The actual (corrected) value is determined at render time. */ int ref_x() const { return x_; @@ -77,7 +69,7 @@ class floating_image /** * Returns the referential Y coordinate of the image. - * The actual (corrected) value is determined at render time - see get_render_input(). + * The actual (corrected) value is determined at render time. */ int ref_y() const { return y_; @@ -100,12 +92,6 @@ class floating_image */ int display_delay() const { return delay_; } - /** - * Gets a render_input object for use by the rendering code after applying - * any geometric transformations required. - */ - render_input get_render_input(double xscale, double yscale, SDL_Rect& dst_rect) const; - private: std::string file_; int x_, y_; // referential (non corrected) x,y