From: <gi...@cr...> - 2011-08-31 10:26:13
|
via 6ce96cd4f694f9cb2a823924555ff7d08fb0df5a (commit) via 46a2ee91edd6635ee824849e2dcacf5a7a6f49a5 (commit) via 7b8ff1816e3d7e3646b4405166d7840ffdf8271d (commit) from 41fc7aa361ca5ec194c55dd024250cc26ea317b1 (commit) ----------------------------------------------------------------------- commit 6ce96cd4f694f9cb2a823924555ff7d08fb0df5a Author: Adam Borowski <kil...@an...> Date: Wed Aug 31 12:24:59 2011 +0200 Fix map cache not being updated when a timestamp changes. commit 46a2ee91edd6635ee824849e2dcacf5a7a6f49a5 Author: Adam Borowski <kil...@an...> Date: Wed Aug 31 12:13:52 2011 +0200 Mention how to optimize PNGs. commit 7b8ff1816e3d7e3646b4405166d7840ffdf8271d Author: Adam Borowski <kil...@an...> Date: Wed Aug 31 11:52:20 2011 +0200 Sometimes add water to Spider maps. I have big doubts about this way, though. It often fails (that's ok), hardly ever leaves a reason to explore there, and spooks autoexplore into thinking there's something behind the water. ----------------------------------------------------------------------- Summary of changes: crawl-ref/docs/develop/tiles_creation.txt | 20 +++++++++++++++++++- crawl-ref/source/dat/des/builder/layout.des | 7 +++++++ crawl-ref/source/maps.cc | 8 ++++---- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/crawl-ref/docs/develop/tiles_creation.txt b/crawl-ref/docs/develop/tiles_creation.txt index a1882ca..df3b3e5 100644 --- a/crawl-ref/docs/develop/tiles_creation.txt +++ b/crawl-ref/docs/develop/tiles_creation.txt @@ -35,6 +35,7 @@ Table of Contents 6. Compiling the game 7. Tiles suggestions 8. Submitting your tiles +9. Reducing file size 1. The Tools @@ -262,7 +263,6 @@ I usually do this by means of the eraser, set the size to the maximum possible and the opacity to around 34%, and then "erase" the entire area I want to be semi-transparent, having previously selected it. - 5. Modifying the code base ========================== @@ -463,6 +463,24 @@ Mantis tracker (http://crawl.develz.org/mantis/bug_report_page.php), or send an email containing your tiles to one of the tiles developers (ennewalker, evktalo, jpeg). +9. Reducing file size +===================== + +(Committer only.) When actually putting the tiles into version control, +please minimize their file sizes. Editors usually want to save quickly, +often producing files 3-4 times as big as they could be without any loss of +quality. There are two separate steps, and there are two different programs +which excel at them. I found that the best effects can be obtained with +running them in sequence: + optipng -o4 -i0 -fix image.png + advpng -z4 image.png + +optipng: optimizations higher than -o4 touch only areas that will be +re-done by advpng anyway; -i0 disables interlacing which does no good here +and stops advpng from working; -fix allows to ignore junk PhotoShop adds. + +advpng can be found in package "advancecomp". + Thanks a lot for your support! The Dungeon Crawl DevTeam diff --git a/crawl-ref/source/dat/des/builder/layout.des b/crawl-ref/source/dat/des/builder/layout.des index 818a79a..12ee2e8 100644 --- a/crawl-ref/source/dat/des/builder/layout.des +++ b/crawl-ref/source/dat/des/builder/layout.des @@ -807,6 +807,13 @@ TAGS: overwritable layout allow_dup unrand crawl.mpr("delve(" .. ngb_min .. ", " .. ngb_max .. ", " .. connchance .. ", -1, " .. top .. ")") delve(ngb_min, ngb_max, connchance, -1, top) + if crawl.coinflip() then + crawl.mpr("delve: adding water"); + _G.subst('. = @') + delve(ngb_min, ngb_max, 100, 100, top) + _G.subst('. = w') + _G.subst('@ = .') + end _G.subst('X = x') }} diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 00acd2a..09558de 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -1162,10 +1162,10 @@ static bool load_map_index(const std::string& cache, const std::string &base) return (true); } -static bool load_map_cache(const std::string &filename) +static bool load_map_cache(const std::string &filename, const std::string &cachename) { check_des_index_dir(); - const std::string descache_base = get_descache_path(filename, ""); + const std::string descache_base = get_descache_path(cachename, ""); file_lock deslock(descache_base + ".lk", "rb", false); @@ -1190,7 +1190,7 @@ static bool load_map_cache(const std::string &filename) if (!verify_map_index(descache_base) || !verify_map_full(descache_base)) return (false); - return load_map_index(filename, descache_base); + return load_map_index(cachename, descache_base); } static void write_map_prelude(const std::string &filebase) @@ -1263,7 +1263,7 @@ static void parse_maps(const std::string &s) map_files_read.insert(cache_name); - if (load_map_cache(cache_name)) + if (load_map_cache(s, cache_name)) return; FILE *dat = fopen_u(s.c_str(), "r"); -- Dungeon Crawl Stone Soup |