1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 01:15:35 +00:00

Restore missing std::endl removed by an overeager regex

This commit is contained in:
jvoisin 2023-06-01 13:44:44 +02:00
parent 0e33730f5d
commit 3152078c7e
21 changed files with 100 additions and 99 deletions

View file

@ -143,7 +143,7 @@ void ESM4::MediaLocationController::load(ESM4::Reader& reader)
else if (i < subHdr.dataSize-1)
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
#else
reader.skipSubRecordData();
#endif

View file

@ -203,7 +203,7 @@ void ESM4::Armor::load(ESM4::Reader& reader)
}
}
// if ((mArmorFlags&0xffff) == 0x02) // only hair
// std::cout << "only hair " << mEditorId;
// std::cout << "only hair " << mEditorId << std::endl;
}
// void ESM4::Armor::save(ESM4::Writer& writer) const

View file

@ -101,7 +101,7 @@ void ESM4::BodyPartData::load(ESM4::Reader& reader)
}
// if (mEditorId == "DefaultBodyPartData")
// std::cout << "BPTD: " << mEditorId; // FIXME: testing only
// std::cout << "BPTD: " << mEditorId << std::endl; // FIXME: testing only
}
// void ESM4::BodyPartData::save(ESM4::Writer& writer) const

View file

@ -87,7 +87,7 @@ void ESM4::Cell::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "CELL Editor ID: " << mEditorId;
std::cout << padding << "CELL Editor ID: " << mEditorId << std::endl;
#endif
break;
}
@ -110,9 +110,9 @@ void ESM4::Cell::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "CELL group " << ESM4::printLabel(reader.grp().label, reader.grp().type);
std::cout << padding << "CELL formId " << std::hex << reader.hdr().record.id;
std::cout << padding << "CELL X " << std::dec << mX << ", Y " << mY;
std::cout << padding << "CELL group " << ESM4::printLabel(reader.grp().label, reader.grp().type) << std::endl;
std::cout << padding << "CELL formId " << std::hex << reader.hdr().record.id << std::endl;
std::cout << padding << "CELL X " << std::dec << mX << ", Y " << mY << std::endl;
#endif
if (esmVer == ESM::VER_094 || esmVer == ESM::VER_170 || isFONV)
if (subHdr.dataSize == 12)
@ -145,7 +145,7 @@ void ESM4::Cell::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "flags: " << std::hex << mCellFlags;
std::cout << padding << "flags: " << std::hex << mCellFlags << std::endl;
#endif
break;
}
@ -158,7 +158,7 @@ void ESM4::Cell::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "region: " << std::hex << *it;
std::cout << padding << "region: " << std::hex << *it << std::endl;
#endif
}
break;

View file

@ -97,7 +97,7 @@ void ESM4::Clothing::load(ESM4::Reader& reader)
}
}
// if ((mClothingFlags&0xffff) == 0x02) // only hair
// std::cout << "only hair " << mEditorId;
// std::cout << "only hair " << mEditorId << std::endl;
}
// void ESM4::Clothing::save(ESM4::Writer& writer) const

View file

@ -109,7 +109,7 @@ void ESM4::Land::load(ESM4::Reader& reader)
#if 0
std::cout << "Base Texture formid: 0x"
<< std::hex << mTextures[base.quadrant].base.formId
<< ", quad " << std::dec << (int)base.quadrant;
<< ", quad " << std::dec << (int)base.quadrant << std::endl;
#endif
}
break;
@ -139,9 +139,9 @@ void ESM4::Land::load(ESM4::Reader& reader)
#if 0
std::cout << "Additional Texture formId: 0x"
<< std::hex << layer.texture.formId
<< ", quad " << std::dec << (int)layer.texture.quadrant;
<< ", quad " << std::dec << (int)layer.texture.quadrant << std::endl;
std::cout << "Additional Texture layer: "
<< std::dec << (int)layer.texture.layerIndex;
<< std::dec << (int)layer.texture.layerIndex << std::endl;
#endif
currentAddQuad = layer.texture.quadrant;
break;
@ -163,7 +163,7 @@ void ESM4::Land::load(ESM4::Reader& reader)
{
reader.get(*it);
// FIXME: debug only
// std::cout << "pos: " << std::dec << (int)(*it).position;
// std::cout << "pos: " << std::dec << (int)(*it).position << std::endl;
}
}
mTextures[currentAddQuad].layers.push_back(layer);
@ -176,7 +176,7 @@ void ESM4::Land::load(ESM4::Reader& reader)
currentAddQuad = -1;
layer.data.clear();
// FIXME: debug only
// std::cout << "VTXT: count " << std::dec << count;
// std::cout << "VTXT: count " << std::dec << count << std::endl;
break;
}
case ESM4::SUB_VTEX: // only in Oblivion?
@ -192,7 +192,7 @@ void ESM4::Land::load(ESM4::Reader& reader)
{
reader.getFormId(*it);
// FIXME: debug only
// std::cout << "VTEX: " << std::hex << *it;
// std::cout << "VTEX: " << std::hex << *it << std::endl;
}
}
break;
@ -215,16 +215,16 @@ void ESM4::Land::load(ESM4::Reader& reader)
{
if (mTextures[i].base.formId == 0)
{
// std::cout << "ESM4::LAND " << ESM4::formIdToString(mFormId) << " missing base, quad " << i;
// std::cout << "layers " << mTextures[i].layers.size();
// std::cout << "ESM4::LAND " << ESM4::formIdToString(mFormId) << " missing base, quad " << i << std::endl;
// std::cout << "layers " << mTextures[i].layers.size() << std::endl;
// NOTE: can't set the default here since FO3/FONV may have different defaults
// mTextures[i].base.formId = 0x000008C0; // TerrainHDDirt01.dds
missing = true;
}
// else
//{
// std::cout << "ESM4::LAND " << ESM4::formIdToString(mFormId) << " base, quad " << i;
// std::cout << "layers " << mTextures[i].layers.size();
// std::cout << "ESM4::LAND " << ESM4::formIdToString(mFormId) << " base, quad " << i << std::endl;
// std::cout << "layers " << mTextures[i].layers.size() << std::endl;
// }
}
// at least one of the quadrants do not have a base texture, return without setting the flag

View file

@ -68,7 +68,7 @@ void ESM4::LevelledCreature::load(ESM4::Reader& reader)
reader.get(lvlo.item);
reader.get(lvlo.count);
// std::cout << "LVLC " << mEditorId << " LVLO lev " << lvlo.level << ", item " << lvlo.item
// << /g", count " << lvlo.count;
// << /g", count " << lvlo.count << std::endl;
// FIXME: seems to happen only once, don't add to mLvlObject
// LVLC TesKvatchCreature LVLO lev 1, item 1393819648, count 2
// 0x0001, 0x5314 0000, 0x0002

View file

@ -90,7 +90,7 @@ void ESM4::LevelledItem::load(ESM4::Reader& reader)
// FIXME: testing
// if (mHasLvlItemFlags && mChanceNone >= 90)
// std::cout << "LVLI " << mEditorId << " chance none " << int(mChanceNone);
// std::cout << "LVLI " << mEditorId << " chance none " << int(mChanceNone) << std::endl;
}
bool ESM4::LevelledItem::calcAllLvlLessThanPlayer() const

View file

@ -45,7 +45,7 @@ void ESM4::Navigation::IslandInfo::load(ESM4::Reader& reader)
if (count)
{
triangles.resize(count);
// std::cout << "NVMI island triangles " << std::dec << count; // FIXME
// std::cout << "NVMI island triangles " << std::dec << count << std::endl; // FIXME
for (std::vector<Navigation::Triangle>::iterator it = triangles.begin(); it != triangles.end(); ++it)
{
reader.get(*it);
@ -63,7 +63,7 @@ void ESM4::Navigation::IslandInfo::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "NVMI vert " << std::dec << (*it).x << ", " << (*it).y << ", " << (*it).z;
std::cout << padding << "NVMI vert " << std::dec << (*it).x << ", " << (*it).y << ", " << (*it).z << std::endl;
#endif
}
}
@ -88,9 +88,9 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
padding.insert(0, 4, '.');
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "NVMI formId: 0x" << std::hex << formId;
std::cout << padding << "NVMI flags: " << std::hex << flags;
std::cout << padding << "NVMI center: " << std::dec << x << ", " << y << ", " << z;
std::cout << padding << "NVMI formId: 0x" << std::hex << formId << std::endl;
std::cout << padding << "NVMI flags: " << std::hex << flags << std::endl;
std::cout << padding << "NVMI center: " << std::dec << x << ", " << y << ", " << z << std::endl;
#endif
reader.get(flagPrefMerges);
@ -98,7 +98,7 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
reader.get(count); // countMerged;
if (count)
{
// std::cout << "NVMI countMerged " << std::dec << count;
// std::cout << "NVMI countMerged " << std::dec << count << std::endl;
formIdMerged.resize(count);
for (FormId& value : formIdMerged)
reader.getFormId(value);
@ -107,7 +107,7 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
reader.get(count); // countPrefMerged;
if (count)
{
// std::cout << "NVMI countPrefMerged " << std::dec << count;
// std::cout << "NVMI countPrefMerged " << std::dec << count << std::endl;
formIdPrefMerged.resize(count);
for (FormId& value : formIdPrefMerged)
reader.getFormId(value);
@ -116,7 +116,7 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
reader.get(count); // countLinkedDoors;
if (count)
{
// std::cout << "NVMI countLinkedDoors " << std::dec << count;
// std::cout << "NVMI countLinkedDoors " << std::dec << count << std::endl;
linkedDoors.resize(count);
for (std::vector<DoorRef>::iterator it = linkedDoors.begin(); it != linkedDoors.end(); ++it)
{
@ -133,7 +133,7 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
islandInfo.push_back(island2); // Maybe don't use a vector for just one entry?
}
// else if (flags == FLG_Island) // FIXME: debug only
// std::cerr << "nvmi no island but has 0x20 flag";
// std::cerr << "nvmi no island but has 0x20 flag" << std::endl;
reader.get(locationMarker);
@ -151,9 +151,9 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
if (worldSpaceId == ESM4::FLG_Morrowind)
std::cout << padding << "NVMI MW: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y;
std::cout << padding << "NVMI MW: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y << std::endl;
else
std::cout << padding << "NVMI SR: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y;
std::cout << padding << "NVMI SR: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y << std::endl;
#endif
}
else
@ -164,9 +164,9 @@ void ESM4::Navigation::NavMeshInfo::load(ESM4::Reader& reader)
#if 0
if (worldSpaceId == 0) // interior
std::cout << "NVMI Interior: cellId " << std::hex << cellGrid.cellId;
std::cout << "NVMI Interior: cellId " << std::hex << cellGrid.cellId << std::endl;
else
std::cout << "NVMI FormID: cellId " << std::hex << cellGrid.cellId;
std::cout << "NVMI FormID: cellId " << std::hex << cellGrid.cellId << std::endl;
#endif
}
}
@ -277,7 +277,7 @@ void ESM4::Navigation::load(ESM4::Reader& reader)
mPreferredPaths.push_back(std::make_pair(node, preferredPaths));
#if 0
std::cout << "node " << std::hex << node // FIXME: debugging only
<< ", count " << count << ", i " << std::dec << i;
<< ", count " << count << ", i " << std::dec << i << std::endl;
#endif
}
reader.get(count);
@ -289,7 +289,7 @@ void ESM4::Navigation::load(ESM4::Reader& reader)
mPreferredPaths.push_back(std::make_pair(node, preferredPaths)); // empty
#if 0
std::cout << "node " << std::hex << node // FIXME: debugging only
<< ", count " << 0;
<< ", count " << 0 << std::endl;
#endif
reader.get(count); // HACK
@ -303,7 +303,7 @@ void ESM4::Navigation::load(ESM4::Reader& reader)
reader.get(index);
#if 0
std::cout << "node " << std::hex << node // FIXME: debugging only
<< ", index " << index << ", i " << std::dec << total+i;
<< ", index " << index << ", i " << std::dec << total+i << std::endl;
#endif
FormId nodeFormId = FormId::fromUint32(node); // should we apply reader.adjustFormId?
// std::pair<std::map<FormId, std::uint32_t>::iterator, bool> res =
@ -318,7 +318,7 @@ void ESM4::Navigation::load(ESM4::Reader& reader)
{
std::uint32_t version; // always the same? (0x0c)
reader.get(version); // TODO: store this or use it for merging?
// std::cout << "NAVI version " << std::dec << version;
// std::cout << "NAVI version " << std::dec << version << std::endl;
break;
}
case ESM4::SUB_NVMI: // multiple
@ -329,7 +329,7 @@ void ESM4::Navigation::load(ESM4::Reader& reader)
break;
}
// std::cout << "\nNVMI start";
// std::cout << "\nNVMI start" << std::endl;
NavMeshInfo nvmi;
nvmi.load(reader);
mNavMeshInfo.push_back(nvmi);

View file

@ -37,7 +37,7 @@
void ESM4::NavMesh::NVNMstruct::load(ESM4::Reader& reader)
{
// std::cout << "start: divisor " << std::dec << divisor << ", segments " << triSegments.size() << //std::endl;
//"this 0x" << this; // FIXME
//"this 0x" << this << std::endl; // FIXME
std::uint32_t count;
@ -73,9 +73,9 @@ void ESM4::NavMesh::NVNMstruct::load(ESM4::Reader& reader)
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
if (worldSpaceId == ESM4::FLG_Morrowind)
std::cout << padding << "NVNM MW: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y;
std::cout << padding << "NVNM MW: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y << std::endl;
else
std::cout << padding << "NVNM SR: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y;
std::cout << padding << "NVNM SR: X " << std::dec << cellGrid.grid.x << ", Y " << cellGrid.grid.y << std::endl;
#endif
}
else
@ -88,9 +88,9 @@ void ESM4::NavMesh::NVNMstruct::load(ESM4::Reader& reader)
std::string padding; // FIXME
padding.insert(0, reader.stackSize()*2, ' ');
if (worldSpaceId == 0) // interior
std::cout << padding << "NVNM Interior: cellId " << std::hex << cellGrid.cellId;
std::cout << padding << "NVNM Interior: cellId " << std::hex << cellGrid.cellId << std::endl;
else
std::cout << padding << "NVNM FormID: cellId " << std::hex << cellGrid.cellId;
std::cout << padding << "NVNM FormID: cellId " << std::hex << cellGrid.cellId << std::endl;
#endif
}
@ -104,7 +104,7 @@ void ESM4::NavMesh::NVNMstruct::load(ESM4::Reader& reader)
// FIXME: debugging only
#if 0
//if (reader.hdr().record.id == 0x2004ecc) // FIXME
std::cout << "nvnm vert " << (*it).x << ", " << (*it).y << ", " << (*it).z;
std::cout << "nvnm vert " << (*it).x << ", " << (*it).y << ", " << (*it).z << std::endl;
#endif
}
}
@ -128,7 +128,7 @@ void ESM4::NavMesh::NVNMstruct::load(ESM4::Reader& reader)
reader.get(*it);
// FIXME: debugging only
#if 0
std::cout << "nvnm ext 0x" << std::hex << (*it).navMesh;
std::cout << "nvnm ext 0x" << std::hex << (*it).navMesh << std::endl;
#endif
}
}
@ -184,7 +184,7 @@ void ESM4::NavMesh::NVNMstruct::load(ESM4::Reader& reader)
#if 0
if (triSegments.size() != divisor*divisor)
std::cout << "divisor " << std::dec << divisor << ", segments " << triSegments.size() << //std::endl;
"this 0x" << this;
"this 0x" << this << std::endl;
#endif
}
@ -193,15 +193,15 @@ void ESM4::NavMesh::load(ESM4::Reader& reader)
mFormId = reader.hdr().record.getFormId();
mFlags = reader.hdr().record.flags;
// std::cout << "NavMesh 0x" << std::hex << this; // FIXME
// std::cout << "NavMesh 0x" << std::hex << this << std::endl; // FIXME
std::uint32_t subSize = 0; // for XXXX sub record
// FIXME: debugging only
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "NAVM flags 0x" << std::hex << reader.hdr().record.flags;
std::cout << padding << "NAVM id 0x" << std::hex << reader.hdr().record.id;
std::cout << padding << "NAVM flags 0x" << std::hex << reader.hdr().record.flags << std::endl;
std::cout << padding << "NAVM id 0x" << std::hex << reader.hdr().record.id << std::endl;
#endif
while (reader.getSubRecordHeader())
{
@ -251,7 +251,7 @@ void ESM4::NavMesh::load(ESM4::Reader& reader)
"ESM4::NAVM::load - Unknown subrecord " + ESM::printName(reader.subRecordHeader().typeId));
}
}
// std::cout << "num nvnm " << std::dec << mData.size(); // FIXME
// std::cout << "num nvnm " << std::dec << mData.size() << std::endl; // FIXME
}
// void ESM4::NavMesh::save(ESM4::Writer& writer) const

