Updated denotch map converter to work in windows. Still has memory leak though.
git-svn-id: http://mc-server.googlecode.com/svn/trunk@61 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user