summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tileview.h
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/tileview.h
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/tileview.h')
-rw-r--r--crawl-ref/source/tileview.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/tileview.h b/crawl-ref/source/tileview.h
index 1555b0dfe4..d0cd69fafe 100644
--- a/crawl-ref/source/tileview.h
+++ b/crawl-ref/source/tileview.h
@@ -17,6 +17,7 @@ class dolls_data;
class item_def;
class monster;
class tile_flavour;
+struct packed_cell;
// Initialize the flavour and the tile env when changing or creating levels.
void tile_new_level(bool first_time, bool init_unseen);
@@ -54,8 +55,7 @@ void tile_draw_rays(bool reset_count);
void tile_wizmap_terrain(const coord_def &gc);
void tile_apply_animations(tileidx_t bg, tile_flavour *flv);
-void tile_apply_properties(const coord_def &gc, tileidx_t *fg,
- tileidx_t *bg);
+void tile_apply_properties(const coord_def &gc, packed_cell &cell);
void tile_clear_map(const coord_def &gc);
void tile_forget_map(const coord_def &gc);