View file

@ -215,8 +215,8 @@ void ESM4::Npc::load(ESM4::Reader& reader)
case ESM4::SUB_FNAM:
{
reader.get(mFgRace);
// std::cout << "race " << mEditorId << " " << mRace; // FIXME
// std::cout << "fg race " << mEditorId << " " << mFgRace; // FIXME
// std::cout << "race " << mEditorId << " " << mRace << std::endl; // FIXME
// std::cout << "fg race " << mEditorId << " " << mFgRace << std::endl; // FIXME
break;
}
case ESM4::SUB_PNAM: // FO3/FONV/TES5
@ -270,7 +270,7 @@ void ESM4::Npc::load(ESM4::Reader& reader)
else if (i < (size_t)(subHdr.dataSize - 1)) // quiesce gcc
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
#else
reader.skipSubRecordData();
#endif

View file

@ -50,7 +50,7 @@ void ESM4::AIPackage::load(ESM4::Reader& reader)
{
if (subHdr.dataSize != sizeof(PKDT) && subHdr.dataSize == 4)
{
// std::cout << "skip fallout" << mEditorId; // FIXME
// std::cout << "skip fallout" << mEditorId << std::endl; // FIXME
reader.get(mData.flags);
mData.type = 0; // FIXME
}

View file

@ -85,7 +85,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader)
// CELL formId 00049E2A
// PGRD formId 000304B7
// if (mFormId == 0x0001C2C8)
// std::cout << link.startNode << "," << link.endNode;
// std::cout << link.startNode << "," << link.endNode << std::endl;
mLinks.push_back(link);
}
}
@ -138,7 +138,7 @@ void ESM4::Pathgrid::load(ESM4::Reader& reader)
else if (i < subHdr.dataSize-1)
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
#else
reader.skipSubRecordData();
#endif

View file

@ -60,7 +60,7 @@ void ESM4::Quest::load(ESM4::Reader& reader)
mData.questDelay = 0.f; // unused in TES4 but keep it clean
// if ((mData.flags & Flag_StartGameEnabled) != 0)
// std::cout << "start quest " << mEditorId;
// std::cout << "start quest " << mEditorId << std::endl;
}
else
reader.get(mData); // FO3
@ -163,7 +163,7 @@ void ESM4::Quest::load(ESM4::Reader& reader)
}
}
// if (mEditorId == "DAConversations")
// std::cout << mEditorId;
// std::cout << mEditorId << std::endl;
}
// void ESM4::Quest::save(ESM4::Writer& writer) const

View file

