diff --git a/src/image.cpp b/src/image.cpp index a60e7b0dac1..14485c85102 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -721,6 +721,16 @@ surface locator::load_image_sub_file() const ERR_DP << "no arguments passed to the ~CROP() function\n"; } } + else if("LOC" == function) { + //FIXME: WIP, don't use it yet + std::vector const& params = utils::split(field); + int x = lexical_cast(params[0]); + int y = lexical_cast(params[1]); + int cx = lexical_cast(params[2]); + int cy = lexical_cast(params[3]); + image::locator new_loc(val_.filename_, map_location(x,y), cx, cy, "");//TODO remove only ~LOC + surf = get_image(new_loc, SCALED_TO_HEX); + } // Scale (SCALE) else if("SCALE" == function) { std::vector const& scale_params = utils::split(field, ',', utils::STRIP_SPACES); diff --git a/src/image.hpp b/src/image.hpp index 31e490e74e2..c67d0e0f8df 100644 --- a/src/image.hpp +++ b/src/image.hpp @@ -104,6 +104,8 @@ namespace image { const std::string &get_filename() const { return val_.filename_; } const map_location& get_loc() const { return val_.loc_ ; } + int get_center_x() const { return val_.center_x_; } + int get_center_y() const { return val_.center_y_; } const std::string& get_modifications() const {return val_.modifications_;} type get_type() const { return val_.type_; }; // const int get_index() const { return index_; };