summaryrefslogtreecommitdiffstats
path: root/converter/source/main.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-02 22:03:16 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-02 22:03:16 +0200
commitf85f83df7f9d69a76671fa9b1396932f34736e55 (patch)
tree69a93ef27c21656cdde67d7ad62e27ad5468ebb5 /converter/source/main.cpp
parentRavines: implemented proper caching - another 10 % in generator speedup :) (diff)
downloadcuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.gz
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.bz2
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.lz
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.xz
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.tar.zst
cuberite-f85f83df7f9d69a76671fa9b1396932f34736e55.zip
Diffstat (limited to 'converter/source/main.cpp')
-rw-r--r--converter/source/main.cpp75
1 files changed, 0 insertions, 75 deletions
diff --git a/converter/source/main.cpp b/converter/source/main.cpp
deleted file mode 100644
index 5df378cd6..000000000
--- a/converter/source/main.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-#include "MemoryLeak.h"
-
-#include <iostream>
-#include "cNBTData.h"
-#include "cTimer.h"
-#include "cQuicksort.h"
-#include "cDeNotch.h"
-#ifdef _WIN32
-#include "wdirent.h"
-#else
-#include <dirent.h>
-#endif
-
-int main ()
-{
-
-#ifdef _DEBUG
- _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
-#endif
-
- cTimer Timer;
- clock_t progBegin = clock(); //start main program timer
- std::string dir;
- DIR* dp;
- struct dirent *entry;
- int found;
- std::string entrys;
- std::string str2;
- std::string str3;
- std::string filexPos;
- std::string filezPos;
- std::string pak_name;
- //string* dir_array;
- int dir_num_files = 0;
- int ctr = 0;
-
- if(dp = opendir("./"))
- {
- while(entry = readdir(dp))
- {
- entrys = entry->d_name;
- found = entrys.find(".mcr");
- if ( (found!=std::string::npos) )
- {
- str2 = entrys.substr (2,sizeof(entrys));
- filexPos = str2.substr (0,(int)str2.find("."));
- str3 = str2.substr ((int)str2.find(".")+1, sizeof(str2));
- filezPos = str3.substr (0,(int)str3.find("."));
- pak_name = "X" + filexPos + "_Z" + filezPos + ".pak";
-
- clock_t begin=clock(); //start execution timer
-
- cDeNotch DeNotch;
- DeNotch.Converter ( entrys, pak_name );
-
-
- clock_t end=clock();
- std::cout << "Time to convert chunk: " << double(Timer.diffclock(end,begin)) << " Seconds"<< std::endl;
- }
- }
- closedir(dp);
- }
- clock_t progEnd = clock(); //end main program timer
- std::cout << "Time to complete converter: " << double(Timer.diffclock(progEnd,progBegin)) << " Seconds"<< std::endl;
-
-#ifdef _DEBUG
- _CrtDumpMemoryLeaks();
-#endif
-
-#ifdef _WIN32
- system("PAUSE");
-#endif
-
- return 0;
-};