@ -51,7 +51,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
while (reader.getSubRecordHeader())
{
const ESM4::SubRecordHeader& subHdr = reader.subRecordHeader();
// std::cout << "RACE " << ESM::printName(subHdr.typeId);
// std::cout << "RACE " << ESM::printName(subHdr.typeId) << std::endl;
switch (subHdr.typeId)
{
case ESM4::SUB_EDID:
@ -127,7 +127,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
else if (i < 256/*bufSize*/-1)
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
#else
if (subHdr.dataSize == 36) // TES4/FO3/FONV
{
@ -344,12 +344,12 @@ void ESM4::Race::load(ESM4::Reader& reader)
}
// else if (curr_part == 2) // egt
// {
// // std::cout << mEditorId << " egt " << currentIndex; // FIXME
// // std::cout << mEditorId << " egt " << currentIndex << std::endl; // FIXME
// reader.skipSubRecordData(); // FIXME TES5 egt
// }
else
{
// std::cout << mEditorId << " hkx " << currentIndex; // FIXME
// std::cout << mEditorId << " hkx " << currentIndex << std::endl; // FIXME
reader.skipSubRecordData(); // FIXME TES5 hkx
}
@ -545,7 +545,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
case ESM4::SUB_WNAM: // ARMO FormId
{
reader.getFormId(mSkin);
// std::cout << mEditorId << " skin " << formIdToString(mSkin); // FIXME
// std::cout << mEditorId << " skin " << formIdToString(mSkin) << std::endl; // FIXME
break;
}
case ESM4::SUB_BODT: // body template
@ -582,7 +582,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
mHeadPartIdsFemale[currentIndex] = formId;
// std::cout << mEditorId << (isMale ? " male head " : " female head ")
// << /gformIdToString(formId) << " " << currentIndex; // FIXME
// << formIdToString(formId) << " " << currentIndex << std::endl; // FIXME
break;
}
@ -630,7 +630,7 @@ void ESM4::Race::load(ESM4::Reader& reader)
{
std::string name;
reader.getZString(name);
// std::cout << mEditorId << " " << name;
// std::cout << mEditorId << " " << name << std::endl;
break;
}

View file

@ -67,11 +67,11 @@ void ESM4::Reference::load(ESM4::Reader& reader)
if (mFlags & ESM4::Rec_Disabled)
std::cout << "REFR disable at start " << formIdToString(mFormId) <<
" baseobj " << formIdToString(mBaseObj) <<
" " << (mEditorId.empty() ? "" : mEditorId); // FIXME
" " << (mEditorId.empty() ? "" : mEditorId) << std::endl; // FIXME
#endif
// if (mBaseObj == 0x20) // e.g. FO3 mFormId == 0x0007E90F
// if (mBaseObj == 0x17)
// std::cout << mEditorId;
// std::cout << mEditorId << std::endl;
break;
}
case ESM4::SUB_DATA:
@ -94,7 +94,7 @@ void ESM4::Reference::load(ESM4::Reader& reader)
reader.getFormId(mEsp.parent);
reader.get(mEsp.flags);
// std::cout << "REFR parent: " << formIdToString(mEsp.parent) << " ref " << formIdToString(mFormId)
// << /g", 0x" << std::hex << (mEsp.flags & 0xff);// FIXME
// << ", 0x" << std::hex << (mEsp.flags & 0xff) << std::endl;// FIXME
break;
}
case ESM4::SUB_XTEL:
@ -103,7 +103,7 @@ void ESM4::Reference::load(ESM4::Reader& reader)
reader.get(mDoor.destPos);
if (esmVer == ESM::VER_094 || esmVer == ESM::VER_170 || isFONV)
reader.get(mDoor.flags); // not in Obvlivion
// std::cout << "REFR dest door: " << formIdToString(mDoor.destDoor);// FIXME
// std::cout << "REFR dest door: " << formIdToString(mDoor.destDoor) << std::endl;// FIXME
break;
}
case ESM4::SUB_XSED:
@ -113,18 +113,18 @@ void ESM4::Reference::load(ESM4::Reader& reader)
{
uint8_t data;
reader.get(data);
// std::cout << "REFR XSED " << std::hex << (int)data;
// std::cout << "REFR XSED " << std::hex << (int)data << std::endl;
break;
}
else if (subHdr.dataSize == 4)
{
uint32_t data;
reader.get(data);
// std::cout << "REFR XSED " << std::hex << (int)data;
// std::cout << "REFR XSED " << std::hex << (int)data << std::endl;
break;
}
// std::cout << "REFR XSED dataSize: " << subHdr.dataSize;// FIXME
// std::cout << "REFR XSED dataSize: " << subHdr.dataSize << std::endl;// FIXME
reader.skipSubRecordData();
break;
}
@ -145,7 +145,7 @@ void ESM4::Reference::load(ESM4::Reader& reader)
// std::endl;
break;
}
// std::cout << "REFR XLOD dataSize: " << subHdr.dataSize;// FIXME
// std::cout << "REFR XLOD dataSize: " << subHdr.dataSize << std::endl;// FIXME
reader.skipSubRecordData();
break;
}
@ -155,11 +155,11 @@ void ESM4::Reference::load(ESM4::Reader& reader)
{
uint32_t data;
reader.get(data);
// std::cout << "REFR XACT " << std::hex << (int)data;
// std::cout << "REFR XACT " << std::hex << (int)data << std::endl;
break;
}
// std::cout << "REFR XACT dataSize: " << subHdr.dataSize;// FIXME
// std::cout << "REFR XACT dataSize: " << subHdr.dataSize << std::endl;// FIXME
reader.skipSubRecordData();
break;
}
@ -177,7 +177,7 @@ void ESM4::Reference::load(ESM4::Reader& reader)
// XRTM : 000A4DD7 in OblivionRDCavesMiddleA05 (maybe spawn points?)
FormId marker;
reader.getFormId(marker);
// std::cout << "REFR " << mEditorId << " XRTM : " << formIdToString(marker);// FIXME
// std::cout << "REFR " << mEditorId << " XRTM : " << formIdToString(marker) << std::endl;// FIXME
break;
}
case ESM4::SUB_TNAM: // reader.get(mMapMarker); break;
@ -196,14 +196,14 @@ void ESM4::Reference::load(ESM4::Reader& reader)
case ESM4::SUB_FNAM:
{
// std::cout << "REFR " << ESM::printName(subHdr.typeId) << " skipping..."
// << /gsubHdr.dataSize;
// << subHdr.dataSize << std::endl;
reader.skipSubRecordData();
break;
}
case ESM4::SUB_XTRG: // formId
{
reader.getFormId(mTargetRef);
// std::cout << "REFR XRTG : " << formIdToString(id);// FIXME
// std::cout << "REFR XRTG : " << formIdToString(id) << std::endl;// FIXME
break;
}
case ESM4::SUB_CNAM:
@ -222,7 +222,7 @@ void ESM4::Reference::load(ESM4::Reader& reader)
{
reader.getFormId(sid);
// if (mFormId == 0x0016b74B)
// std::cout << "REFR SCRO : " << formIdToString(sid);// FIXME
// std::cout << "REFR SCRO : " << formIdToString(sid) << std::endl;// FIXME
break;
}
case ESM4::SUB_XLOC:
@ -330,7 +330,7 @@ void ESM4::Reference::load(ESM4::Reader& reader)
}
}
// if (mFormId == 0x0016B74B) // base is TACT vCasinoUltraLuxeRadio in cell ULCasino
// std::cout << "REFR SCRO " << formIdToString(sid);
// std::cout << "REFR SCRO " << formIdToString(sid) << std::endl;
}
// void ESM4::Reference::save(ESM4::Writer& writer) const

