diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-03 16:18:02 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-03 16:18:02 +0000 |
commit | 2c2a0304ec8308f912860f05dc1099b86f71773c (patch) | |
tree | 26a30495b0700fcb595aeafb7b3149c9f73d18d6 /crawl-ref/source/tilebuf.cc | |
parent | 1127ccc6b5bd418aead10e6b968aeef4d6909551 (diff) | |
download | crawl-ref-2c2a0304ec8308f912860f05dc1099b86f71773c.tar.gz crawl-ref-2c2a0304ec8308f912860f05dc1099b86f71773c.zip |
* 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
Diffstat (limited to 'crawl-ref/source/tilebuf.cc')
-rw-r--r-- | crawl-ref/source/tilebuf.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/tilebuf.cc b/crawl-ref/source/tilebuf.cc index 95b083dd7e..10e6bb4e58 100644 --- a/crawl-ref/source/tilebuf.cc +++ b/crawl-ref/source/tilebuf.cc @@ -142,16 +142,19 @@ TileBuffer::TileBuffer(const TilesTexture *t) : VertBuffer<PTVert>(t, GL_QUADS) { } -void TileBuffer::add_unscaled(int idx, float x, float y) +void TileBuffer::add_unscaled(int idx, float x, float y, int ymax) { const tile_info &inf = ((TilesTexture*)m_tex)->get_info(idx); float pos_sx = x + inf.offset_x; float pos_sy = y + inf.offset_y; float pos_ex = pos_sx + (inf.ex - inf.sx); - float pos_ey = pos_sy + (inf.ey - inf.sy); + int ey = inf.ey; + if (ymax > 0) + ey = std::min(inf.sy + ymax - inf.offset_y, ey); + float pos_ey = pos_sy + (ey - inf.sy); - float fwidth = m_tex->width(); + float fwidth = m_tex->width(); float fheight = m_tex->height(); float tex_sx = inf.sx / fwidth; |