From 17bea1052a4216595326757286c34a44e8bca8f1 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Sat, 30 Apr 2011 15:58:29 -0600 Subject: [PATCH 1/2] Rewrite the prospector tool to be simpler to follow Also adds plants, demon temples, lairs, and aquifers. --- tools/supported/prospector.cpp | 563 +++++++++++++++------------------ 1 file changed, 250 insertions(+), 313 deletions(-) diff --git a/tools/supported/prospector.cpp b/tools/supported/prospector.cpp index 6abbcf4fd..81bbe47bc 100644 --- a/tools/supported/prospector.cpp +++ b/tools/supported/prospector.cpp @@ -1,412 +1,349 @@ -// produces a list of vein materials available on the map. can be run with '-a' modifier to show even unrevealed minerals deep underground -// with -b modifier, it will show base layer materials too - -// TODO: use material colors to make the output prettier -// TODO: needs the tiletype filter! -// TODO: tile override materials -// TODO: material types, trees, ice, constructions -// TODO: GUI +// Produces a list of materials available on the map. +// Options: +// -a : show unrevealed tiles +// -p : don't show plants +// -s : don't show slade +// -t : don't show demon temple +#include #include -#include // for memset -#include -#include #include -#include -#include -using namespace std; +#include +using namespace std; #include -#include +#include + +typedef std::map MatMap; + +typedef std::vector FeatureList; +typedef std::vector FeatureListPointer; +typedef std::map FeatureMap; +typedef std::vector PlantList; -template