View file

@ -66,7 +66,7 @@ void ESM4::Region::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "RPLD: 0x" << std::hex << *it;
std::cout << padding << "RPLD: 0x" << std::hex << *it << std::endl;
#endif
}
@ -89,7 +89,7 @@ void ESM4::Region::load(ESM4::Reader& reader)
#if 0
int dummy;
reader.get(dummy);
std::cout << "REGN " << mEditorId << " " << dummy;
std::cout << "REGN " << mEditorId << " " << dummy << std::endl;
#else
reader.skipSubRecordData();
#endif
@ -98,7 +98,7 @@ void ESM4::Region::load(ESM4::Reader& reader)
case ESM4::SUB_RDMO: // not seen in FO3/FONV?
{
// std::cout << "REGN " << ESM::printName(subHdr.typeId) << " skipping..."
// << subHdr.dataSize;
// << subHdr.dataSize << std::endl;
reader.skipSubRecordData();
break;
}

View file

@ -68,7 +68,7 @@ void ESM4::Script::load(ESM4::Reader& reader)
else if (i < 256/*bufSize*/-1)
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
#else
reader.get(mScript.scriptHeader);
#endif
@ -77,7 +77,7 @@ void ESM4::Script::load(ESM4::Reader& reader)
case ESM4::SUB_SCTX:
reader.getString(mScript.scriptSource);
// if (mEditorId == "CTrapLogs01SCRIPT")
// std::cout << mScript.scriptSource;
// std::cout << mScript.scriptSource << std::endl;
break;
case ESM4::SUB_SCDA: // compiled script data
{
@ -85,12 +85,12 @@ void ESM4::Script::load(ESM4::Reader& reader)
#if 0
if (subHdr.dataSize >= 4096)
{
std::cout << "Skipping " << mEditorId;
std::cout << "Skipping " << mEditorId << std::endl;
reader.skipSubRecordData();
break;
}
std::cout << mEditorId;
std::cout << mEditorId << std::endl;
unsigned char mDataBuf[4096/*bufSize*/];
reader.get(mDataBuf, subHdr.dataSize);
@ -107,7 +107,7 @@ void ESM4::Script::load(ESM4::Reader& reader)
else if (i < 4096/*bufSize*/-1)
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
#else
reader.skipSubRecordData();
#endif

View file

@ -54,7 +54,7 @@ void ESM4::Static::load(ESM4::Reader& reader)
{
// version is only availabe in TES5 (seems to be 27 or 28?)
// if (reader.esmVersion() == ESM::VER_094 || reader.esmVersion() == ESM::VER_170)
// std::cout << "STAT MODT ver: " << std::hex << reader.hdr().record.version;
// std::cout << "STAT MODT ver: " << std::hex << reader.hdr().record.version << std::endl;
// for TES4 these are just a sequence of bytes
mMODT.resize(subHdr.dataSize / sizeof(std::uint8_t));
@ -64,7 +64,7 @@ void ESM4::Static::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "MODT: " << std::hex << *it;
std::cout << padding << "MODT: " << std::hex << *it << std::endl;
#endif
}
break;

View file

@ -91,7 +91,7 @@ void ESM4::Header::load(ESM4::Reader& reader)
#if 0
std::string padding;
padding.insert(0, reader.stackSize()*2, ' ');
std::cout << padding << "ESM4::Header::ONAM overrides: " << formIdToString(mOverride);
std::cout << padding << "ESM4::Header::ONAM overrides: " << formIdToString(mOverride) << std::endl;
#endif
}
break;

