The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Typedefs | Functions | Variables
create_images.cpp File Reference

Tool to create the test images for the unit tests. More...

#include "filesystem.hpp"
#include "tools/exploder_utils.hpp"
#include "tests/test_sdl_utils.hpp"
#include <SDL_image.h>
#include "utils/functional.hpp"
#include <iostream>
Include dependency graph for create_images.cpp:

Go to the source code of this file.

Typedefs

typedef void(* tfunctor )(const surface &, const std::string &)
 
typedef std::pair< std::string,
tfunctor
tcreator
 

Functions

static void show_usage ()
 
static surface create_image_base (const std::string &filename)
 
static void create_image_blend_functor (const surface &dst, const std::string root, const Uint8 amount, const Uint32 color)
 
static void create_image_blend (const surface &src, const std::string &root)
 
int main (int argc, char *argv[])
 

Variables

static const tcreator creators []
 

Detailed Description

Tool to create the test images for the unit tests.

Definition in file create_images.cpp.

Typedef Documentation

typedef std::pair<std::string, tfunctor> tcreator

Definition at line 98 of file create_images.cpp.

typedef void(* tfunctor)(const surface &, const std::string &)

Definition at line 97 of file create_images.cpp.

Function Documentation

static surface create_image_base ( const std::string filename)
static

Definition at line 46 of file create_images.cpp.

References surface_lock::pixels(), and image::save_image().

Referenced by main().

static void create_image_blend ( const surface src,
const std::string root 
)
static

Definition at line 90 of file create_images.cpp.

References blend_image(), and create_image_blend_functor().

static void create_image_blend_functor ( const surface dst,
const std::string  root,
const Uint8  amount,
const Uint32  color 
)
static

Definition at line 78 of file create_images.cpp.

References blend_get_filename(), and image::save_image().

Referenced by create_image_blend().

int main ( int  argc,
char *  argv[] 
)
static void show_usage ( )
static

Definition at line 31 of file create_images.cpp.

Referenced by main().

Variable Documentation

const tcreator creators[]
static
Initial value:
=
{
std::make_pair("/blend/", &create_image_blend)
}
static void create_image_blend(const surface &src, const std::string &root)

Definition at line 100 of file create_images.cpp.

Referenced by main().