diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-11 20:46:21 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-11 21:33:48 +0100 |
commit | bd7a961334fbcc180bfb39501bd7948dc961868c (patch) | |
tree | a6bc822837eb555e4a1ff34327af47cd8389f327 /crawl-ref/source/rltiles/tool/tile_page.h | |
parent | 04163afa8a2c64c15323834a89e2425cc7f4b126 (diff) | |
download | crawl-ref-bd7a961334fbcc180bfb39501bd7948dc961868c.tar.gz crawl-ref-bd7a961334fbcc180bfb39501bd7948dc961868c.zip |
Implement rltiles %weight command and skewed dngn tile probabilities.
In dc-dngn.txt you can now use the %weight command to specify the
probability of a given tile whenever a variant is chosen randomly
from a set of variant tiles.
Example:
%weight 5
floor/floor_sand_stone0 FLOOR_SAND_STONE
floor/floor_sand_stone1
floor/floor_sand_stone2
floor/floor_sand_stone3
%weight 2
floor/floor_sand_stone4
floor/floor_sand_stone5
floor/floor_sand_stone7
%weight 1
floor/floor_sand_stone6
... will make plain sand more likely than the rocky versions and the
big rock rarer than the smaller ones.
This is not visible from the dngn.png but you can check the (cumulative)
weights in tiledef-dngn.cc.
Aside from the above, this is also used for the brick wall in all its
colorations. (The repeat command also repeats the weight settings.)
Diffstat (limited to 'crawl-ref/source/rltiles/tool/tile_page.h')
-rw-r--r-- | crawl-ref/source/rltiles/tool/tile_page.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/rltiles/tool/tile_page.h b/crawl-ref/source/rltiles/tool/tile_page.h index c63ae43a5a..4556281558 100644 --- a/crawl-ref/source/rltiles/tool/tile_page.h +++ b/crawl-ref/source/rltiles/tool/tile_page.h @@ -23,6 +23,7 @@ public: std::vector<unsigned int> m_counts; std::vector<int> m_texcoords; std::vector<int> m_offsets; + std::vector<unsigned int> m_probs; protected: int m_width; |