23 #include <SDL_image.h>
31 std::cerr <<
"usage: " << name <<
" [source] [dest_directory]\n";
35 int main(
int argc,
char* argv[])
43 for(arg = 1; arg != argc; ++arg) {
49 if(val ==
"--help" || val ==
"-h") {
52 }
else if(val ==
"--verbose" || val ==
"-v") {
54 }
else if(val ==
"--directory" || val ==
"-d" ) {
59 }
else if(dest_dir.empty()) {
68 if(src.empty() || dest_dir.empty()) {
78 if(src_surface ==
nullptr)
83 for(cutter::surface_map::const_iterator
itor = surfaces.begin();
99 std::cerr <<
"Failed: " << err.
message <<
"\n";
void set_verbose(bool value)
static void print_usage(const char *badoption)
surface_map cut_surface(surface surf, const config &conf)
GLuint const GLfloat * val
std::multimap< std::string, positioned_surface > surface_map
const config load_config(const std::string &filename)
bool save_image(const locator &i_locator, const std::string &filename)
void masked_overwrite_surface(surface dest, surface src, surface mask, int x, int y)
int main(int argc, char *argv[])
std::map< std::string, tfilter >::iterator itor
const GLvdpauSurfaceNV * surfaces
GLuint const GLchar * name
surface make_neutral_surface(const surface &surf)
surface create_compatible_surface(const surface &surf, int width, int height)
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
void load_masks(const config &conf)