From 3e188badf2dd160ce7c46e842ddd13f14669859c Mon Sep 17 00:00:00 2001
From: Philip Taylor <philip@zaynar.co.uk>
Date: Tue, 20 Jan 2015 23:16:16 +0000
Subject: [PATCH 09/13] Manually fix the less trivial CLogger format strings.
---
source/graphics/TerrainProperties.cpp | 6 ++----
source/graphics/TerrainTextureEntry.cpp | 4 ++--
source/ps/SavedGame.cpp | 2 +-
source/ps/Util.cpp | 4 ++--
source/ps/VideoMode.cpp | 4 ++--
source/soundmanager/data/OggData.cpp | 2 +-
source/soundmanager/scripting/SoundGroup.cpp | 2 +-
7 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/source/graphics/TerrainProperties.cpp b/source/graphics/TerrainProperties.cpp
index e4bb788..da4684c 100644
a
|
b
|
CTerrainPropertiesPtr CTerrainProperties::FromXML(const CTerrainPropertiesPtr& p
|
55 | 55 | // Check that we've got the right kind of xml document |
56 | 56 | if (rootName != "Terrains") |
57 | 57 | { |
58 | | LOGERROR( |
59 | | L"TerrainProperties: Loading %ls: Root node is not terrains (found \"%hs\")", |
| 58 | LOGERROR("TerrainProperties: Loading %ls: Root node is not terrains (found \"%hs\")", |
60 | 59 | pathname.string().c_str(), |
61 | 60 | rootName.c_str()); |
62 | 61 | return CTerrainPropertiesPtr(); |
… |
… |
CTerrainPropertiesPtr CTerrainProperties::FromXML(const CTerrainPropertiesPtr& p
|
80 | 79 | } |
81 | 80 | else |
82 | 81 | { |
83 | | LOGWARNING( |
84 | | L"TerrainProperties: Loading %ls: Unexpected node %hs\n", |
| 82 | LOGWARNING("TerrainProperties: Loading %ls: Unexpected node %hs\n", |
85 | 83 | pathname.string().c_str(), |
86 | 84 | XeroFile.GetElementString(child.GetNodeName()).c_str()); |
87 | 85 | // Keep reading - typos shouldn't be showstoppers |
diff --git a/source/graphics/TerrainTextureEntry.cpp b/source/graphics/TerrainTextureEntry.cpp
index a15b043..bef2216 100644
a
|
b
|
void CTerrainTextureEntry::LoadAlphaMaps(VfsPath &amtype)
|
253 | 253 | if (textures[i] < 0) |
254 | 254 | { |
255 | 255 | g_TexMan.m_TerrainAlphas.erase(it); |
256 | | LOGERROR((L"Failed to load alphamap: " + amtype.string()).c_str()); |
| 256 | LOGERROR("Failed to load alphamap: %s", amtype.string()); |
257 | 257 | |
258 | 258 | VfsPath standard("standard"); |
259 | 259 | if (path != standard) |
… |
… |
void CTerrainTextureEntry::LoadAlphaMaps(VfsPath &amtype)
|
362 | 362 | result.m_hCompositeAlphaMap = hCompositeAlphaMap; |
363 | 363 | |
364 | 364 | m_TerrainAlpha = it; |
365 | | } |
366 | | No newline at end of file |
| 365 | } |
diff --git a/source/ps/SavedGame.cpp b/source/ps/SavedGame.cpp
index 7bc32af..5869595 100644
a
|
b
|
Status SavedGames::Save(const std::wstring& name, const std::wstring& descriptio
|
126 | 126 | |
127 | 127 | OsPath realPath; |
128 | 128 | WARN_RETURN_STATUS_IF_ERR(g_VFS->GetRealPath(filename, realPath)); |
129 | | LOGMESSAGERENDER(wstring_from_utf8(g_L10n.Translate("Saved game to '%ls'") + "\n").c_str(), realPath.string().c_str()); |
| 129 | LOGMESSAGERENDER(g_L10n.Translate("Saved game to '%ls'"), realPath.string().c_str()); |
130 | 130 | |
131 | 131 | return INFO::OK; |
132 | 132 | } |
diff --git a/source/ps/Util.cpp b/source/ps/Util.cpp
index 62f2897..fc07b38 100644
a
|
b
|
void WriteScreenshot(const VfsPath& extension)
|
241 | 241 | { |
242 | 242 | OsPath realPath; |
243 | 243 | g_VFS->GetRealPath(filename, realPath); |
244 | | LOGMESSAGERENDER(wstring_from_utf8(g_L10n.Translate("Screenshot written to '%ls'")).c_str(), realPath.string().c_str()); |
| 244 | LOGMESSAGERENDER(g_L10n.Translate("Screenshot written to '%ls'"), realPath.string().c_str()); |
245 | 245 | } |
246 | 246 | else |
247 | 247 | LOGERROR("Error writing screenshot to '%ls'", filename.string().c_str()); |
… |
… |
void WriteBigScreenshot(const VfsPath& extension, int tiles)
|
374 | 374 | { |
375 | 375 | OsPath realPath; |
376 | 376 | g_VFS->GetRealPath(filename, realPath); |
377 | | LOGMESSAGERENDER(wstring_from_utf8(g_L10n.Translate("Screenshot written to '%ls'")).c_str(), realPath.string().c_str()); |
| 377 | LOGMESSAGERENDER(g_L10n.Translate("Screenshot written to '%ls'"), realPath.string().c_str()); |
378 | 378 | } |
379 | 379 | else |
380 | 380 | LOGERROR("Error writing screenshot to '%ls'", filename.string().c_str()); |
diff --git a/source/ps/VideoMode.cpp b/source/ps/VideoMode.cpp
index 626ca22..de429e0 100644
a
|
b
|
bool CVideoMode::SetVideoMode(int w, int h, int bpp, bool fullscreen)
|
89 | 89 | if (fullscreen) |
90 | 90 | { |
91 | 91 | LOGWARNING("Failed to set the video mode to fullscreen for the chosen resolution " |
92 | | L"%dx%d:%d (\"%hs\"), falling back to windowed mode", |
| 92 | "%dx%d:%d (\"%hs\"), falling back to windowed mode", |
93 | 93 | w, h, bpp, SDL_GetError()); |
94 | 94 | // Using default size for the window for now, as the attempted setting |
95 | 95 | // could be as large, or larger than the screen size. |
… |
… |
bool CVideoMode::SetVideoMode(int w, int h, int bpp, bool fullscreen)
|
173 | 173 | if (fullscreen) |
174 | 174 | { |
175 | 175 | LOGWARNING("Failed to set the video mode to fullscreen for the chosen resolution " |
176 | | L"%dx%d:%d (\"%hs\"), falling back to windowed mode", |
| 176 | "%dx%d:%d (\"%hs\"), falling back to windowed mode", |
177 | 177 | w, h, bpp, SDL_GetError()); |
178 | 178 | // Using default size for the window for now, as the attempted setting |
179 | 179 | // could be as large, or larger than the screen size. |
diff --git a/source/soundmanager/data/OggData.cpp b/source/soundmanager/data/OggData.cpp
index 6165c5c..26321fc 100644
a
|
b
|
bool COggData::InitOggFile(const VfsPath& itemPath)
|
78 | 78 | |
79 | 79 | if(alGetError() != AL_NO_ERROR) |
80 | 80 | { |
81 | | LOGERROR( L"- Error creating initial buffer !!\n"); |
| 81 | LOGERROR( "- Error creating initial buffer !!\n"); |
82 | 82 | return false; |
83 | 83 | } |
84 | 84 | else |
diff --git a/source/soundmanager/scripting/SoundGroup.cpp b/source/soundmanager/scripting/SoundGroup.cpp
index 373b382..762b513 100644
a
|
b
|
void CSoundGroup::UploadPropertiesAndPlay(size_t theIndex, const CVector3D& posi
|
197 | 197 | itemRollOff = 0; |
198 | 198 | |
199 | 199 | if ( sndData->IsStereo() ) |
200 | | LOGWARNING( L"OpenAL: stereo sounds can't be positioned: %ls", sndData->GetFileName()->string().c_str() ); |
| 200 | LOGWARNING( "OpenAL: stereo sounds can't be positioned: %ls", sndData->GetFileName()->string().c_str() ); |
201 | 201 | |
202 | 202 | hSound->SetLocation(CVector3D((sndDist * sin(offSet)), 0, - sndDist * cos(offSet))); |
203 | 203 | hSound->SetRollOff(itemRollOff); |