|
|
@ -2402,6 +2402,24 @@ void CExport::transformCMB (const std::string &name, const NLMISC::CMatrix &tran
|
|
|
|
_ExportCB->dispWarning("Can't find " + cmbNoExtension + ".cmb");
|
|
|
|
_ExportCB->dispWarning("Can't find " + cmbNoExtension + ".cmb");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string outFileName = _Options->OutCMBDir +"/" + cmbNoExtension + ".cmb";
|
|
|
|
|
|
|
|
bool needUpdate = true;
|
|
|
|
|
|
|
|
if (CFile::fileExists(outFileName))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32 outModification = CFile::getFileModificationDate(outFileName);
|
|
|
|
|
|
|
|
needUpdate =
|
|
|
|
|
|
|
|
CFile::getFileModificationDate(cmbName) > outModification
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->HeightMapFile) && (CFile::getFileModificationDate(_Options->HeightMapFile) > outModification))
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->HeightMapFile2) && (CFile::getFileModificationDate(_Options->HeightMapFile2) > outModification))
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->ContinentFile) && (CFile::getFileModificationDate(_Options->ContinentFile) > outModification))
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->ZoneRegionFile) && (CFile::getFileModificationDate(_Options->ZoneRegionFile) > outModification));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (needUpdate)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
|
|
|
|
_ExportCB->dispInfo("UPDATE " + cmbName);
|
|
|
|
|
|
|
|
printf("UPDATE %s\n", cmbName.c_str());
|
|
|
|
|
|
|
|
|
|
|
|
CIFile inStream;
|
|
|
|
CIFile inStream;
|
|
|
|
if (inStream.open(cmbName))
|
|
|
|
if (inStream.open(cmbName))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2412,7 +2430,6 @@ void CExport::transformCMB (const std::string &name, const NLMISC::CMatrix &tran
|
|
|
|
// translate and save
|
|
|
|
// translate and save
|
|
|
|
cmb.transform (transfo);
|
|
|
|
cmb.transform (transfo);
|
|
|
|
COFile outStream;
|
|
|
|
COFile outStream;
|
|
|
|
std::string outFileName = _Options->OutCMBDir +"/" + cmbNoExtension + ".cmb";
|
|
|
|
|
|
|
|
if (!outStream.open(outFileName))
|
|
|
|
if (!outStream.open(outFileName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
if (_ExportCB != NULL)
|
|
|
@ -2452,6 +2469,13 @@ void CExport::transformCMB (const std::string &name, const NLMISC::CMatrix &tran
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
_ExportCB->dispWarning("Unable to open " + cmbName);
|
|
|
|
_ExportCB->dispWarning("Unable to open " + cmbName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
|
|
|
|
_ExportCB->dispInfo("SKIP " + cmbName);
|
|
|
|
|
|
|
|
printf("SKIP %s\n", cmbName.c_str());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
@ -2471,6 +2495,24 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa
|
|
|
|
_ExportCB->dispWarning("Can't find " + igNoExtension + ".cmb");
|
|
|
|
_ExportCB->dispWarning("Can't find " + igNoExtension + ".cmb");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string outFileName = _Options->AdditionnalIGOutDir +"/" + igNoExtension + ".ig";
|
|
|
|
|
|
|
|
bool needUpdate = true;
|
|
|
|
|
|
|
|
if (CFile::fileExists(outFileName))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32 outModification = CFile::getFileModificationDate(outFileName);
|
|
|
|
|
|
|
|
needUpdate =
|
|
|
|
|
|
|
|
CFile::getFileModificationDate(igName) > outModification
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->HeightMapFile) && (CFile::getFileModificationDate(_Options->HeightMapFile) > outModification))
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->HeightMapFile2) && (CFile::getFileModificationDate(_Options->HeightMapFile2) > outModification))
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->ContinentFile) && (CFile::getFileModificationDate(_Options->ContinentFile) > outModification))
|
|
|
|
|
|
|
|
|| (CFile::fileExists(_Options->ZoneRegionFile) && (CFile::getFileModificationDate(_Options->ZoneRegionFile) > outModification));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (needUpdate)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
|
|
|
|
_ExportCB->dispInfo("UPDATE " + igName);
|
|
|
|
|
|
|
|
printf("UPDATE %s\n", igName.c_str());
|
|
|
|
|
|
|
|
|
|
|
|
CIFile inStream;
|
|
|
|
CIFile inStream;
|
|
|
|
if (inStream.open(igName))
|
|
|
|
if (inStream.open(igName))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2524,7 +2566,6 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa
|
|
|
|
igOut.enableRealTimeSunContribution(realTimeSuncontribution);
|
|
|
|
igOut.enableRealTimeSunContribution(realTimeSuncontribution);
|
|
|
|
|
|
|
|
|
|
|
|
COFile outStream;
|
|
|
|
COFile outStream;
|
|
|
|
std::string outFileName = _Options->AdditionnalIGOutDir +"/" + igNoExtension + ".ig";
|
|
|
|
|
|
|
|
if (!outStream.open(outFileName))
|
|
|
|
if (!outStream.open(outFileName))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
if (_ExportCB != NULL)
|
|
|
@ -2564,6 +2605,13 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
_ExportCB->dispWarning("Unable to open " + igName);
|
|
|
|
_ExportCB->dispWarning("Unable to open " + igName);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (_ExportCB != NULL)
|
|
|
|
|
|
|
|
_ExportCB->dispInfo("SKIP " + igName);
|
|
|
|
|
|
|
|
printf("SKIP %s\n", igName.c_str());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|