mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #5904
5904: Less logging when loading maps on expected path r=heinrich5991 a=def- ![screenshot-20221001@224631](https://user-images.githubusercontent.com/2335377/193427730-ce3021f7-6458-4810-982b-948438625deb.png) ## Checklist - [x] Tested the change ingame - [x] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
commit
3da9aebe4d
|
@ -4,6 +4,7 @@
|
|||
#include "datafile.h"
|
||||
|
||||
#include <base/hash_ctxt.h>
|
||||
#include <base/log.h>
|
||||
#include <base/system.h>
|
||||
#include <engine/storage.h>
|
||||
|
||||
|
@ -100,7 +101,7 @@ struct CDatafile
|
|||
|
||||
bool CDataFileReader::Open(class IStorage *pStorage, const char *pFilename, int StorageType)
|
||||
{
|
||||
dbg_msg("datafile", "loading. filename='%s'", pFilename);
|
||||
log_trace("datafile", "loading. filename='%s'", pFilename);
|
||||
|
||||
IOHANDLE File = pStorage->OpenFile(pFilename, IOFLAG_READ, StorageType);
|
||||
if(!File)
|
||||
|
@ -221,7 +222,7 @@ bool CDataFileReader::Open(class IStorage *pStorage, const char *pFilename, int
|
|||
m_pDataFile->m_Info.m_pItemStart = (char *)&m_pDataFile->m_Info.m_pDataOffsets[m_pDataFile->m_Header.m_NumRawData];
|
||||
m_pDataFile->m_Info.m_pDataStart = m_pDataFile->m_Info.m_pItemStart + m_pDataFile->m_Header.m_ItemSize;
|
||||
|
||||
dbg_msg("datafile", "loading done. datafile='%s'", pFilename);
|
||||
log_trace("datafile", "loading done. datafile='%s'", pFilename);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -288,7 +289,7 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
|
|||
unsigned long UncompressedSize = m_pDataFile->m_Info.m_pDataSizes[Index];
|
||||
unsigned long s;
|
||||
|
||||
dbg_msg("datafile", "loading data index=%d size=%d uncompressed=%lu", Index, DataSize, UncompressedSize);
|
||||
log_trace("datafile", "loading data index=%d size=%d uncompressed=%lu", Index, DataSize, UncompressedSize);
|
||||
m_pDataFile->m_ppDataPtrs[Index] = (char *)malloc(UncompressedSize);
|
||||
|
||||
// read the compressed data
|
||||
|
@ -308,7 +309,7 @@ void *CDataFileReader::GetDataImpl(int Index, int Swap)
|
|||
else
|
||||
{
|
||||
// load the data
|
||||
dbg_msg("datafile", "loading data index=%d size=%d", Index, DataSize);
|
||||
log_trace("datafile", "loading data index=%d size=%d", Index, DataSize);
|
||||
m_pDataFile->m_ppDataPtrs[Index] = (char *)malloc(DataSize);
|
||||
io_seek(m_pDataFile->m_File, m_pDataFile->m_DataStartOffset + m_pDataFile->m_Info.m_pDataOffsets[Index], IOSEEK_START);
|
||||
io_read(m_pDataFile->m_File, m_pDataFile->m_ppDataPtrs[Index], DataSize);
|
||||
|
|
Loading…
Reference in a new issue