summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg-dgn.h
diff options
context:
space:
mode:
authorEnne Walker <enne.walker@gmail.com>2010-05-25 21:57:32 -0400
committerEnne Walker <enne.walker@gmail.com>2010-05-25 22:09:09 -0400
commitf786a607b0360b03f503c393ea7a8de985aae7db (patch)
tree3488d880c70a1344d1128fb1ea25cd3a105b8826 /crawl-ref/source/tilereg-dgn.h
parent3f6687c46fa4a14006a647e32f38b2d0b7f7534f (diff)
downloadcrawl-ref-f786a607b0360b03f503c393ea7a8de985aae7db.tar.gz
crawl-ref-f786a607b0360b03f503c393ea7a8de985aae7db.zip
Abstract dungeon rendering into a separate class.
This cleans up all of the global state access during packing (other than player_doll). This new code can also get reused for drawing monsters with equipment and status effects, such as in a theoretical monster list.
Diffstat (limited to 'crawl-ref/source/tilereg-dgn.h')
-rw-r--r--crawl-ref/source/tilereg-dgn.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/crawl-ref/source/tilereg-dgn.h b/crawl-ref/source/tilereg-dgn.h
index b4681d995e..7d69f95e29 100644
--- a/crawl-ref/source/tilereg-dgn.h
+++ b/crawl-ref/source/tilereg-dgn.h
@@ -8,6 +8,7 @@
#define TILEREG_DGN_H
#include "tilereg.h"
+#include "tiledgnbuf.h"
#include <vector>
class mcache_entry;
@@ -45,14 +46,8 @@ public:
void clear_overlays();
protected:
- void pack_background(unsigned int bg, int x, int y);
- void pack_mcache(mcache_entry *entry, int x, int y, bool submerged);
- void pack_player(int x, int y, bool submerged);
- void pack_foreground(unsigned int bg, unsigned int fg, int x, int y);
- void pack_fg_flags(unsigned int bg, unsigned int fg, int x, int y);
- void pack_doll(const dolls_data &doll, int x, int y, bool submerged, bool ghost);
- void pack_cursor(cursor_type type, unsigned int tile);
void pack_buffers();
+ void pack_cursor(cursor_type type, unsigned int tile);
void draw_minibars();
@@ -65,10 +60,7 @@ protected:
coord_def m_cursor[CURSOR_MAX];
std::vector<TextTag> m_tags[TAG_MAX];
- TileBuffer m_buf_dngn;
- SubmergedTileBuffer m_buf_doll;
- SubmergedTileBuffer m_buf_main_trans;
- TileBuffer m_buf_main;
+ DungeonCellBuffer m_buf_dngn;
struct tile_overlay
{