diff options
author | Enne Walker <enne.walker@gmail.com> | 2010-05-29 11:09:17 -0400 |
---|---|---|
committer | Enne Walker <enne.walker@gmail.com> | 2010-05-30 08:50:37 -0400 |
commit | 575cfb8db1e87084ae13b9799f74a3b6be75c0c8 (patch) | |
tree | 1274dea0786f6d943de3a7ec360fc6ec1193e25f /crawl-ref/source/tilereg-dgn.h | |
parent | 7e9196891f4283c40a8db3947f6db8a853724c44 (diff) | |
download | crawl-ref-575cfb8db1e87084ae13b9799f74a3b6be75c0c8.tar.gz crawl-ref-575cfb8db1e87084ae13b9799f74a3b6be75c0c8.zip |
Refactor crawl view buffer.
Rather than using explicit offsets (e.g. buffy[0] and buffy[1]), store
colour, glyph, and tiles for each cell in the view buffer in a struct
with named members. This refactoring will also theoretically allow for
the tiles version to display glyphs instead of tiles.
Diffstat (limited to 'crawl-ref/source/tilereg-dgn.h')
-rw-r--r-- | crawl-ref/source/tilereg-dgn.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/tilereg-dgn.h b/crawl-ref/source/tilereg-dgn.h index 896cd4995b..eee1933c5b 100644 --- a/crawl-ref/source/tilereg-dgn.h +++ b/crawl-ref/source/tilereg-dgn.h @@ -9,6 +9,7 @@ #include "tilereg.h" #include "tiledgnbuf.h" +#include "viewgeom.h" #include <vector> class mcache_entry; @@ -35,7 +36,7 @@ public: virtual bool update_alt_text(std::string &alt); virtual void on_resize(); - void load_dungeon(unsigned int* tileb, int cx_to_gx, int cy_to_gy); + void load_dungeon(const crawl_view_buffer &vbuf, const coord_def &gc); void place_cursor(cursor_type type, const coord_def &gc); bool on_screen(const coord_def &gc) const; @@ -57,7 +58,7 @@ protected: int get_buffer_index(const coord_def &gc); void to_screen_coords(const coord_def &gc, coord_def& pc) const; - std::vector<unsigned int> m_tileb; + crawl_view_buffer m_vbuf; int m_cx_to_gx; int m_cy_to_gy; coord_def m_cursor[CURSOR_MAX]; |