diff --git a/code/ryzom/tools/leveldesign/export/export.cpp b/code/ryzom/tools/leveldesign/export/export.cpp index bb3e384f1..48fb175aa 100644 --- a/code/ryzom/tools/leveldesign/export/export.cpp +++ b/code/ryzom/tools/leveldesign/export/export.cpp @@ -39,9 +39,10 @@ #include "nel/misc/i_xml.h" #include "nel/misc/path.h" #include "nel/misc/file.h" +#include "nel/misc/path.h" #include "tools.h" -#include "../master/continentcfg.h" +#include "../master/ContinentCfg.h" using namespace std; using namespace NLMISC; @@ -50,7 +51,7 @@ using namespace NLLIGO; using namespace NLGEORGES; #define MAX_SYS_DIR 6 -char *gExportSysDir[MAX_SYS_DIR] = +const char *gExportSysDir[MAX_SYS_DIR] = { ".", "..", @@ -85,7 +86,7 @@ void CExport::delIGZone (sint32 x, sint32 y) { string sZoneName = CExport::getZoneNameFromXY (x, y); sZoneName += ".ig"; - if (DeleteFile(sZoneName.c_str())) + if (CFile::deleteFile(deleteFile(sZoneName)) { CTools::chdir (_ExeDir); string sTmp = string(" zone ") + sZoneName + " deleted"; @@ -1208,7 +1209,7 @@ bool CExport::newExport (SExportOptions &opt, IExportCB *expCB) if (!CTools::fileExist(sNewName)) { // Delete the oldest file - DeleteFile(vFiles[i].c_str()); + CFile::deleteFile(vFiles[i]); } } @@ -1226,7 +1227,7 @@ bool CExport::newExport (SExportOptions &opt, IExportCB *expCB) if (!CTools::fileExist(sNewName)) { // Delete the oldest file - DeleteFile(vFiles[i].c_str()); + CFile::deleteFile(vFiles[i]); } } } diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp index 43f2c058c..0f02075c2 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp @@ -41,7 +41,9 @@ #include -#include +#ifdef NL_OS_WINDOWS +# include +#endif // NL_OS_WINDOWS using namespace NL3D; using namespace NLMISC; @@ -360,8 +362,8 @@ bool CExport::export_ (SExportOptions &options, IExportCB *expCB) if (bMustDelete) { - if (!DeleteFile (allFiles[nFile].c_str())) - { + if (!CFile::deleteFile (allFiles[nFile])) + { if (_ExportCB != NULL) _ExportCB->dispWarning (string("Can't delete ") + fileName); } @@ -844,15 +846,15 @@ void CExport::treatPattern (sint32 x, sint32 y, { // Delete the .zone and .zonel file DstZoneFileName = getZoneNameFromXY(x+deltaX+i, y+deltaY+j); - DstZoneFileName = _Options->OutZoneDir + string("\\") + DstZoneFileName; + DstZoneFileName = _Options->OutZoneDir + string("/") + DstZoneFileName; string sTmp = DstZoneFileName + string(".zone"); - DeleteFile (sTmp.c_str()); + CFile::deleteFile (sTmp); DstZoneFileName = DstZoneFileName + string(".zonel"); - DeleteFile (DstZoneFileName.c_str()); + CFile::deleteFile (DstZoneFileName); // Delete the .zonenh file - string DstZoneNoHeightmapFileName = _Options->OutZoneDir + string("\\") + getZoneNameFromXY(x+deltaX+i, y+deltaY+j) + string(".zonenh"); - DeleteFile (DstZoneNoHeightmapFileName.c_str()); + string DstZoneNoHeightmapFileName = _Options->OutZoneDir + string("/") + getZoneNameFromXY(x+deltaX+i, y+deltaY+j) + string(".zonenh"); + CFile::deleteFile (DstZoneNoHeightmapFileName); COFile outFile (DstZoneFileName); UnitZoneLighted.serial (outFile); @@ -876,9 +878,9 @@ void CExport::treatPattern (sint32 x, sint32 y, try { dstIGFileName = getZoneNameFromXY(x+deltaX+i, y+deltaY+j); - dstIGFileName = _Options->OutIGDir + string("\\") + dstIGFileName + string(".ig"); - DeleteFile (dstIGFileName.c_str()); - COFile outFile (dstIGFileName); + dstIGFileName = _Options->OutIGDir + string("/") + dstIGFileName + string(".ig"); + CFile::deleteFile (dstIGFileName); + COFile outFile (dstIGFileName); unitIG.serial(outFile); if (_ExportCB != NULL) _ExportCB->dispInfo (string("Writing ") + getZoneNameFromXY(x+deltaX+i, y+deltaY+j) + ".ig");