summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg-mon.cc
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2010-12-31 14:33:20 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2011-01-01 18:41:36 +1000
commit38aababc9ea55daf47b5e0f277a328c895ee419e (patch)
tree5fbb06ab24ed22685c769fadd50c19dbee06818f /crawl-ref/source/tilereg-mon.cc
parent86591b14709c7a9c5c038b1cea74ec027b7bc84b (diff)
downloadcrawl-ref-38aababc9ea55daf47b5e0f277a328c895ee419e.tar.gz
crawl-ref-38aababc9ea55daf47b5e0f277a328c895ee419e.zip
Re-implement certain tile flags as packed_cell struct members. (Tiles)
Previously, viewgeom.h:struct_cell_t contained tile_fg and tile_bg members. These were modified in tileview.cc:tile_apply_properties and view.cc:viewwindow. Whenever a silenced, haloed, bloody or moldy area was encountered, TILE_FLAG_x was OR'd into the tile_bg. This functionality was perfect only until the tile_flags enum stayed within the bounds of a 32 bit unsigned integer. We've now reached the limit of tile_flags, so any further interaction would either have to be done in the buffer (which would add more dependency on the game state to the tiles code, which we're trying to avoid), or have more attributes added into screen_cell_t and tilegdnbuf.h:packed_cell. Hence, I went with the latter option: extend screen_cell_t to contained boolean flags for silence, halo, etc. Instead of having to add new members to screen_cell_t *and* packed_cell, I instead added a packed_cell into screen_cell_t. And it works now, hooray!
Diffstat (limited to 'crawl-ref/source/tilereg-mon.cc')
-rw-r--r--crawl-ref/source/tilereg-mon.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-mon.cc b/crawl-ref/source/tilereg-mon.cc
index 1510e9d5d4..5654b3f085 100644
--- a/crawl-ref/source/tilereg-mon.cc
+++ b/crawl-ref/source/tilereg-mon.cc
@@ -181,7 +181,7 @@ void MonsterRegion::pack_buffers()
cell.fg = env.tile_fg(ep);
cell.bg = env.tile_bg(ep);
cell.flv = env.tile_flv(gc);
- tile_apply_properties(gc, &cell.fg, &cell.bg);
+ tile_apply_properties(gc, cell);
m_buf.add(cell, x, y);