From 9ba7349f93aeca1bb45a083235f3576f5096a995 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 27 Jun 2007 07:49:52 +0000 Subject: The dungeon builder now caches compiled Lua chunks instead of Lua source in the .dsc to save on compile time (at the expense of larger .dsc files). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1663 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/maps.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/maps.cc') diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc index 011bbe45df..e60031195d 100644 --- a/crawl-ref/source/maps.cc +++ b/crawl-ref/source/maps.cc @@ -397,8 +397,6 @@ void reset_map_parser() static bool checked_des_index_dir = false; -#define DESCACHE_VER 1002 - static void check_des_index_dir() { if (checked_des_index_dir) @@ -428,7 +426,7 @@ static bool verify_file_version(const std::string &file) const long ver = readLong(inf); fclose(inf); - return (ver == DESCACHE_VER); + return (ver == MAP_CACHE_VERSION); } static bool verify_map_index(const std::string &base) @@ -509,7 +507,7 @@ static void write_map_full(const std::string &filebase, size_t vs, size_t ve) if (!outf) end(1, true, "Unable to open %s for writing", cfile.c_str()); - writeLong(outf, DESCACHE_VER); + writeLong(outf, MAP_CACHE_VERSION); for (size_t i = vs; i < ve; ++i) vdefs[i].write_full(outf); fclose(outf); @@ -522,7 +520,7 @@ static void write_map_index(const std::string &filebase, size_t vs, size_t ve) if (!outf) end(1, true, "Unable to open %s for writing", cfile.c_str()); - writeLong(outf, DESCACHE_VER); + writeLong(outf, MAP_CACHE_VERSION); writeShort(outf, ve > vs? ve - vs : 0); for (size_t i = vs; i < ve; ++i) vdefs[i].write_index(outf); -- cgit v1.2.3-54-g00ecf