diff options
author | Chris West <therealchriswest@hotmail.com> | 2012-12-29 16:17:48 +0000 |
---|---|---|
committer | Chris West <therealchriswest@hotmail.com> | 2013-01-05 16:25:23 +0000 |
commit | 10e7a704c28f35be409b468c5881b81ed1c452a8 (patch) | |
tree | 0bba7a6daaee7fe3a23ed741bdc8e575c5e34962 /crawl-ref/source/tilereg-grid.cc | |
parent | d11e3248a35dcfb6ad16f5dc28db7a0b8ad0c8d5 (diff) | |
download | crawl-ref-10e7a704c28f35be409b468c5881b81ed1c452a8.tar.gz crawl-ref-10e7a704c28f35be409b468c5881b81ed1c452a8.zip |
merge of small-screen changes from old build env
Diffstat (limited to 'crawl-ref/source/tilereg-grid.cc')
-rw-r--r-- | crawl-ref/source/tilereg-grid.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-grid.cc b/crawl-ref/source/tilereg-grid.cc index fc6035a4f8..a4ebe7eee8 100644 --- a/crawl-ref/source/tilereg-grid.cc +++ b/crawl-ref/source/tilereg-grid.cc @@ -29,6 +29,7 @@ GridRegion::GridRegion(const TileRegionInit &init) : m_flavour(NULL), m_cursor(NO_CURSOR), m_last_clicked_item(-1), + m_grid_page(0), m_buf(init.im) { } @@ -64,7 +65,7 @@ void GridRegion::on_resize() unsigned int GridRegion::cursor_index() const { ASSERT(m_cursor != NO_CURSOR); - return (m_cursor.x + m_cursor.y * mx); + return m_cursor.x + m_cursor.y * mx + m_grid_page*mx*my -2*m_grid_page; } void GridRegion::place_cursor(const coord_def &cursor) |