1
0
forked from 0ad/0ad

Removed trailing newlines in log messages

This was SVN commit r705.
This commit is contained in:
Ykkrosh 2004-07-11 16:05:58 +00:00
parent f2dc64e75d
commit c62940201f
8 changed files with 25 additions and 17 deletions

View File

@ -52,7 +52,7 @@ bool CObjectEntry::BuildModel()
try {
modeldef=CModelDef::Load((const char*) modelfilename);
} catch (...) {
LOG(ERROR, "CObjectEntry::BuildModel(): Model %s failed to load\n", modelfilename.c_str());
LOG(ERROR, "CObjectEntry::BuildModel(): Model %s failed to load", modelfilename.c_str());
return false;
}
@ -101,11 +101,11 @@ bool CObjectEntry::BuildModel()
m_Model->AddProp(proppoint,propmodel);
if (oe->m_WalkAnim) propmodel->SetAnimation(oe->m_WalkAnim);
} else {
LOG(ERROR,"Failed to build prop model \"%s\" on actor \"%s\"\n",(const char*) m_Name,(const char*) prop.m_ModelName);
LOG(ERROR,"Failed to build prop model \"%s\" on actor \"%s\"",(const char*) m_Name,(const char*) prop.m_ModelName);
}
}
} else {
LOG(ERROR,"Failed to matching prop point called \"%s\" in model \"%s\"\n", (const char*)prop.m_PropPointName, (const char*)modelfilename);
LOG(ERROR,"Failed to matching prop point called \"%s\" in model \"%s\"", (const char*)prop.m_PropPointName, (const char*)modelfilename);
}
}

View File

@ -124,15 +124,15 @@ void CObjectManager::LoadObjects(int type)
CStr filename(pathname);
filename+=dent.name;
if (!object->Load((const char*) filename)) {
LOG(ERROR, "CObjectManager::LoadObjects(): %s: XML Load failed\n", filename.c_str());
LOG(ERROR, "CObjectManager::LoadObjects(): %s: XML Load failed", filename.c_str());
delete object;
} else {
AddObject(object,type);
LOG(NORMAL, "CObjectManager::LoadObjects(): %s: XML Loaded\n", filename.c_str());
LOG(NORMAL, "CObjectManager::LoadObjects(): %s: XML Loaded", filename.c_str());
}
}
vfs_close_dir(dir);
}
else
LOG(ERROR, "CObjectManager::LoadObjects(): Unable to open dir %s.\n", pathname.c_str());
LOG(ERROR, "CObjectManager::LoadObjects(): Unable to open dir %s.", pathname.c_str());
}

View File

