git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10056 c06c8d41-db1a-0410-9941-cceddc491573
G5FMBUMNRJOHBPVOWV2TDZKO3CB4K5TSASXB4ONIYXZGUN3GJWQQC
SUPZRPO5SRF66J3CZTVKC6UBKKBLFB4WWADFJCLNEXCYIQKLXLCAC
LV5VQHTUP5OPVIV6FGDX5EJTHT6UJYU7MDPNYSEWQRK3GTDIJ6MAC
HBXWZNXAJ7LUX7FYUIHQYBTRMWVJC6CAQQL3NNZHK5ETLIFEZJ7QC
tile(const tile &img, const char *enumname = NULL, const char *parts_ctg = NULL);
tile(const tile &img, const char *enumname = NULL,
const char *parts_ctg = NULL);
tile(const tile &img, const char *enumnam = NULL, const char *parts = NULL);
bool load(const std::string &filename); bool load(const std::string &filename, const std::string &enumname);
bool load(const std::string &filename);
bool load(const std::string &filename, const std::string &enumname);
bool load(const std::string &new_filename); bool load(const std::string &new_filename, const std::string &new_enumname);
bool load(const std::string &new_filename);
bool load(const std::string &new_filename, const std::string &new_enumname);
void corpsify(int corpse_width, int corpse_height,
void fill(const tile_colour &fill);
void fill(const tile_colour &col);
void set_shrink(bool shrink);
void set_shrink(bool new_shrink);
void get_bounding_box(int &x0, int &y0, int &width, int &height);
void get_bounding_box(int &x0, int &y0, int &w, int &h);
tile::tile(const tile &img, const char *enumname, const char *parts_ctg) :
tile::tile(const tile &img, const char *enumnam, const char *parts) :
if (enumname) m_enumname = enumname; if (parts_ctg) m_parts_ctg = parts_ctg;
if (enumname)
m_enumname = enumname;
if (parts_ctg)
m_parts_ctg = parts_ctg;
if (enumnam) m_enumname = enumnam; if (parts) m_parts_ctg = parts;
if (enumnam)
m_enumname = enumnam;
if (parts)
m_parts_ctg = parts;
m_width = m_height = 0;
void tile::set_shrink(bool shrink)
void tile::set_shrink(bool new_shrink)
m_shrink = shrink;
m_shrink = new_shrink;
m_width = new_width;
flags[x + y * m_width] = ((get_pixel(x, y).a > 0) &&
void tile::corpsify(int corpse_width, int corpse_height,
return false;
return (false);
return true;
return (true);
bool tile::load(const std::string &filename)
bool tile::load(const std::string &new_filename)
m_filename = filename;
m_filename = new_filename;
{
}
SDL_Surface *img = IMG_Load(filename.c_str());
SDL_Surface *img = IMG_Load(new_filename.c_str());
{ return false; }
int dest = 0;
unsigned char *p = (unsigned char*)img->pixels
void tile::fill(const tile_colour &fill)
void tile::fill(const tile_colour &col)
{ get_pixel(x, y) = fill; } }
get_pixel(x, y) = fill;
get_pixel(x, y) = col;
void tile::get_bounding_box(int &x0, int &y0, int &width, int &height)
void tile::get_bounding_box(int &x0, int &y0, int &w, int &h)
x0 = y0 = width = height = 0;
x0 = y0 = w = h = 0;
width = x1 - x0 + 1; height = y1 - y0 + 1;
width = x1 - x0 + 1;
height = y1 - y0 + 1;
w = x1 - x0 + 1; h = y1 - y0 + 1;
w = x1 - x0 + 1;
h = y1 - y0 + 1;
urand_fiery_devil UNRAND_HELLFIRE
urand_hellfire UNRAND_HELLFIRE