Remove std::couts littered throughout the base (#1313)

This commit is contained in:
David Markowitz
2023-11-21 18:04:23 -08:00
committed by GitHub
parent 98dc291b57
commit 1a199151da
14 changed files with 29 additions and 91 deletions

View File

@@ -16,6 +16,12 @@
#include "AssetManager.h"
#include "dConfig.h"
void Level::SceneObjectDataChunk::PrintAllObjects() const {
for (const auto& [id, sceneObj] : objects) {
LOG("ID: %d LOT: %d", id, sceneObj.lot);
}
}
Level::Level(Zone* parentZone, const std::string& filepath) {
m_ParentZone = parentZone;
@@ -33,9 +39,9 @@ Level::Level(Zone* parentZone, const std::string& filepath) {
}
Level::~Level() {
for (std::map<uint32_t, Header>::iterator it = m_ChunkHeaders.begin(); it != m_ChunkHeaders.end(); ++it) {
if (it->second.id == Level::ChunkTypeID::FileInfo) delete it->second.fileInfo;
if (it->second.id == Level::ChunkTypeID::SceneObjectData) delete it->second.sceneObjects;
for (auto& [id, header] : m_ChunkHeaders) {
if (header.id == Level::ChunkTypeID::FileInfo) delete header.fileInfo;
if (header.id == Level::ChunkTypeID::SceneObjectData) delete header.sceneObjects;
}
}
@@ -248,8 +254,8 @@ void Level::ReadSceneObjectDataChunk(std::istream& file, Header& header) {
BinaryIO::BinaryRead(file, obj.id);
BinaryIO::BinaryRead(file, obj.lot);
/*if (header.fileInfo->version >= 0x26)*/ BinaryIO::BinaryRead(file, obj.value1);
/*if (header.fileInfo->version >= 0x20)*/ BinaryIO::BinaryRead(file, obj.value2);
/*if (header.fileInfo->version >= 0x26)*/ BinaryIO::BinaryRead(file, obj.nodeType);
/*if (header.fileInfo->version >= 0x20)*/ BinaryIO::BinaryRead(file, obj.glomId);
BinaryIO::BinaryRead(file, obj.position);
BinaryIO::BinaryRead(file, obj.rotation);

View File

@@ -30,11 +30,7 @@ public:
struct SceneObjectDataChunk {
std::map<LWOOBJID, SceneObject> objects;
const void PrintAllObjects() {
for (std::map<LWOOBJID, SceneObject>::iterator it = objects.begin(); it != objects.end(); ++it) {
std::cout << "\t ID: " << it->first << " LOT: " << it->second.lot << std::endl;
}
}
void PrintAllObjects() const;
uint32_t GetObjectCount() { return objects.size(); }
};

View File

@@ -148,6 +148,8 @@ struct PropertyPath {
float repMultiplier;
PropertyRentalPeriod rentalPeriod;
PropertyAchievmentRequired achievementRequired;
// Player respawn coordinates in the main zone (not the property zone)
NiPoint3 playerZoneCoords;
float maxBuildHeight;
};

View File

@@ -12,8 +12,8 @@ struct mapCompareLwoSceneIDs {
struct SceneObject {
LWOOBJID id;
LOT lot;
uint32_t value1;
uint32_t value2;
uint32_t nodeType;
uint32_t glomId;
NiPoint3 position;
NiQuaternion rotation;
float scale = 1.0f;