summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg.h
diff options
context:
space:
mode:
authorEnne Walker <ennewalker@users.sourceforge.net>2010-01-17 19:33:07 -0500
committerEnne Walker <ennewalker@users.sourceforge.net>2010-01-17 19:53:13 -0500
commit227420e531ae481224410978e01c834507cc61d2 (patch)
tree93b0bbe0f909bb20820a61e1836df1bb03736636 /crawl-ref/source/tilereg.h
parentf903462645b80653998fe987732752038be862d4 (diff)
downloadcrawl-ref-227420e531ae481224410978e01c834507cc61d2.tar.gz
crawl-ref-227420e531ae481224410978e01c834507cc61d2.zip
Tile transparency in water without overlays.
In order for jpeg's waves to work on deep water as well as shallow, we need to not use partially transparent overlays to simulate an actor or an item being submerged. Now, non-flying objects on water will be drawn transparently to blend with the water below. This should mostly look the same, except it will now work on top of waves and will not require a mask for each water type. As a nice side-effect, ghosts are now transparent again and the water on top of submerged objects now animates properly. See the comments in tilebuf.cc for details. The mask tile itself can be adjusted to change the water level, but the parameters to SubmergedTileBuffer will need to be changed to compensate depending on what the new art looks like.
Diffstat (limited to 'crawl-ref/source/tilereg.h')
-rw-r--r--crawl-ref/source/tilereg.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/crawl-ref/source/tilereg.h b/crawl-ref/source/tilereg.h
index 74fbb18f60..a3584cac8a 100644
--- a/crawl-ref/source/tilereg.h
+++ b/crawl-ref/source/tilereg.h
@@ -276,10 +276,10 @@ public:
protected:
void pack_background(unsigned int bg, int x, int y);
- void pack_mcache(mcache_entry *entry, int x, int y);
- void pack_player(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_doll(const dolls_data &doll, 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();
@@ -293,7 +293,8 @@ protected:
std::vector<TextTag> m_tags[TAG_MAX];
TileBuffer m_buf_dngn;
- TileBuffer m_buf_doll;
+ SubmergedTileBuffer m_buf_doll;
+ SubmergedTileBuffer m_buf_main_trans;
TileBuffer m_buf_main;
struct tile_overlay
@@ -489,8 +490,8 @@ protected:
ShapeBuffer m_shape_buf;
FontBuffer m_font_buf;
- TileBuffer m_tile_buf;
- TileBuffer m_cur_buf;
+ SubmergedTileBuffer m_tile_buf;
+ SubmergedTileBuffer m_cur_buf;
};
#endif