diff options
author | Chris West <therealchriswest@hotmail.com> | 2013-01-01 17:54:05 +0000 |
---|---|---|
committer | Chris West <therealchriswest@hotmail.com> | 2013-01-05 16:25:23 +0000 |
commit | 9e6acc18bfe76818cb9bcd1a47305d088aa33196 (patch) | |
tree | cf6b9bba24e37e199d15cac23b03400e7be7142d /crawl-ref/source/tilereg-inv.cc | |
parent | 9a5990e3935167d6d34e41c9135c5d77d5c95e1b (diff) | |
download | crawl-ref-9e6acc18bfe76818cb9bcd1a47305d088aa33196.tar.gz crawl-ref-9e6acc18bfe76818cb9bcd1a47305d088aa33196.zip |
fixed inventory paging
Diffstat (limited to 'crawl-ref/source/tilereg-inv.cc')
-rw-r--r-- | crawl-ref/source/tilereg-inv.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/crawl-ref/source/tilereg-inv.cc b/crawl-ref/source/tilereg-inv.cc index f61aa7a434..3d6fadce2b 100644 --- a/crawl-ref/source/tilereg-inv.cc +++ b/crawl-ref/source/tilereg-inv.cc @@ -36,7 +36,7 @@ InventoryRegion::InventoryRegion(const TileRegionInit &init) : GridRegion(init) void InventoryRegion::pack_buffers() { // Pack base separately, as it comes from a different texture... - unsigned int i = 0 + (m_grid_page*mx*my - m_grid_page); + unsigned int i = 0 + (m_grid_page*mx*my);// - m_grid_page); @@CW: how should these tie in???? for (int y = 0; y < my; y++) { for (int x = 0; x < mx; x++) @@ -67,7 +67,7 @@ void InventoryRegion::pack_buffers() } } - i = 0 + (m_grid_page*mx*my - m_grid_page); + i = 0 + (m_grid_page*mx*my);// - m_grid_page); for (int y = 0; y < my; y++) { for (int x = 0; x < mx; x++) @@ -705,18 +705,11 @@ void InventoryRegion::update() for (int i = you.visible_igrd(you.pos()); i != NON_ITEM; i = mitm[i].link) num_ground++; +/* *** use paging instead // If the inventory is full, show at least one row of the ground. int min_ground = min(num_ground, mx); max_pack_items = min(max_pack_items, mx * my * (m_grid_page+1) - min_ground); max_pack_items = min(ENDOFPACK, max_pack_items); - -/* - // for the paged UI used by the small layout, we can have any number of pack and ground items - if (tiles.is_using_small_layout()) - { - max_pack_items = ENDOFPACK; - min_ground = num_ground; - } */ ucs_t c; |