diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-09 09:46:44 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-09 09:46:44 +0000 |
commit | ba15bdad80f10dc07f829c14fa6557652caa083f (patch) | |
tree | 1bb8d9faeda1deb15c0f877493955678ccab52bb /crawl-ref/source/tiletex.cc | |
parent | 6e70e966069acbd88760b988fc39638805f0ada2 (diff) | |
download | crawl-ref-ba15bdad80f10dc07f829c14fa6557652caa083f.tar.gz crawl-ref-ba15bdad80f10dc07f829c14fa6557652caa083f.zip |
* Add tile for Sonja.
* Display wielded weapons for zombies, Sonja, Ilsuiw and Saint Roka.
* Reorder get_weapon_offset() to be more logical.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9394 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tiletex.cc')
-rw-r--r-- | crawl-ref/source/tiletex.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/tiletex.cc b/crawl-ref/source/tiletex.cc index 222570a282..8a0c89dee7 100644 --- a/crawl-ref/source/tiletex.cc +++ b/crawl-ref/source/tiletex.cc @@ -40,7 +40,7 @@ bool GenericTexture::load_texture(const char *filename, if (tex_path.c_str()[0] == 0) { fprintf(stderr, "Couldn't find texture '%s'.\n", filename); - return false; + return (false); } SDL_Surface *img = IMG_Load(tex_path.c_str()); @@ -48,7 +48,7 @@ bool GenericTexture::load_texture(const char *filename, if (!img) { fprintf(stderr, "Couldn't load texture '%s'.\n", tex_path.c_str()); - return false; + return (false); } unsigned int bpp = img->format->BytesPerPixel; @@ -59,6 +59,7 @@ bool GenericTexture::load_texture(const char *filename, int new_width = 1; while (new_width < img->w) new_width *= 2; + int new_height = 1; while (new_height < img->h) new_height *= 2; @@ -178,7 +179,7 @@ bool GenericTexture::load_texture(const char *filename, { printf("Warning: unsupported format, bpp = %d for '%s'\n", bpp, acBuffer); - return false; + return (false); } bool success = false; @@ -193,7 +194,7 @@ bool GenericTexture::load_texture(const char *filename, SDL_FreeSurface(img); - return success; + return (success); } bool GenericTexture::load_texture(unsigned char *pixels, unsigned int new_width, @@ -201,7 +202,7 @@ bool GenericTexture::load_texture(unsigned char *pixels, unsigned int new_width, GenericTexture::MipMapOptions mip_opt) { if (!pixels || !new_width || !new_height) - return false; + return (false); // Assumptions... const unsigned int bpp = 4; @@ -234,7 +235,7 @@ bool GenericTexture::load_texture(unsigned char *pixels, unsigned int new_width, texture_format, format, pixels); } - return true; + return (true); } void GenericTexture::bind() const |