Routines for images: load, scale, re-color, etc. More...
#include "global.hpp"#include "color_range.hpp"#include "config.hpp"#include "filesystem.hpp"#include "foreach.hpp"#include "game_config.hpp"#include "image.hpp"#include "image_modifications.hpp"#include "log.hpp"#include "gettext.hpp"#include "serialization/string_utils.hpp"#include "SDL_image.h"#include <boost/functional/hash.hpp>#include <list>#include <set>
Go to the source code of this file.
Classes | |
| struct | cache_item< T > |
| class | image::cache_type< T > |
Namespaces | |
| namespace | image |
this module manages the cache of images. | |
Defines | |
| #define | GETTEXT_DOMAIN "wesnoth-lib" |
| #define | ERR_DP LOG_STREAM(err, log_display) |
| #define | LOG_DP LOG_STREAM(info, log_display) |
| #define | ERR_CFG LOG_STREAM(err , log_config) |
Functions | |
| void | image::flush_cache () |
| size_t | image::hash_value (const locator::value &val) |
| static bool | image::localized_file_uptodate (const std::string &loc_file) |
| static std::string | image::get_localized_path (const std::string &file, const std::string &suff="") |
| static void | image::add_localized_overlay (const std::string &ovr_file, surface &orig_surf) |
| static signed char | image::col_to_uchar (int i) |
| light_string | image::get_light_string (int op, int r, int g, int b) |
| return light_string of one light operation(see above) | |
| static surface | image::apply_light (surface surf, const light_string &ls) |
| void | image::set_pixel_format (SDL_PixelFormat *format) |
| sets the pixel format used by the images. | |
| void | image::set_color_adjustment (int r, int g, int b) |
| will make all scaled images have these rgb values added to all their pixels. | |
| void | image::set_team_colors (const std::vector< std::string > *colors=NULL) |
| set the team colors used by the TC image modification use a vector with one string for each team using NULL will reset to default TC | |
| const std::vector< std::string > & | image::get_team_colors () |
| void | image::set_zoom (int zoom) |
| sets the amount scaled images should be scaled. | |
| static surface | image::get_hexed (const locator &i_locator) |
| static surface | image::get_scaled_to_hex (const locator &i_locator) |
| static surface | image::get_tod_colored (const locator &i_locator) |
| static surface | image::get_scaled_to_zoom (const locator &i_locator) |
| static surface | image::get_brightened (const locator &i_locator) |
| static TYPE | image::simplify_type (const image::locator &i_locator, TYPE type) |
| translate type to a simpler one when possible | |
| surface | image::get_image (const locator &i_locator, TYPE type=UNSCALED) |
| function to get the surface corresponding to an image. | |
| surface | image::get_lighted_image (const image::locator &i_locator, const light_string &ls, TYPE type) |
| function to get the surface corresponding to an image. | |
| surface | image::get_hexmask () |
| function to get the standard hex mask | |
| bool | image::is_in_hex (const locator &i_locator) |
| function to check if an image fit into an hex return false if the image has not the standard size. | |
| bool | image::is_empty_hex (const locator &i_locator) |
| function to check if an image is empty after hex cut should be only used on terrain image (cache the hex cut version) | |
| surface | image::reverse_image (const surface &surf) |
| function to reverse an image. | |
| bool | image::exists (const locator &i_locator) |
| returns true if the given image actually exists, without loading it. | |
| static void | image::precache_file_existence_internal (const std::string &dir, const std::string &subdir) |
| void | image::precache_file_existence (const std::string &subdir="") |
| precache the existence of files in the subdir (ex: "terrain/") | |
| bool | image::precached_file_exists (const std::string &file) |
Variables | |
| static lg::log_domain | log_display ("display") |
| static lg::log_domain | log_config ("config") |
| std::list< int > | image::dummy_list |
| mini_terrain_cache_map | image::mini_terrain_cache |
| mini_terrain_cache_map | image::mini_fogged_terrain_cache |
| static int | image::last_index_ = 0 |
| static std::set< std::string > | image::fuzzy_localized_files |
| SDL_PixelFormat | image::last_pixel_format |
Routines for images: load, scale, re-color, etc.
Definition in file image.cpp.
| #define ERR_CFG LOG_STREAM(err , log_config) |
Definition at line 48 of file image.cpp.
Referenced by image::locator::load_image_sub_file().
| #define ERR_DP LOG_STREAM(err, log_display) |
Definition at line 44 of file image.cpp.
Referenced by image::locator::load_image_file().
| #define LOG_DP LOG_STREAM(info, log_display) |
lg::log_domain log_config("config") [static] |
lg::log_domain log_display("display") [static] |
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:04:41 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |