exploder_utils.hpp

Go to the documentation of this file.
00001 /* $Id: exploder_utils.hpp 23842 2008-02-16 08:47:16Z mordante $ */
00002 /*
00003    Copyright (C) 2004 - 2008 by Philippe Plantier <ayin@anathas.org>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License version 2
00008    or at your option any later version.
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY.
00011 
00012    See the COPYING file for more details.
00013 */
00014 
00015 #ifndef EXPLODER_UTILS_HPP_INCLUDED
00016 #define EXPLODER_UTILS_HPP_INCLUDED
00017 
00018 #include "../sdl_utils.hpp"
00019 #include <string>
00020 
00021 struct exploder_failure
00022 {
00023     exploder_failure(const std::string& message) :
00024            message(message) {}
00025 
00026     std::string message;
00027 };
00028 
00029 struct exploder_point
00030 {
00031     exploder_point() : x(0), y(0) {};
00032     exploder_point(int x, int y) : x(x), y(y) {};
00033     exploder_point(const std::string &s);
00034 
00035     int x;
00036     int y;
00037 };
00038 
00039 struct exploder_rect
00040 {
00041     exploder_rect() : x(0), y(0), w(0), h(0) {};
00042     exploder_rect(int x,int y, int w, int h) : x(x), y(y), w(w), h(h) {};
00043     exploder_rect(const std::string &s);
00044 
00045     int x;
00046     int y;
00047     int w;
00048     int h;
00049 };
00050 
00051 std::string get_mask_dir();
00052 std::string get_exploder_dir();
00053 
00054 void masked_overwrite_surface(surface dest, surface src, surface mask, int x, int y);
00055 bool image_empty(surface surf);
00056 void save_image(surface surf, const std::string &filename);
00057 
00058 #endif

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs