mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-21 10:49:23 +00:00
Replaced uses of std::cout with Log::Write and Log::Error
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "CPakFile.h"
|
||||
#include <Common/Log.h>
|
||||
#include <Common/types.h>
|
||||
#include <FileIO/CMemoryInStream.h>
|
||||
#include <FileIO/FileIO.h>
|
||||
@@ -97,7 +98,6 @@ std::vector<u8>* CPakFile::getResource(SResInfo& info)
|
||||
bool dcmp = decompress(cmp_buf.data(), cmp_buf.size(), res_buf->data(), res_buf->size());
|
||||
|
||||
if (!dcmp) {
|
||||
std::cout << "Error: Unable to decompress " << info.resType.ToString() << " 0x" << std::hex << std::setw(8) << std::setfill('0') << info.resID << std::dec << "\n";
|
||||
delete res_buf;
|
||||
return nullptr;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ bool CPakFile::decompress(u8 *src, u32 src_len, u8 *dst, u32 dst_len)
|
||||
}
|
||||
|
||||
if ((ret != Z_OK) && (ret != Z_STREAM_END)) {
|
||||
std::cout << "zlib error: " << std::dec << ret << "\n";
|
||||
Log::Error("zlib error: " + TString::FromInt32(ret, 0, 10));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ bool CPakFile::decompress(u8 *src, u32 src_len, u8 *dst, u32 dst_len)
|
||||
}
|
||||
|
||||
if (ret != LZO_E_OK) {
|
||||
std::cout << "LZO error: " << std::dec << ret << "\n";
|
||||
Log::Error("LZO error: " + TString::FromInt32(ret, 0, 10));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "CTextureEncoder.h"
|
||||
#include <iostream>
|
||||
#include <Common/Log.h>
|
||||
|
||||
CTextureEncoder::CTextureEncoder()
|
||||
{
|
||||
@@ -62,7 +62,7 @@ void CTextureEncoder::EncodeTXTR(IOutputStream& TXTR, CTexture *pTex)
|
||||
{
|
||||
if (pTex->mTexelFormat != eDXT1)
|
||||
{
|
||||
std::cout << "\rError: Unsupported texel format for decoding\n";
|
||||
Log::Error("Unsupported texel format for decoding");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ void CWorldLoader::LoadPrimeMLVL(IInputStream& MLVL)
|
||||
}
|
||||
|
||||
u32 NumCoordinates = MLVL.ReadLong();
|
||||
if (NumCoordinates != 4) std::cout << "\rError: Dock coordinate count not 4\n";
|
||||
if (NumCoordinates != 4) Log::Error("Dock coordinate count not 4");
|
||||
|
||||
for (u32 iCoord = 0; iCoord < NumCoordinates; iCoord++)
|
||||
pDock->DockCoordinates[iCoord] = CVector3f(MLVL);
|
||||
|
||||
@@ -277,6 +277,6 @@ void CStructTemplate::DebugPrintProperties(TString base)
|
||||
tmp2->DebugPrintProperties(base);
|
||||
}
|
||||
else
|
||||
std::cout << base << tmp->Name() << "\n";
|
||||
Log::Write(base + tmp->Name());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user