From 2c2a0304ec8308f912860f05dc1099b86f71773c Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Fri, 3 Jul 2009 16:18:02 +0000 Subject: * Fix centaur/naga tiles not being displayed correctly in the character selection menu. * Add dolls_data to player_save_info struct, to make it easier to read in per-character doll information once we get around to that. Including the tiledef files in externs.h is probably overkill, though, so we might want to move player_save_info into another header file. * Fix Xom's repel stair effect moving shops. * Fix decks granting permanent summons at low power (and only at low power). * Make default settings of the brand options consistent between init.txt and initfile.cc. * Update FAQ. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10086 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tiletex.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/tiletex.h') diff --git a/crawl-ref/source/tiletex.h b/crawl-ref/source/tiletex.h index f3e18ca07c..ed5e48da26 100644 --- a/crawl-ref/source/tiletex.h +++ b/crawl-ref/source/tiletex.h @@ -20,10 +20,12 @@ enum TextureID struct tile_def { - tile_def(int _tile, TextureID _tex) : tile(_tile), tex(_tex) {} + tile_def(int _tile, TextureID _tex, int _ymax = TILE_Y) + : tile(_tile), tex(_tex), ymax(_ymax){} int tile; TextureID tex; + int ymax; }; class GenericTexture @@ -100,10 +102,10 @@ inline void TilesTexture::get_coords(int idx, int ofs_x, int ofs_y, { const tile_info &inf = get_info(idx); - float fwidth = m_width; + float fwidth = m_width; float fheight = m_height; - // center tiles on x, but allow taller tiles to extend upwards + // Centre tiles on x, but allow taller tiles to extend upwards. int size_ox = centre ? TILE_X / 2 - inf.width / 2 : 0; int size_oy = centre ? TILE_Y - inf.height : 0; @@ -111,8 +113,8 @@ inline void TilesTexture::get_coords(int idx, int ofs_x, int ofs_y, if (ymax > 0) ey = std::min(inf.sy + ymax - inf.offset_y, ey); - pos_sx += (ofs_x + inf.offset_x + size_ox) / (float)TILE_X; - pos_sy += (ofs_y + inf.offset_y + size_oy) / (float)TILE_Y; + pos_sx += (ofs_x + inf.offset_x + size_ox) / (float) TILE_X; + pos_sy += (ofs_y + inf.offset_y + size_oy) / (float) TILE_Y; pos_ex = pos_sx + (inf.ex - inf.sx) / (float)TILE_X; pos_ey = pos_sy + (ey - inf.sy) / (float)TILE_Y; @@ -122,5 +124,4 @@ inline void TilesTexture::get_coords(int idx, int ofs_x, int ofs_y, tex_ey = ey / fheight; } - #endif -- cgit v1.2.3-54-g00ecf