diff --git a/doomsday/client/src/audio/s_logic.cpp b/doomsday/client/src/audio/s_logic.cpp index a16a6b4268..ca14185495 100644 --- a/doomsday/client/src/audio/s_logic.cpp +++ b/doomsday/client/src/audio/s_logic.cpp @@ -228,11 +228,6 @@ void Sfx_PurgeLogical(void) for(it = logicHash[i].first; it; it = next) { next = it->next; - /*#ifdef _DEBUG - Con_Printf("LS:%i orig=%i(%p) %s\n", - it->id, it->origin? it->origin->thinker.id : 0, - it->origin, it->isRepeating? "[repeat]" : ""); - #endif */ if(!it->isRepeating && it->endTime < nowTime) { // This has stopped. diff --git a/doomsday/client/src/busymode.cpp b/doomsday/client/src/busymode.cpp index bfce8eb7b9..1b80b8671f 100644 --- a/doomsday/client/src/busymode.cpp +++ b/doomsday/client/src/busymode.cpp @@ -169,10 +169,7 @@ static void endTask(BusyTask* task) DENG_ASSERT(task); DENG_ASSERT_IN_MAIN_THREAD(); - if(verbose) - { - Con_Message("Con_Busy: Was busy for %.2lf seconds.", busyTime); - } + LOG_VERBOSE("Busy mode lasted %.2f seconds") << busyTime; if(busyTaskEndedWithError) { diff --git a/doomsday/client/src/client/cl_mobj.cpp b/doomsday/client/src/client/cl_mobj.cpp index 85bed11a6c..89ae114ecd 100644 --- a/doomsday/client/src/client/cl_mobj.cpp +++ b/doomsday/client/src/client/cl_mobj.cpp @@ -292,13 +292,6 @@ void Cl_UpdateRealPlayerMobj(mobj_t *localMobj, mobj_t *remoteClientMobj, } localMobj->height = remoteClientMobj->height; -/*#ifdef _DEBUG - if(localMobj->floorClip != remoteClientMobj->floorClip) - { - Con_Message("Cl_UpdateRealPlayerMobj: Floorclip=%f", remoteClientMobj->floorClip); - } -#endif - localMobj->floorClip = remoteClientMobj->floorClip;*/ localMobj->selector &= ~DDMOBJ_SELECTOR_MASK; localMobj->selector |= remoteClientMobj->selector & DDMOBJ_SELECTOR_MASK; localMobj->visAngle = remoteClientMobj->angle >> 16; diff --git a/doomsday/client/src/dd_loop.cpp b/doomsday/client/src/dd_loop.cpp index f5191155a7..07ab2b0fed 100644 --- a/doomsday/client/src/dd_loop.cpp +++ b/doomsday/client/src/dd_loop.cpp @@ -206,8 +206,12 @@ static void baseTicker(timespan_t time) coord_t actualMom[2] = { mo->origin[0] - prevPos[0], mo->origin[1] - prevPos[1] }; coord_t actualSpeed = V2d_Length(actualMom); - Con_Message("%i,%f,%f,%f,%f", SECONDS_TO_TICKS(sysTime + time), - ddPlayers[0].shared.forwardMove, speed, actualSpeed, speed - prevSpeed); + LOG_NOTE("%i,%f,%f,%f,%f") + << SECONDS_TO_TICKS(sysTime + time) + << ddPlayers[0].shared.forwardMove + << speed + << actualSpeed + << speed - prevSpeed; V3d_Copy(prevPos, mo->origin); prevSpeed = speed; @@ -307,10 +311,9 @@ static void timeDeltaStatistics(int deltaMs) } average /= NUM_FRAMETIME_DELTAS; variance /= NUM_FRAMETIME_DELTAS; - Con_Message("Time deltas [%i frames]: min=%-6i max=%-6i avg=%-11.7f late=%5.1f%% var=%12.10f", - NUM_FRAMETIME_DELTAS, minDelta, maxDelta, average, - lateCount/(float)NUM_FRAMETIME_DELTAS*100, - variance); + LOGDEV_MSG("Time deltas [%i frames]: min=%-6i max=%-6i avg=%-11.7f late=%5.1f%% var=%12.10f") + << NUM_FRAMETIME_DELTAS << minDelta << maxDelta << average + << lateCount/(float)NUM_FRAMETIME_DELTAS*100 << variance; } } } diff --git a/doomsday/client/src/dd_main.cpp b/doomsday/client/src/dd_main.cpp index 5cd55c4a32..72470b7f76 100644 --- a/doomsday/client/src/dd_main.cpp +++ b/doomsday/client/src/dd_main.cpp @@ -732,7 +732,7 @@ static void loadResource(ResourceManifest &manifest) // Print the 'CRC' number of IWADs, so they can be identified. if(Wad *wad = dynamic_cast(file)) { - Con_Message(" IWAD identification: %08x", wad->calculateCRC()); + LOG_RES_MSG("IWAD identification: %08x") << wad->calculateCRC(); } } } diff --git a/doomsday/client/src/dd_wad.cpp b/doomsday/client/src/dd_wad.cpp index 611ee18687..456c3ea417 100644 --- a/doomsday/client/src/dd_wad.cpp +++ b/doomsday/client/src/dd_wad.cpp @@ -35,21 +35,16 @@ using namespace de; -#if _DEBUG -# define W_Error Con_Error -#else -# define W_Error Con_Message -#endif - size_t W_LumpLength(lumpnum_t lumpNum) { try { return App_FileSystem().nameIndex().lump(lumpNum).info().size; } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_LumpLength: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_LumpLength"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return 0; } @@ -62,9 +57,10 @@ AutoStr* W_LumpName(lumpnum_t lumpNum) QByteArray nameUtf8 = name.toUtf8(); return AutoStr_FromTextStd(nameUtf8.constData()); } - catch(FS1::NotFoundError const&) + catch(FS1::NotFoundError const &er) { - W_Error("W_LumpName: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_LumpName"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return AutoStr_NewStd(); } @@ -75,14 +71,15 @@ uint W_LumpLastModified(lumpnum_t lumpNum) { return App_FileSystem().nameIndex().lump(lumpNum).info().lastModified; } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_LumpLastModified: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_LumpLastModified"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return 0; } -AutoStr* W_LumpSourceFile(lumpnum_t lumpNum) +AutoStr *W_LumpSourceFile(lumpnum_t lumpNum) { try { @@ -90,9 +87,10 @@ AutoStr* W_LumpSourceFile(lumpnum_t lumpNum) QByteArray path = lump.container().composePath().toUtf8(); return AutoStr_FromText(path.constData()); } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_LumpSourceFile: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_LumpSourceFile"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return AutoStr_NewStd(); } @@ -104,14 +102,15 @@ boolean W_LumpIsCustom(lumpnum_t lumpNum) de::File1 const& lump = App_FileSystem().nameIndex().lump(lumpNum); return lump.container().hasCustom(); } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_LumpIsCustom: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_LumpIsCustom"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return false; } -lumpnum_t W_CheckLumpNumForName(char const* name) +lumpnum_t W_CheckLumpNumForName(char const *name) { lumpnum_t lumpNum; if(!name || !name[0]) @@ -123,12 +122,12 @@ lumpnum_t W_CheckLumpNumForName(char const* name) return lumpNum; } -lumpnum_t W_GetLumpNumForName(char const* name) +lumpnum_t W_GetLumpNumForName(char const *name) { lumpnum_t lumpNum = W_CheckLumpNumForName(name); if(lumpNum < 0) { - W_Error("W_GetLumpNumForName: Lump \"%s\" not found.", name); + LOG_RES_ERROR("Lump \"%s\" not found") << name; } return lumpNum; } @@ -140,9 +139,10 @@ size_t W_ReadLump(lumpnum_t lumpNum, uint8_t* buffer) de::File1& lump = App_FileSystem().nameIndex().lump(lumpNum); return lump.read(buffer, 0, lump.size()); } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_ReadLump: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_ReadLump"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return 0; } @@ -154,22 +154,24 @@ size_t W_ReadLumpSection(lumpnum_t lumpNum, uint8_t* buffer, size_t startOffset, de::File1& lump = App_FileSystem().nameIndex().lump(lumpNum); return lump.read(buffer, startOffset, length); } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_ReadLumpSection: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_ReadLumpSection"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return 0; } -uint8_t const* W_CacheLump(lumpnum_t lumpNum) +uint8_t const *W_CacheLump(lumpnum_t lumpNum) { try { return App_FileSystem().nameIndex().lump(lumpNum).cache(); } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_CacheLump: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_CacheLump"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return NULL; } @@ -180,9 +182,10 @@ void W_UnlockLump(lumpnum_t lumpNum) { App_FileSystem().nameIndex().lump(lumpNum).unlock(); } - catch(LumpIndex::NotFoundError const&) + catch(LumpIndex::NotFoundError const &er) { - W_Error("W_UnlockLump: Invalid lumpnum %i.", lumpNum); + LOG_AS("W_UnlockLump"); + LOGDEV_RES_ERROR("%s") << er.asText(); } return; }