summaryrefslogtreecommitdiffstats
path: root/Tools/AnvilStats/AnvilStats.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-07-29 13:13:03 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-07-29 13:13:03 +0200
commit53e22b11857fed62e2313d6d84d90f88ed412ffb (patch)
treec61e56725da7dff0154d566722651e2c39c9d6c6 /Tools/AnvilStats/AnvilStats.cpp
parentWebAdmin: Removed the duplicate memory usage querying (diff)
downloadcuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.gz
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.bz2
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.lz
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.xz
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.tar.zst
cuberite-53e22b11857fed62e2313d6d84d90f88ed412ffb.zip
Diffstat (limited to 'Tools/AnvilStats/AnvilStats.cpp')
-rw-r--r--Tools/AnvilStats/AnvilStats.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/Tools/AnvilStats/AnvilStats.cpp b/Tools/AnvilStats/AnvilStats.cpp
index ae3f901dc..f0b9dd7e6 100644
--- a/Tools/AnvilStats/AnvilStats.cpp
+++ b/Tools/AnvilStats/AnvilStats.cpp
@@ -1,69 +1,69 @@
-
-// AnvilStats.cpp
-
-// Implements the main app entrypoint
-
-#include "Globals.h"
-#include "Processor.h"
-#include "Statistics.h"
-#include "BiomeMap.h"
-#include "HeightMap.h"
-#include "ChunkExtract.h"
-#include "SpringStats.h"
-
-
-
-
-
-int main(int argc, char * argv[])
-{
- if (argc < 2)
- {
- LOG("Usage: %s <method number> [<world folder>]", argv[0]);
- LOG("Available methods:");
- LOG(" 0 - statistics");
- LOG(" 1 - biome map");
- LOG(" 2 - height map");
- LOG(" 3 - extract chunks");
- LOG(" 4 - count lava- and water- springs");
- LOG("\nNo method number present, aborting.");
- return -1;
- }
-
- AString WorldFolder;
- if (argc > 2)
- {
- WorldFolder = argv[2];
- }
- else
- {
- WorldFolder = "." + cFile::PathSeparator;
- }
-
- cCallbackFactory * Factory = NULL;
- switch (atol(argv[1]))
- {
- case 0: Factory = new cStatisticsFactory; break;
- case 1: Factory = new cBiomeMapFactory; break;
- case 2: Factory = new cHeightMapFactory; break;
- case 3: Factory = new cChunkExtractFactory(WorldFolder); break;
- case 4: Factory = new cSpringStatsFactory; break;
- default:
- {
- LOG("Unknown method \"%s\", aborting.", argv[1]);
- return -2;
- }
- }
- cProcessor Processor;
- Processor.ProcessWorld(WorldFolder, *Factory);
-
- LOG("Processing finished");
-
- delete Factory;
-
- LOG("Done");
-}
-
-
-
-
+
+// AnvilStats.cpp
+
+// Implements the main app entrypoint
+
+#include "Globals.h"
+#include "Processor.h"
+#include "Statistics.h"
+#include "BiomeMap.h"
+#include "HeightMap.h"
+#include "ChunkExtract.h"
+#include "SpringStats.h"
+
+
+
+
+
+int main(int argc, char * argv[])
+{
+ if (argc < 2)
+ {
+ LOG("Usage: %s <method number> [<world folder>]", argv[0]);
+ LOG("Available methods:");
+ LOG(" 0 - statistics");
+ LOG(" 1 - biome map");
+ LOG(" 2 - height map");
+ LOG(" 3 - extract chunks");
+ LOG(" 4 - count lava- and water- springs");
+ LOG("\nNo method number present, aborting.");
+ return -1;
+ }
+
+ AString WorldFolder;
+ if (argc > 2)
+ {
+ WorldFolder = argv[2];
+ }
+ else
+ {
+ WorldFolder = "." + cFile::PathSeparator;
+ }
+
+ cCallbackFactory * Factory = NULL;
+ switch (atol(argv[1]))
+ {
+ case 0: Factory = new cStatisticsFactory; break;
+ case 1: Factory = new cBiomeMapFactory; break;
+ case 2: Factory = new cHeightMapFactory; break;
+ case 3: Factory = new cChunkExtractFactory(WorldFolder); break;
+ case 4: Factory = new cSpringStatsFactory; break;
+ default:
+ {
+ LOG("Unknown method \"%s\", aborting.", argv[1]);
+ return -2;
+ }
+ }
+ cProcessor Processor;
+ Processor.ProcessWorld(WorldFolder, *Factory);
+
+ LOG("Processing finished");
+
+ delete Factory;
+
+ LOG("Done");
+}
+
+
+
+