#include <exploder_cutter.hpp>
Classes | |
struct | mask |
struct | positioned_surface |
Public Types | |
typedef std::map< std::string, mask > | mask_map |
typedef std::multimap < std::string, positioned_surface > | surface_map |
Public Member Functions | |
cutter () | |
const config | load_config (const std::string &filename) |
void | load_masks (const config &conf) |
surface_map | cut_surface (surface surf, const config &conf) |
void | set_verbose (bool value) |
Private Member Functions | |
std::string | find_configuration (const std::string &file) |
void | add_sub_image (const surface &surf, surface_map &map, const config *config) |
Private Attributes | |
mask_map | masks_ |
bool | verbose_ |
Definition at line 22 of file exploder_cutter.hpp.
typedef std::map<std::string, mask> cutter::mask_map |
Definition at line 43 of file exploder_cutter.hpp.
typedef std::multimap<std::string, positioned_surface> cutter::surface_map |
Definition at line 59 of file exploder_cutter.hpp.
cutter::cutter | ( | ) |
Definition at line 25 of file exploder_cutter.cpp.
|
private |
Definition at line 121 of file exploder_cutter.cpp.
References sdl::create_rect(), cut_surface(), cutter::mask::image, cutter::positioned_surface::image, mask, cutter::positioned_surface::mask, masks_, cutter::positioned_surface::name, cutter::positioned_surface::pos, pos, cutter::mask::shift, utils::split(), verbose_, exploder_point::x, and exploder_point::y.
Referenced by cut_surface().
cutter::surface_map cutter::cut_surface | ( | surface | surf, |
const config & | conf | ||
) |
Definition at line 92 of file exploder_cutter.cpp.
References add_sub_image(), and config::child_range().
Referenced by add_sub_image(), composer::compose(), and main().
|
private |
Definition at line 104 of file exploder_cutter.cpp.
References filesystem::base_name(), and get_exploder_dir().
Referenced by load_config().
const config cutter::load_config | ( | const std::string & | filename | ) |
Definition at line 31 of file exploder_cutter.cpp.
References lg::err(), find_configuration(), game::error::message, preprocess_file(), and read().
Referenced by composer::compose(), and main().
Definition at line 48 of file exploder_cutter.cpp.
References config::child_range(), cutter::mask::cut, cutter::mask::filename, get_mask_dir(), cutter::mask::image, make_neutral_surface(), masks_, cutter::mask::name, cutter::mask::shift, and verbose_.
Referenced by composer::compose(), and main().
void cutter::set_verbose | ( | bool | value | ) |
Definition at line 161 of file exploder_cutter.cpp.
References verbose_.
Referenced by composer::compose(), and main().
|
private |
Definition at line 72 of file exploder_cutter.hpp.
Referenced by add_sub_image(), and load_masks().
|
private |
Definition at line 74 of file exploder_cutter.hpp.
Referenced by add_sub_image(), load_masks(), and set_verbose().