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/main.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/main.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/converter/source/main.cpp b/converter/source/main.cpp index 7f415d896..0cf3248b9 100644 --- a/converter/source/main.cpp +++ b/converter/source/main.cpp @@ -3,7 +3,11 @@ #include "cTimer.h" #include "cQuicksort.h" #include "cDeNotch.h" +#ifdef _WIN32 +#include "dirent.h" +#else #include <dirent.h> +#endif int main () { @@ -22,12 +26,15 @@ int main () { //string* dir_array; int dir_num_files = 0; int ctr = 0; - +#ifdef _WIN32 + if(dp = opendir("region\\")){ +#else if(dp = opendir("region/")){ - while(entry = readdir(dp)){ +#endif + while(entry = readdir(dp)){ entrys = entry->d_name; found = entrys.find(".mcr"); - if ( (found!=std::string::npos) && (entry->d_type==8) ) { + 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)); |