@ -59,12 +59,12 @@ CSkeletonAnimDef* CSkeletonAnimManager::GetAnimation(const char* filename)
}
if (!def) {
LOG(ERROR, "CSkeletonAnimManager::GetAnimation(%s): Failed loading, marked file as bad\n", filename);
LOG(ERROR, "CSkeletonAnimManager::GetAnimation(%s): Failed loading, marked file as bad", filename);
// add this file as bad
m_BadAnimationFiles.insert(fname);
return 0;
} else {
LOG(NORMAL, "CSkeletonAnimManager::GetAnimation(%s): Loaded successfully\n", filename);
LOG(NORMAL, "CSkeletonAnimManager::GetAnimation(%s): Loaded successfully", filename);
// add mapping for this file
m_Animations[fname]=def;
return def;

View File

@ -103,7 +103,7 @@ void CTextureManager::LoadTerrainTextures(int terraintype,const char* fileext)
{
while (vfs_next_dirent(dir, &dent, fileext) == 0)
{
LOG(NORMAL, "CTextureManager::LoadTerrainTextures(): texture %s added to type %s\n", dent.name, m_TerrainTextures[terraintype].m_Name.c_str());
LOG(NORMAL, "CTextureManager::LoadTerrainTextures(): texture %s added to type %s", dent.name, m_TerrainTextures[terraintype].m_Name.c_str());
AddTexture(dent.name, terraintype);
}

View File

@ -56,14 +56,14 @@ int CVFSInputSource::OpenFile(const char *path)
m_hFile=vfs_open(path);
if (m_hFile <= 0)
{
LOG(ERROR, "CVFSInputSource: file %s couldn't be opened (vfs_open: %lld)\n", path, m_hFile);
LOG(ERROR, "CVFSInputSource: file %s couldn't be opened (vfs_open: %lld)", path, m_hFile);
return -1;
}
int err;
if ((err=vfs_map(m_hFile, 0, m_pBuffer, m_BufferSize)) != 0)
{
LOG(ERROR, "CVFSInputSource: file %s couldn't be opened (vfs_map: %d)\n", path, err);
LOG(ERROR, "CVFSInputSource: file %s couldn't be opened (vfs_map: %d)", path, err);
vfs_close(m_hFile);
m_hFile=0;
return -1;

View File

@ -1,4 +1,4 @@
// $Id: Xeromyces.cpp,v 1.5 2004/07/11 11:51:10 philip Exp $
// $Id: Xeromyces.cpp,v 1.6 2004/07/11 16:05:10 philip Exp $
#include "precompiled.h"
@ -190,7 +190,7 @@ void CXeromyces::Load(const char* filename)
// Start the checksum with a particular seed value, so the XMBs will
// be recreated whenever the version/etc string has been changed, so
// the string can be changed whenever the file format's changed.
const char* ChecksumID = "version A";
const char* ChecksumID = "version B";
unsigned long XMLChecksum = source.CRC32( crc32( crc32(0L, Z_NULL, 0), (Bytef*)ChecksumID, (int)strlen(ChecksumID) ) );
// Check whether the XMB file needs to be regenerated:
@ -251,6 +251,14 @@ void CXeromyces::Load(const char* filename)
// Convert the data structures into the XMB format
handler.CreateXMB(XMLChecksum);
// Only fail after having called CreateXMB, because CreateXMB frees all the memory
if (errorHandler.getSawErrors())
{
LOG(ERROR, "CXeromyces: Errors in XML file '%s'", filename);
throw "Failed";
}
// Save the file to disk, so it can be loaded quickly next time
vfs_store(filenameXMB, handler.buffer.buffer, handler.buffer.length, FILE_NO_AIO);
@ -264,7 +272,7 @@ bool CXeromyces::ReadXMBFile(const char* filename, bool CheckCRC, unsigned long
Handle file = vfs_open(filename);
if (file <= 0)
{
LOG(ERROR, "CXeromyces: file '%s' couldn't be opened (vfs_open: %lld)\n", filename, file);
LOG(ERROR, "CXeromyces: file '%s' couldn't be opened (vfs_open: %lld)", filename, file);
return false;
}
@ -273,7 +281,7 @@ bool CXeromyces::ReadXMBFile(const char* filename, bool CheckCRC, unsigned long
int err;
if ( (err=vfs_map(file, 0, buffer, bufferSize)) )
{
LOG(ERROR, "CXeromyces: file '%s' couldn't be read (vfs_map: %d)\n", filename, err);
LOG(ERROR, "CXeromyces: file '%s' couldn't be read (vfs_map: %d)", filename, err);
vfs_close(file);
return false;
}

View File

@ -907,7 +907,7 @@ void CRenderer::EndFrame()
static bool once=false;
if (!once && glGetError()) {
LOG(ERROR,"CRenderer::EndFrame: GL errors occurred\n");
LOG(ERROR,"CRenderer::EndFrame: GL errors occurred");
once=true;
}
}

View File

@ -32,7 +32,7 @@ void CBaseEntityCollection::loadTemplates()
}
else
{
LOG(ERROR, "CBaseEntityCollection::loadTemplates(): Failed to enumerate entity template directory\n");
LOG(ERROR, "CBaseEntityCollection::loadTemplates(): Failed to enumerate entity template directory");
return;
}
}