diff options
author | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-06 03:13:34 +0000 |
---|---|---|
committer | ennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-09-06 03:13:34 +0000 |
commit | a8a183dca9dfa75807dadc556e84b20aab993ce8 (patch) | |
tree | f2dcca4db96304a94b07c9282cd02a71f43f64a3 /crawl-ref/source/externs.h | |
parent | 7349eedd00eabe85d7e76e457011d48522b97593 (diff) | |
download | crawl-ref-a8a183dca9dfa75807dadc556e84b20aab993ce8.tar.gz crawl-ref-a8a183dca9dfa75807dadc556e84b20aab993ce8.zip |
Tiles mcache improvements. Monsters out of sight are now shown with their last seen equipment. Player ghosts are now drawn correctly again. Denzi's new 48x32 pandemonium demon tiles are now used.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6875 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r-- | crawl-ref/source/externs.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 2fa78812ee..8626972a11 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -44,6 +44,20 @@ struct tile_flavour // Used as a random value or for special cases e.g. (bazaars, gates). unsigned char special; }; + +// A glorified unsigned int that assists with ref-counting the mcache. +class tile_fg_store +{ +public: + tile_fg_store() : m_tile(0) {} + tile_fg_store(unsigned int tile) : m_tile(tile) {} + operator unsigned int() { return m_tile; } + unsigned int operator=(unsigned int tile); +protected: + unsigned int m_tile; +}; + + #endif #define INFO_SIZE 200 // size of message buffers @@ -1446,8 +1460,8 @@ public: #ifdef USE_TILE // indexed by grid coords - FixedArray<unsigned int,GXM, GYM> tile_bk_fg; // tile fg - FixedArray<unsigned int,GXM, GYM> tile_bk_bg; // tile bg + FixedArray<tile_fg_store, GXM, GYM> tile_bk_fg; // tile fg + FixedArray<unsigned int, GXM, GYM> tile_bk_bg; // tile bg FixedArray<tile_flavour, GXM, GYM> tile_flv; // indexed by (show-1) coords FixedArray<unsigned int,ENV_SHOW_DIAMETER-2,ENV_SHOW_DIAMETER-2> tile_fg; |