Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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