|
|
@ -166,7 +166,9 @@ namespace ESSImport
|
|
|
|
|
|
|
|
|
|
|
|
if (i >= file2.mRecords.size())
|
|
|
|
if (i >= file2.mRecords.size())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
std::ios::fmtflags f(std::cout.flags());
|
|
|
|
std::cout << "Record in file1 not present in file2: (1) 0x" << std::hex << rec.mFileOffset << std::endl;
|
|
|
|
std::cout << "Record in file1 not present in file2: (1) 0x" << std::hex << rec.mFileOffset << std::endl;
|
|
|
|
|
|
|
|
std::cout.flags(f);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -174,7 +176,9 @@ namespace ESSImport
|
|
|
|
|
|
|
|
|
|
|
|
if (rec.mName != rec2.mName)
|
|
|
|
if (rec.mName != rec2.mName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
std::ios::fmtflags f(std::cout.flags());
|
|
|
|
std::cout << "Different record name at (2) 0x" << std::hex << rec2.mFileOffset << std::endl;
|
|
|
|
std::cout << "Different record name at (2) 0x" << std::hex << rec2.mFileOffset << std::endl;
|
|
|
|
|
|
|
|
std::cout.flags(f);
|
|
|
|
return; // TODO: try to recover
|
|
|
|
return; // TODO: try to recover
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -185,7 +189,9 @@ namespace ESSImport
|
|
|
|
|
|
|
|
|
|
|
|
if (j >= rec2.mSubrecords.size())
|
|
|
|
if (j >= rec2.mSubrecords.size())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
std::ios::fmtflags f(std::cout.flags());
|
|
|
|
std::cout << "Subrecord in file1 not present in file2: (1) 0x" << std::hex << sub.mFileOffset << std::endl;
|
|
|
|
std::cout << "Subrecord in file1 not present in file2: (1) 0x" << std::hex << sub.mFileOffset << std::endl;
|
|
|
|
|
|
|
|
std::cout.flags(f);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -193,8 +199,10 @@ namespace ESSImport
|
|
|
|
|
|
|
|
|
|
|
|
if (sub.mName != sub2.mName)
|
|
|
|
if (sub.mName != sub2.mName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
std::ios::fmtflags f(std::cout.flags());
|
|
|
|
std::cout << "Different subrecord name (" << rec.mName << "." << sub.mName << " vs. " << sub2.mName << ") at (1) 0x" << std::hex << sub.mFileOffset
|
|
|
|
std::cout << "Different subrecord name (" << rec.mName << "." << sub.mName << " vs. " << sub2.mName << ") at (1) 0x" << std::hex << sub.mFileOffset
|
|
|
|
<< " (2) 0x" << sub2.mFileOffset << std::endl;
|
|
|
|
<< " (2) 0x" << sub2.mFileOffset << std::endl;
|
|
|
|
|
|
|
|
std::cout.flags(f);
|
|
|
|
break; // TODO: try to recover
|
|
|
|
break; // TODO: try to recover
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -203,6 +211,8 @@ namespace ESSImport
|
|
|
|
if (blacklist.find(std::make_pair(rec.mName, sub.mName)) != blacklist.end())
|
|
|
|
if (blacklist.find(std::make_pair(rec.mName, sub.mName)) != blacklist.end())
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::ios::fmtflags f(std::cout.flags());
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << "Different subrecord data for " << rec.mName << "." << sub.mName << " at (1) 0x" << std::hex << sub.mFileOffset
|
|
|
|
std::cout << "Different subrecord data for " << rec.mName << "." << sub.mName << " at (1) 0x" << std::hex << sub.mFileOffset
|
|
|
|
<< " (2) 0x" << sub2.mFileOffset << std::endl;
|
|
|
|
<< " (2) 0x" << sub2.mFileOffset << std::endl;
|
|
|
|
|
|
|
|
|
|
|
@ -235,6 +245,7 @@ namespace ESSImport
|
|
|
|
std::cout << "\033[0m";
|
|
|
|
std::cout << "\033[0m";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
std::cout << std::endl;
|
|
|
|
std::cout << std::endl;
|
|
|
|
|
|
|
|
std::cout.flags(f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -319,7 +330,11 @@ namespace ESSImport
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (unknownRecords.insert(n.val).second)
|
|
|
|
if (unknownRecords.insert(n.val).second)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::ios::fmtflags f(std::cout.flags());
|
|
|
|
std::cerr << "unknown record " << n.toString() << " (0x" << std::hex << esm.getFileOffset() << ")" << std::endl;
|
|
|
|
std::cerr << "unknown record " << n.toString() << " (0x" << std::hex << esm.getFileOffset() << ")" << std::endl;
|
|
|
|
|
|
|
|
std::cout.flags(f);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
esm.skipRecord();
|
|
|
|
esm.skipRecord();
|
|
|
|
}
|
|
|
|
}
|
|
|
|