View file

@ -457,7 +457,7 @@ namespace ESM4
else if (i < uncompressedSize - 1)
ss << " ";
}
std::cout << ss.str();
std::cout << ss.str() << std::endl;
}
// #endif
mStream = std::make_unique<Files::StreamWithBuffer<Bsa::MemoryInputStream>>(std::move(memoryStreamPtr));
@ -519,14 +519,15 @@ namespace ESM4
std::string padding; // FIXME: debugging only
padding.insert(0, mCtx.groupStack.size() * 2, ' ');
std::cout << padding << "Starting record group "
<< printLabel(mCtx.recordHeader.group.label, mCtx.recordHeader.group.type);
<< printLabel(mCtx.recordHeader.group.label, mCtx.recordHeader.group.type) << std::endl;
#endif
// empty group if the group size is same as the header size
if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
{
#ifdef DEBUG_GROUPSTACK
std::cout << padding << "Ignoring record group " // FIXME: debugging only
<< printLabel(mCtx.recordHeader.group.label, mCtx.recordHeader.group.type) << " (empty)";
<< printLabel(mCtx.recordHeader.group.label, mCtx.recordHeader.group.type) << " (empty)"
<< std::endl;
#endif
if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
{
@ -567,7 +568,7 @@ namespace ESM4
#ifdef DEBUG_GROUPSTACK
std::string padding; // FIXME: debugging only
padding.insert(0, mCtx.groupStack.size() * 2, ' ');
std::cout << padding << "Finished record group " << printLabel(grp.label, grp.type);
std::cout << padding << "Finished record group " << printLabel(grp.label, grp.type) << std::endl;
#endif
// if the previous group was the final one no need to do below
if (mCtx.groupStack.empty())
@ -582,7 +583,7 @@ namespace ESM4
// #if 0
if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
std::cerr << printLabel(mCtx.groupStack.back().first.label, mCtx.groupStack.back().first.type)
<< " read more records than available";
<< " read more records than available" << std::endl;
// #endif
}
}
@ -621,7 +622,7 @@ namespace ESM4
std::string padding; // FIXME: debugging only
padding.insert(0, mCtx.groupStack.size() * 2, ' ');
std::cout << padding << "Skipping record group "
<< printLabel(mCtx.recordHeader.group.label, mCtx.recordHeader.group.type);
<< printLabel(mCtx.recordHeader.group.label, mCtx.recordHeader.group.type) << std::endl;
#endif
// subtract the size of header already read before skipping
std::uint32_t skipSize = mCtx.recordHeader.group.groupSize - (std::uint32_t)mCtx.recHeaderSize;