tools/exploder_utils.hpp

Go to the documentation of this file.
00001 /* $Id: exploder_utils.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2004 - 2012 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 as published by
00008    the Free Software Foundation; either version 2 of the License, or
00009    (at your option) any later version.
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY.
00012 
00013    See the COPYING file for more details.
00014 */
00015 
00016 #ifndef EXPLODER_UTILS_HPP_INCLUDED
00017 #define EXPLODER_UTILS_HPP_INCLUDED
00018 
00019 #include "../sdl_utils.hpp"
00020 #include <string>
00021 
00022 struct exploder_failure
00023 {
00024     exploder_failure(const std::string& message) :
00025            message(message) {}
00026 
00027     std::string message;
00028 };
00029 
00030 struct exploder_point
00031 {
00032     exploder_point() : x(0), y(0) {};
00033     exploder_point(int x, int y) : x(x), y(y) {};
00034     exploder_point(const std::string &s);
00035 
00036     int x;
00037     int y;
00038 };
00039 
00040 struct exploder_rect
00041 {
00042     exploder_rect() : x(0), y(0), w(0), h(0) {};
00043     exploder_rect(int x,int y, int w, int h) : x(x), y(y), w(w), h(h) {};
00044     exploder_rect(const std::string &s);
00045 
00046     int x;
00047     int y;
00048     int w;
00049     int h;
00050 };
00051 
00052 std::string get_mask_dir();
00053 std::string get_exploder_dir();
00054 
00055 void masked_overwrite_surface(surface dest, surface src, surface mask, int x, int y);
00056 bool image_empty(surface surf);
00057 void save_image(surface surf, const std::string &filename);
00058 
00059 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:02:54 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs