summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/rltiles/tool
diff options
context:
space:
mode:
authorennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-10 23:09:52 +0000
committerennewalker <ennewalker@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-10 23:09:52 +0000
commita528b7387d4f5a715389330277ebd62600d8fe46 (patch)
tree107986020bbb6e06e73a1f00295901c68db0bbf5 /crawl-ref/source/rltiles/tool
parente27e2c60f9fdda7119ec366632d4dc3e9707f20d (diff)
downloadcrawl-ref-a528b7387d4f5a715389330277ebd62600d8fe46.tar.gz
crawl-ref-a528b7387d4f5a715389330277ebd62600d8fe46.zip
[2495807] Fixing overlay color when walking through green water.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8402 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/rltiles/tool')
-rw-r--r--crawl-ref/source/rltiles/tool/tile_list_processor.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/crawl-ref/source/rltiles/tool/tile_list_processor.cc b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
index 9b3ede1a70..6d764dd1cf 100644
--- a/crawl-ref/source/rltiles/tool/tile_list_processor.cc
+++ b/crawl-ref/source/rltiles/tool/tile_list_processor.cc
@@ -612,6 +612,8 @@ bool tile_list_processor::write_data()
lcname.c_str());
fprintf(fp, "bool tile_%s_index(const char *str, unsigned int &idx);\n",
lcname.c_str());
+ fprintf(fp, "bool tile_%s_equal(unsigned int tile, unsigned int idx);\n",
+ lcname.c_str());
if (m_categories.size() > 0)
{
@@ -791,13 +793,20 @@ bool tile_list_processor::write_data()
" {\n"
" idx = %s_map_pairs[half].second;\n"
" return true;\n"
- " }\n"
- "\n"
+ " }\n" "\n"
" } while (first <= last);\n"
"\n"
" return false;\n"
"}\n",
lcname.c_str(), lcname.c_str(), lcname.c_str(), lcname.c_str(), lcname.c_str());
+
+ fprintf(fp,
+ "bool tile_%s_equal(unsigned int tile, unsigned int idx)\n"
+ "{\n"
+ " assert(tile >= %s && tile < %s);\n"
+ " return (idx >= tile && idx < tile + tile_%s_count(tile));\n"
+ "}\n\n",
+ lcname.c_str(), m_start_value.c_str(), max.c_str(), lcname.c_str());
}
delete[] part_min;