diff options
author | Enne Walker <enne.walker@gmail.com> | 2010-05-29 16:24:10 -0400 |
---|---|---|
committer | Enne Walker <enne.walker@gmail.com> | 2010-05-30 08:50:37 -0400 |
commit | ca6e3ae38efee3e21d22494140094d71344cdac4 (patch) | |
tree | 2f40b5085806fbf3c765f705071f69a8221e76ae /crawl-ref/source/tilereg-tab.cc | |
parent | 575cfb8db1e87084ae13b9799f74a3b6be75c0c8 (diff) | |
download | crawl-ref-ca6e3ae38efee3e21d22494140094d71344cdac4.tar.gz crawl-ref-ca6e3ae38efee3e21d22494140094d71344cdac4.zip |
Use tileidx_t for tile indices. Also, cleanup.
This new type defines to unsigned int, but it cleans up a lot of the
int/unsigned int/short confusion all over the codebase for tile indices.
This commit also cleans up tiles code to use coord_def more and to change
function signatures to pass const refs and non-const pointers.
Diffstat (limited to 'crawl-ref/source/tilereg-tab.cc')
-rw-r--r-- | crawl-ref/source/tilereg-tab.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/tilereg-tab.cc b/crawl-ref/source/tilereg-tab.cc index 47ff367af7..3fb58cf70a 100644 --- a/crawl-ref/source/tilereg-tab.cc +++ b/crawl-ref/source/tilereg-tab.cc @@ -28,7 +28,7 @@ TabbedRegion::~TabbedRegion() { } -void TabbedRegion::set_tab_region(int idx, GridRegion *reg, int tile_tab) +void TabbedRegion::set_tab_region(int idx, GridRegion *reg, tileidx_t tile_tab) { ASSERT(idx >= 0); ASSERT(idx >= (int)m_tabs.size() || !m_tabs[idx].reg); @@ -152,7 +152,7 @@ void TabbedRegion::pack_buffers() else ofs = TAB_OFS_UNSELECTED; - int tileidx = m_tabs[i].tile_tab + ofs; + tileidx_t tileidx = m_tabs[i].tile_tab + ofs; const tile_info &inf = tile_gui_info(tileidx); int offset_y = m_tabs[i].min_y; m_buf_gui.add(tileidx, 0, 0, -inf.width, offset_y, false); |