diff options
author | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-11-05 01:23:32 +0100 |
---|---|---|
committer | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-11-05 01:23:32 +0100 |
commit | dd36ea269fb3364e0b1c7d324e8e9a42ddad610f (patch) | |
tree | 9c3f647e5081a9b0dccc0f51277f480711aad8ab /converter/source/cDeNotch.cpp | |
parent | last file... finally (diff) | |
download | cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.tar cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.tar.gz cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.tar.bz2 cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.tar.lz cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.tar.xz cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.tar.zst cuberite-dd36ea269fb3364e0b1c7d324e8e9a42ddad610f.zip |
Diffstat (limited to '')
-rw-r--r-- | converter/source/cDeNotch.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/converter/source/cDeNotch.cpp b/converter/source/cDeNotch.cpp index f76dda5d4..c5001896b 100644 --- a/converter/source/cDeNotch.cpp +++ b/converter/source/cDeNotch.cpp @@ -1,7 +1,6 @@ #include "cDeNotch.h" #include <iostream> #include <fstream> -//#include <string> #include <cstring> #include <stdio.h> #include <ctype.h> @@ -10,18 +9,13 @@ #include "cTimer.h" #include "cQuicksort.h" #include "cDeNotch.h" +#ifdef _WIN32 +#include "dirent.h" +#else #include <dirent.h> +#endif -//int cDeNotch ( std::string, std::string ); - -//std::string mcrSource; -//std::string pakOutput; - - - -//using namespace std; - cDeNotch::cDeNotch ( ) { @@ -35,8 +29,8 @@ int cDeNotch:: Converter ( std::string mcrSource, std::string pakOutput ) { FILE* f = 0; FILE* wf = 0; #ifdef _WIN32 - sprintf_s(SourceFile, 128, "region/%s", mcrSource.c_str() ); //replace hard coded file with file array variable - sprintf_s(OutputFile, 128, "world/%s", pakOutput.c_str() ); //parce x and z from file array variable and place into pak file format + sprintf_s(SourceFile, 128, "region\\%s", mcrSource.c_str() ); //replace hard coded file with file array variable + sprintf_s(OutputFile, 128, "world\\%s", pakOutput.c_str() ); //parce x and z from file array variable and place into pak file format if( fopen_s(&wf, OutputFile, "wb" ) == 0 ) {} else { std::cout << "uhoh!" << std::endl; return false; } //open new pak file for writing #else sprintf(SourceFile, "region/%s", mcrSource.c_str() ); //same as above but for linux |