|
|
|
@ -41,7 +41,9 @@
|
|
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#ifdef NL_OS_WINDOWS
|
|
|
|
|
# include <windows.h>
|
|
|
|
|
#endif // NL_OS_WINDOWS
|
|
|
|
|
|
|
|
|
|
using namespace NL3D;
|
|
|
|
|
using namespace NLMISC;
|
|
|
|
@ -360,7 +362,7 @@ 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,8 +878,8 @@ 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());
|
|
|
|
|
dstIGFileName = _Options->OutIGDir + string("/") + dstIGFileName + string(".ig");
|
|
|
|
|
CFile::deleteFile (dstIGFileName);
|
|
|
|
|
COFile outFile (dstIGFileName);
|
|
|
|
|
unitIG.serial(outFile);
|
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
|