diff --git a/doomsday/client/include/m_profiler.h b/doomsday/client/include/m_profiler.h index 0ce5ba8e59..93d1382a4c 100644 --- a/doomsday/client/include/m_profiler.h +++ b/doomsday/client/include/m_profiler.h @@ -44,7 +44,7 @@ typedef struct profiler_s { # define END_PROF_TIMERS() ,NUM_PROFS }; static profiler_t profiler_[NUM_PROFS]; # define BEGIN_PROF(x) (profiler_[x].startCount++, profiler_[x].startTime = Timer_RealMilliseconds()) # define END_PROF(x) (profiler_[x].totalTime += Timer_RealMilliseconds() - profiler_[x].startTime) -# define PRINT_PROF(x) Con_Message("[%f ms] " #x ": %i ms (%i starts)\n", \ +# define PRINT_PROF(x) Con_Message("[%f ms] " #x ": %i ms (%i starts)", \ profiler_[x].startCount? profiler_[x].totalTime / \ (float) profiler_[x].startCount : 0, \ profiler_[x].totalTime, profiler_[x].startCount) diff --git a/doomsday/client/src/audio/audiodriver.cpp b/doomsday/client/src/audio/audiodriver.cpp index a2cb0c3ba9..4e4fa39605 100644 --- a/doomsday/client/src/audio/audiodriver.cpp +++ b/doomsday/client/src/audio/audiodriver.cpp @@ -164,7 +164,7 @@ static boolean loadAudioDriver(driver_t* driver, const char* name) } else { - Con_Message("Warning: loadAudioDriver: Loading of \"%s\" failed.\n", name); + Con_Message("Warning: loadAudioDriver: Loading of \"%s\" failed.", name); } } return ok; @@ -193,7 +193,7 @@ static audiodriverid_t identifierToDriverId(const char* name) { if(!stricmp(name, driverIdentifier[i])) return (audiodriverid_t) i; } - Con_Message("'%s' is not a valid audio driver name.\n", name); + Con_Message("'%s' is not a valid audio driver name.", name); return AUDIOD_INVALID; } @@ -417,18 +417,18 @@ void AudioDriver_PrintInterfaces(void) { int i; - Con_Message("Audio configuration (by decreasing priority):\n"); + Con_Message("Audio configuration (by decreasing priority):"); for(i = MAX_AUDIO_INTERFACES - 1; i >= 0; --i) { audiointerface_t* a = &activeInterfaces[i]; if(a->type == AUDIO_IMUSIC || a->type == AUDIO_ICD) { - Con_Message(" %-5s: %s\n", a->type == AUDIO_IMUSIC? "Music" : "CD", + Con_Message(" %-5s: %s", a->type == AUDIO_IMUSIC? "Music" : "CD", Str_Text(AudioDriver_InterfaceName(a->i.any))); } else if(a->type == AUDIO_ISFX) { - Con_Message(" SFX : %s\n", Str_Text(AudioDriver_InterfaceName(a->i.sfx))); + Con_Message(" SFX : %s", Str_Text(AudioDriver_InterfaceName(a->i.sfx))); } } } @@ -458,7 +458,7 @@ boolean AudioDriver_Init(void) ok = initDriver(defaultDriverId); if(!ok) { - Con_Message("Warning: Failed initializing audio driver \"%s\"\n", getDriverName(defaultDriverId)); + Con_Message("Warning: Failed initializing audio driver \"%s\"", getDriverName(defaultDriverId)); } // Fallback option for the default driver. diff --git a/doomsday/client/src/audio/audiodriver_music.cpp b/doomsday/client/src/audio/audiodriver_music.cpp index bb6d62ab28..04657ea07c 100644 --- a/doomsday/client/src/audio/audiodriver_music.cpp +++ b/doomsday/client/src/audio/audiodriver_music.cpp @@ -103,7 +103,7 @@ static int musicPlayFile(audiointerface_music_t* iMusic, const char* virtualOrNa if(!buf) { F_Delete(file); - Con_Message("Warning: Failed on allocation of %lu bytes for temporary song write buffer.\n", (unsigned long) len); + Con_Message("Warning: Failed on allocation of %lu bytes for temporary song write buffer.", (unsigned long) len); return false; } FileHandle_Read(file, buf, len); @@ -169,9 +169,9 @@ void AudioDriver_Music_Set(int property, void* ptr) if(!fn || !fn[0]) return; // No path. if(F_FileExists(fn)) - Con_Message("Current soundfont set to: \"%s\"\n", fn); + Con_Message("Current soundfont set to: \"%s\"", fn); else - Con_Message("Warning: Soundfont \"%s\" not found.\n", fn); + Con_Message("Warning: Soundfont \"%s\" not found.", fn); } } diff --git a/doomsday/client/src/audio/m_mus2midi.cpp b/doomsday/client/src/audio/m_mus2midi.cpp index 07898acf25..fc0e61f39a 100644 --- a/doomsday/client/src/audio/m_mus2midi.cpp +++ b/doomsday/client/src/audio/m_mus2midi.cpp @@ -241,7 +241,7 @@ boolean M_Mus2Midi(void* data, size_t length, const char* outFile) file = fopen(Str_Text(&nativePath), "wb"); if(!file) { - Con_Message("Warning: M_Mus2Midi: Failed opening output file \"%s\".\n", F_PrettyPath(Str_Text(&nativePath))); + Con_Message("Warning: M_Mus2Midi: Failed opening output file \"%s\".", F_PrettyPath(Str_Text(&nativePath))); Str_Free(&nativePath); return false; } diff --git a/doomsday/client/src/audio/s_main.cpp b/doomsday/client/src/audio/s_main.cpp index 5c7b7d445b..ec8cf692d1 100644 --- a/doomsday/client/src/audio/s_main.cpp +++ b/doomsday/client/src/audio/s_main.cpp @@ -126,7 +126,7 @@ boolean S_Init(void) // Try to load the audio driver plugin(s). if(!AudioDriver_Init()) { - Con_Message("Music and Sound Effects disabled.\n"); + Con_Message("Music and Sound Effects disabled."); return false; } @@ -135,7 +135,7 @@ boolean S_Init(void) if(!sfxOK || !musOK) { - Con_Message("Errors during audio subsystem initialization.\n"); + Con_Message("Errors during audio subsystem initialization."); return false; } #endif @@ -303,8 +303,7 @@ int S_LocalSoundAtVolumeFrom(int soundIdAndFlags, mobj_t *origin, #if _DEBUG if(volume > 1) { - Con_Message("S_LocalSoundAtVolumeFrom: Warning! " - "Too high volume (%f).\n", volume); + Con_Message("S_LocalSoundAtVolumeFrom: Warning! Too high volume (%f).", volume); } #endif @@ -333,7 +332,7 @@ int S_LocalSoundAtVolumeFrom(int soundIdAndFlags, mobj_t *origin, if(sfxAvail) { VERBOSE(Con_Message - ("S_LocalSoundAtVolumeFrom: Sound %i " "caching failed.\n", + ("S_LocalSoundAtVolumeFrom: Sound %i " "caching failed.", soundId)); } return false; @@ -537,7 +536,7 @@ int S_StartMusicNum(int id, boolean looped) if(id < 0 || id >= defs.count.music.num) return false; ded_music_t *def = &defs.music[id]; - VERBOSE( Con_Message("Starting music '%s'...\n", def->id) ) + VERBOSE( Con_Message("Starting music '%s'...", def->id) ) return Mus_Start(def, looped); diff --git a/doomsday/client/src/audio/s_mus.cpp b/doomsday/client/src/audio/s_mus.cpp index 905ae11542..cf09bff5a2 100644 --- a/doomsday/client/src/audio/s_mus.cpp +++ b/doomsday/client/src/audio/s_mus.cpp @@ -82,11 +82,11 @@ boolean Mus_Init(void) if(isDedicated || CommandLine_Exists("-nomusic")) { - Con_Message("Music disabled.\n"); + Con_Message("Music disabled."); return true; } - VERBOSE( Con_Message("Initializing Music subsystem...\n") ); + VERBOSE( Con_Message("Initializing Music subsystem...") ); // Let's see which interfaces are available for music playback. count = getInterfaces(iMusic); @@ -103,7 +103,7 @@ boolean Mus_Init(void) { if(!iMusic[i]->Init()) { - Con_Message("Warning: Failed to initialize %s for music playback.\n", + Con_Message("Warning: Failed to initialize %s for music playback.", Str_Text(AudioDriver_InterfaceName(iMusic[i]))); } } @@ -320,8 +320,8 @@ int Mus_StartLump(lumpnum_t lump, boolean looped, boolean canPlayMUS) buf = (uint8_t*) malloc(lumpLength); if(!buf) { - Con_Message("Warning:Mus_Start: Failed on allocation of %lu bytes for " - "temporary MUS to MIDI conversion buffer.\n", (unsigned long) lumpLength); + Con_Message("Warning: Mus_Start: Failed on allocation of %lu bytes for " + "temporary MUS to MIDI conversion buffer.", (unsigned long) lumpLength); return 0; } @@ -409,7 +409,7 @@ int Mus_Start(ded_music_t* def, boolean looped) Str_Init(&path); if(Mus_GetExt(def, &path)) { - VERBOSE( Con_Message("Attempting to play song '%s' (file \"%s\").\n", + VERBOSE( Con_Message("Attempting to play song '%s' (file \"%s\").", def->id, F_PrettyPath(Str_Text(&path))) ) // Its an external file. diff --git a/doomsday/client/src/audio/s_sfx.cpp b/doomsday/client/src/audio/s_sfx.cpp index 38b79e401a..2080bc77cf 100644 --- a/doomsday/client/src/audio/s_sfx.cpp +++ b/doomsday/client/src/audio/s_sfx.cpp @@ -714,7 +714,7 @@ int Sfx_StartSound(sfxsample_t* sample, float volume, float freq, * stop enough channels to accommodate the limitation. */ #ifdef _DEBUG - Con_Message("Sfx_StartSound: Not playing %i because channels are busy.\n", sample->id); + Con_Message("Sfx_StartSound: Not playing %i because channels are busy.", sample->id); #endif return false; } @@ -803,7 +803,7 @@ int Sfx_StartSound(sfxsample_t* sample, float volume, float freq, { // A suitable channel was not found. END_COP; #ifdef _DEBUG - Con_Message("Sfx_StartSound: Failed to find suitable channel for sample %i.\n", sample->id); + Con_Message("Sfx_StartSound: Failed to find suitable channel for sample %i.", sample->id); #endif return false; } @@ -935,7 +935,7 @@ void Sfx_StartFrame(void) // Check that the rate is valid. if(sfxSampleRate != 11025 && sfxSampleRate != 22050 && sfxSampleRate != 44100) { - Con_Message("Sfx_StartFrame: sound-rate corrected to 11025.\n"); + Con_Message("Sfx_StartFrame: sound-rate corrected to 11025."); sfxSampleRate = 11025; } @@ -989,8 +989,7 @@ static void createChannels(int num2D, int bits, int rate) ch->buffer = AudioDriver_SFX()->Create(num2D-- > 0 ? 0 : SFXBF_3D, bits, rate); if(!ch->buffer) { - Con_Message("Sfx_CreateChannels: Failed to create " - "buffer for #%i.\n", i); + Con_Message("Sfx_CreateChannels: Failed to create buffer for #%i.", i); continue; } } @@ -1028,7 +1027,7 @@ void Sfx_InitChannels(void) if(numChannels > SFX_MAX_CHANNELS) numChannels = SFX_MAX_CHANNELS; - Con_Message("Sfx_InitChannels: %i channels.\n", numChannels); + Con_Message("Sfx_InitChannels: %i channels.", numChannels); } // Allocate and init the channels. @@ -1075,7 +1074,7 @@ void Sfx_StartRefresh(void) else { noRefresh: - VERBOSE( Con_Message("Sfx_StartRefresh: Driver does not require a refresh thread.\n") ); + VERBOSE( Con_Message("Sfx_StartRefresh: Driver does not require a refresh thread.") ); } } @@ -1092,11 +1091,11 @@ boolean Sfx_Init(void) // Check if sound has been disabled with a command line option. if(CommandLine_Exists("-nosfx")) { - Con_Message("Sound Effects disabled.\n"); + Con_Message("Sound Effects disabled."); return true; } - VERBOSE( Con_Message("Initializing Sound Effects subsystem...\n") ) + VERBOSE( Con_Message("Initializing Sound Effects subsystem...") ) if(!AudioDriver_SFX()) { // No interface for SFX playback. diff --git a/doomsday/client/src/audio/s_wav.cpp b/doomsday/client/src/audio/s_wav.cpp index 8dd3f8ff9b..691dbe9ec6 100644 --- a/doomsday/client/src/audio/s_wav.cpp +++ b/doomsday/client/src/audio/s_wav.cpp @@ -82,7 +82,7 @@ void* WAV_MemoryLoad(const byte* data, size_t datalength, int* bits, int* rate, if(!WAV_CheckFormat((const char*)data)) { - Con_Message("WAV_MemoryLoad: Not a WAV file.\n"); + Con_Message("WAV_MemoryLoad: Not a WAV file."); return NULL; } @@ -123,13 +123,12 @@ void* WAV_MemoryLoad(const byte* data, size_t datalength, int* bits, int* rate, // Check that it's a format we know how to read. if(wave_format.wFormatTag != WAVE_FORMAT_PCM) { - Con_Message("WAV_MemoryLoad: Unsupported format (%i).\n", wave_format.wFormatTag); + Con_Message("WAV_MemoryLoad: Unsupported format (%i).", wave_format.wFormatTag); return NULL; } if(wave_format.wChannels != 1) { - Con_Message - ("WAV_MemoryLoad: Too many channels (only mono supported).\n"); + Con_Message("WAV_MemoryLoad: Too many channels (only mono supported)."); return NULL; } // Read the extra format information. @@ -145,7 +144,7 @@ void* WAV_MemoryLoad(const byte* data, size_t datalength, int* bits, int* rate, if(wave_format.wBitsPerSample != 8 && wave_format.wBitsPerSample != 16) { - Con_Message("WAV_MemoryLoad: Not a 8/16 bit WAVE.\n"); + Con_Message("WAV_MemoryLoad: Not a 8/16 bit WAVE."); return NULL; } // Now we know some information about the sample. @@ -156,7 +155,7 @@ void* WAV_MemoryLoad(const byte* data, size_t datalength, int* bits, int* rate, { if(!wave_format.wFormatTag) { - Con_Message("WAV_MemoryLoad: Malformed WAVE data.\n"); + Con_Message("WAV_MemoryLoad: Malformed WAVE data."); return NULL; } // Read data chunk. @@ -214,7 +213,7 @@ void* WAV_Load(const char* filename, int* bits, int* rate, int* samples) sampledata = WAV_MemoryLoad((const byte*) data, size, bits, rate, samples); if(!sampledata) { - Con_Message("WAV_Load: Failed to load %s.\n", filename); + Con_Message("WAV_Load: Failed to load %s.", filename); } free(data); diff --git a/doomsday/client/src/audio/sys_audiod_sdlmixer.cpp b/doomsday/client/src/audio/sys_audiod_sdlmixer.cpp index 45a49a0e2b..7ba6fc7d5d 100644 --- a/doomsday/client/src/audio/sys_audiod_sdlmixer.cpp +++ b/doomsday/client/src/audio/sys_audiod_sdlmixer.cpp @@ -174,7 +174,7 @@ int DS_SDLMixerInit(void) if(SDL_InitSubSystem(SDL_INIT_AUDIO)) { - Con_Message("Warning:DS_SDLMixerInit: Error initializing SDL AUDIO\n %s\n", SDL_GetError()); + Con_Message("Warning:DS_SDLMixerInit: Error initializing SDL AUDIO\n %s", SDL_GetError()); return false; } @@ -185,13 +185,13 @@ int DS_SDLMixerInit(void) SDL_VERSIONNUM(compVer.major, compVer.minor, compVer.patch)) { Con_Message("Warning:DS_SDLMixerInit: Linked version of SDLMixer (%u.%u.%u) is " - "newer than expected (%u.%u.%u)\n", linkVer->major, linkVer->minor, + "newer than expected (%u.%u.%u)", linkVer->major, linkVer->minor, linkVer->patch, compVer.major, compVer.minor, compVer.patch); } if(Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024)) { - Con_Message("Warning:DS_SDLMixerInit: Failed opening mixer %s.\n", Mix_GetError()); + Con_Message("Warning:DS_SDLMixerInit: Failed opening mixer %s.", Mix_GetError()); return false; } @@ -348,7 +348,7 @@ void DS_SDLMixer_SFX_Load(sfxbuffer_t* buf, struct sfxsample_s* sample) buf->ptr = Mix_LoadWAV_RW(SDL_RWFromMem(conv, 44 + sample->size), 1); if(!buf->ptr) { - Con_Message("DS_SDLMixer_SFX_Load: Warning, failed loading sample (%s).\n", + Con_Message("DS_SDLMixer_SFX_Load: Warning, failed loading sample (%s).", Mix_GetError()); } @@ -554,7 +554,7 @@ int DS_SDLMixer_Music_PlayFile(const char* filename, int looped) if(!(lastMusic = Mix_LoadMUS(filename))) { - Con_Message("DS_SDLMixer_Music_PlayFile: Error %s.\n", Mix_GetError()); + Con_Message("DS_SDLMixer_Music_PlayFile: Error %s.", Mix_GetError()); return false; } diff --git a/doomsday/client/src/busymode.cpp b/doomsday/client/src/busymode.cpp index 0966174173..3a45f62788 100644 --- a/doomsday/client/src/busymode.cpp +++ b/doomsday/client/src/busymode.cpp @@ -168,7 +168,7 @@ static void endTask(BusyTask* task) if(verbose) { - Con_Message("Con_Busy: Was busy for %.2lf seconds.\n", busyTime); + Con_Message("Con_Busy: Was busy for %.2lf seconds.", busyTime); } // The window drawer will be restored later to the appropriate function. diff --git a/doomsday/client/src/client/cl_frame.cpp b/doomsday/client/src/client/cl_frame.cpp index 84d7f8b0db..1b1defd070 100644 --- a/doomsday/client/src/client/cl_frame.cpp +++ b/doomsday/client/src/client/cl_frame.cpp @@ -289,7 +289,7 @@ void Cl_Frame2Received(int packetType) skip = false; /* #ifdef _DEBUG - Con_Message("Received delta %i.\n", deltaType); + Con_Message("Received delta %i.", deltaType); #endif */ switch(deltaType) @@ -342,7 +342,7 @@ void Cl_Frame2Received(int packetType) #ifdef _DEBUG if(!gotFrame) { - Con_Message("Cl_Frame2Received: First frame received.\n"); + Con_Message("Cl_Frame2Received: First frame received."); } #endif diff --git a/doomsday/client/src/client/cl_infine.cpp b/doomsday/client/src/client/cl_infine.cpp index c2430eb87e..67257354ea 100644 --- a/doomsday/client/src/client/cl_infine.cpp +++ b/doomsday/client/src/client/cl_infine.cpp @@ -59,7 +59,7 @@ void Cl_Finale(Reader* msg) currentFinale = FI_Execute((const char*)script, FF_LOCAL); remoteFinale = finaleId; #ifdef _DEBUG - Con_Message("Cl_Finale: Started finale %i (remote id %i).\n", currentFinale, remoteFinale); + Con_Message("Cl_Finale: Started finale %i (remote id %i).", currentFinale, remoteFinale); #endif } @@ -90,7 +90,7 @@ void Cl_RequestFinaleSkip(void) Msg_End(); #ifdef _DEBUG - Con_Message("Cl_RequestFinaleSkip: Requesting skip on finale %i.\n", remoteFinale); + Con_Message("Cl_RequestFinaleSkip: Requesting skip on finale %i.", remoteFinale); #endif Net_SendBuffer(0, 0); diff --git a/doomsday/client/src/client/cl_main.cpp b/doomsday/client/src/client/cl_main.cpp index 08cf62c45b..134d5c5dad 100644 --- a/doomsday/client/src/client/cl_main.cpp +++ b/doomsday/client/src/client/cl_main.cpp @@ -73,7 +73,7 @@ void Cl_InitID(void) if((i = CommandLine_CheckWith("-id", 1)) != 0) { clientID = strtoul(CommandLine_At(i + 1), 0, 0); - Con_Message("Cl_InitID: Using custom id 0x%08x.\n", clientID); + Con_Message("Cl_InitID: Using custom id 0x%08x.", clientID); return; } @@ -136,7 +136,7 @@ void Cl_SendHello(void) strncpy(buf, Str_Text(App_CurrentGame().identityKey()), sizeof(buf) - 1); #ifdef _DEBUG - Con_Message("Cl_SendHello: game mode = %s\n", buf); + Con_Message("Cl_SendHello: game mode = %s", buf); #endif Writer_Write(msgWriter, buf, 16); @@ -162,7 +162,7 @@ void Cl_AnswerHandshake(void) // Check the version number. if(remoteVersion != SV_VERSION) { - Con_Message("Cl_AnswerHandshake: Version conflict! (you:%i, server:%i)\n", + Con_Message("Cl_AnswerHandshake: Version conflict! (you:%i, server:%i)", SV_VERSION, remoteVersion); Con_Execute(CMDS_DDAY, "net disconnect", false, false); Demo_StopPlayback(); @@ -202,7 +202,7 @@ void Cl_AnswerHandshake(void) gameReady = false; Cl_InitFrame(); - Con_Message("Cl_AnswerHandshake: myConsole:%i, remoteGameTime:%f.\n", + Con_Message("Cl_AnswerHandshake: myConsole:%i, remoteGameTime:%f.", myConsole, remoteGameTime); /** @@ -234,7 +234,7 @@ void Cl_HandlePlayerInfo(void) Reader_Read(msgReader, name, len); #ifdef _DEBUG - Con_Message("Cl_HandlePlayerInfo: console:%i name:%s\n", console, name); + Con_Message("Cl_HandlePlayerInfo: console:%i name:%s", console, name); #endif // Is the console number valid? @@ -401,7 +401,7 @@ void Cl_GetPackets(void) else { #ifdef _DEBUG - Con_Message("Cl_GetPackets: Packet (type %i) was discarded!\n", netBuffer.msg.type); + Con_Message("Cl_GetPackets: Packet (type %i) was discarded!", netBuffer.msg.type); #endif } } @@ -433,24 +433,24 @@ void Cl_Assertions(int plrNum) clmo = ClMobj_Find(s->clMobjId); if(!clmo) { - Con_Message("Cl_Assertions: client %i does not have a clmobj yet [%i].\n", plrNum, s->clMobjId); + Con_Message("Cl_Assertions: client %i does not have a clmobj yet [%i].", plrNum, s->clMobjId); return; } mo = plr->shared.mo; /* - Con_Message("Assert: client %i, clmo %i (flags 0x%x)\n", + Con_Message("Assert: client %i, clmo %i (flags 0x%x)", plrNum, clmo->thinker.id, clmo->ddFlags); */ // Make sure the flags are correctly set for a client. if(mo->ddFlags & DDMF_REMOTE) { - Con_Message("Cl_Assertions: client %i, mobj should not be remote!\n", plrNum); + Con_Message("Cl_Assertions: client %i, mobj should not be remote!", plrNum); } if(clmo->ddFlags & DDMF_SOLID) { - Con_Message("Cl_Assertions: client %i, clmobj should not be solid (when player is alive)!\n", plrNum); + Con_Message("Cl_Assertions: client %i, clmobj should not be solid (when player is alive)!", plrNum); } } diff --git a/doomsday/client/src/client/cl_mobj.cpp b/doomsday/client/src/client/cl_mobj.cpp index ce6265dd7e..6edea633cc 100644 --- a/doomsday/client/src/client/cl_mobj.cpp +++ b/doomsday/client/src/client/cl_mobj.cpp @@ -289,7 +289,7 @@ void Cl_UpdateRealPlayerMobj(mobj_t *localMobj, mobj_t *remoteClientMobj, int fl { localMobj->angle = remoteClientMobj->angle; #ifdef _DEBUG - VERBOSE2( Con_Message("Cl_UpdateRealPlayerMobj: localMobj=%p angle=%x\n", localMobj, localMobj->angle) ); + VERBOSE2( Con_Message("Cl_UpdateRealPlayerMobj: localMobj=%p angle=%x", localMobj, localMobj->angle) ); #endif } localMobj->sprite = remoteClientMobj->sprite; @@ -311,7 +311,7 @@ void Cl_UpdateRealPlayerMobj(mobj_t *localMobj, mobj_t *remoteClientMobj, int fl /*#ifdef _DEBUG if(localMobj->floorClip != remoteClientMobj->floorClip) { - Con_Message("Cl_UpdateRealPlayerMobj: Floorclip=%f\n", remoteClientMobj->floorClip); + Con_Message("Cl_UpdateRealPlayerMobj: Floorclip=%f", remoteClientMobj->floorClip); } #endif localMobj->floorClip = remoteClientMobj->floorClip;*/ @@ -425,7 +425,7 @@ void GameMap_ExpireClMobjs(GameMap* map) if(nowTime - info->time > CLMOBJ_TIMEOUT) { #ifdef _DEBUG - Con_Message("GameMap_ExpireClMobjs: Mobj %i has expired (%i << %i), in state %s [%c%c%c].\n", + Con_Message("GameMap_ExpireClMobjs: Mobj %i has expired (%i << %i), in state %s [%c%c%c].", mo->thinker.id, info->time, nowTime, Def_GetStateName(mo->state), @@ -673,7 +673,7 @@ boolean ClMobj_Reveal(mobj_t *mo) return false; } #ifdef _DEBUG - VERBOSE2( Con_Message("Cl_RevealMobj: clmobj %i Hidden status lifted (z=%f).\n", mo->thinker.id, mo->origin[VZ]) ); + VERBOSE2( Con_Message("Cl_RevealMobj: clmobj %i Hidden status lifted (z=%f).", mo->thinker.id, mo->origin[VZ]) ); #endif info->flags &= ~CLMF_HIDDEN; @@ -764,7 +764,7 @@ void ClMobj_ReadDelta2(boolean skip) } #ifdef _DEBUG - VERBOSE2( Con_Message("Cl_ReadMobjDelta: Reading mobj delta for %i (df:0x%x edf:0x%x skip:%i)\n", id, df, moreFlags, skip) ); + VERBOSE2( Con_Message("Cl_ReadMobjDelta: Reading mobj delta for %i (df:0x%x edf:0x%x skip:%i)", id, df, moreFlags, skip) ); #endif if(!skip) @@ -775,7 +775,7 @@ void ClMobj_ReadDelta2(boolean skip) if(!mo) { #ifdef _DEBUG - VERBOSE2( Con_Message("Cl_ReadMobjDelta: Creating new clmobj %i (hidden).\n", id) ); + VERBOSE2( Con_Message("Cl_ReadMobjDelta: Creating new clmobj %i (hidden).", id) ); #endif // This is a new ID, allocate a new mobj. @@ -870,7 +870,7 @@ void ClMobj_ReadDelta2(boolean skip) /*#if _DEBUG if((df & MDF_ORIGIN_Z) && d->dPlayer && P_GetDDPlayerIdx(d->dPlayer) != consolePlayer) { - Con_Message("ClMobj_ReadDelta2: Player=%i z=%f onFloor=%i\n", P_GetDDPlayerIdx(d->dPlayer), + Con_Message("ClMobj_ReadDelta2: Player=%i z=%f onFloor=%i", P_GetDDPlayerIdx(d->dPlayer), d->pos[VZ], onFloor); } #endif*/ @@ -1007,7 +1007,7 @@ void ClMobj_ReadDelta2(boolean skip) if(d->dPlayer) { #ifdef _DEBUG - VERBOSE2( Con_Message("ClMobj_ReadDelta2: Updating player %i local mobj with new clmobj state {%f, %f, %f}.\n", + VERBOSE2( Con_Message("ClMobj_ReadDelta2: Updating player %i local mobj with new clmobj state {%f, %f, %f}.", P_GetDDPlayerIdx(d->dPlayer), d->origin[VX], d->origin[VY], d->origin[VZ]) ); #endif // Players have real mobjs. The client mobj is hidden (unlinked). @@ -1056,7 +1056,7 @@ void ClMobj_ReadNullDelta2(boolean skip) else { #ifdef _DEBUG - Con_Message("ClMobj_ReadNullDelta2: clmobj of player %i deleted.\n", + Con_Message("ClMobj_ReadNullDelta2: clmobj of player %i deleted.", P_GetDDPlayerIdx(mo->dPlayer)); #endif diff --git a/doomsday/client/src/client/cl_player.cpp b/doomsday/client/src/client/cl_player.cpp index 567efc35ad..66819d23c5 100644 --- a/doomsday/client/src/client/cl_player.cpp +++ b/doomsday/client/src/client/cl_player.cpp @@ -189,7 +189,7 @@ void ClPlayer_ApplyPendingFixes(int plrNum) sendAck = true; #ifdef _DEBUG - Con_Message("ClPlayer_ApplyPendingFixes: Applying angle %x to mobj %p and clmo %i...\n", + Con_Message("ClPlayer_ApplyPendingFixes: Applying angle %x to mobj %p and clmo %i...", state->pendingAngleFix, mo, clmo->thinker.id); #endif clmo->angle = mo->angle = state->pendingAngleFix; @@ -203,7 +203,7 @@ void ClPlayer_ApplyPendingFixes(int plrNum) sendAck = true; #ifdef _DEBUG - Con_Message("ClPlayer_ApplyPendingFixes: Applying pos (%f, %f, %f) to mobj %p and clmo %i...\n", + Con_Message("ClPlayer_ApplyPendingFixes: Applying pos (%f, %f, %f) to mobj %p and clmo %i...", state->pendingOriginFix[VX], state->pendingOriginFix[VY], state->pendingOriginFix[VZ], mo, clmo->thinker.id); #endif @@ -224,7 +224,7 @@ void ClPlayer_ApplyPendingFixes(int plrNum) sendAck = true; #ifdef _DEBUG - Con_Message("ClPlayer_ApplyPendingFixes: Applying mom (%f, %f, %f) to mobj %p and clmo %i...\n", + Con_Message("ClPlayer_ApplyPendingFixes: Applying mom (%f, %f, %f) to mobj %p and clmo %i...", state->pendingMomFix[VX], state->pendingMomFix[VY], state->pendingMomFix[VZ], mo, clmo->thinker.id); #endif @@ -273,7 +273,7 @@ void ClPlayer_HandleFix(void) state->pendingFixes |= DDPF_FIXANGLES; #ifdef _DEBUG - Con_Message("Cl_HandlePlayerFix: [Plr %i] Fix angles %i. Angle=%x, lookdir=%f\n", plrNum, + Con_Message("Cl_HandlePlayerFix: [Plr %i] Fix angles %i. Angle=%x, lookdir=%f", plrNum, ddpl->fixAcked.angles, state->pendingAngleFix, state->pendingLookDirFix); #endif } @@ -287,7 +287,7 @@ void ClPlayer_HandleFix(void) state->pendingFixes |= DDPF_FIXORIGIN; #ifdef _DEBUG - Con_Message("Cl_HandlePlayerFix: [Plr %i] Fix pos %i. Pos=%f, %f, %f\n", plrNum, + Con_Message("Cl_HandlePlayerFix: [Plr %i] Fix pos %i. Pos=%f, %f, %f", plrNum, ddpl->fixAcked.origin, state->pendingOriginFix[VX], state->pendingOriginFix[VY], state->pendingOriginFix[VZ]); #endif } @@ -412,7 +412,7 @@ void ClPlayer_ReadDelta2(boolean skip) if(!clmo) { #ifdef _DEBUG - Con_Message("ClPlayer_ReadDelta2: Player %i's new clmobj is %i, but we don't know it yet.\n", + Con_Message("ClPlayer_ReadDelta2: Player %i's new clmobj is %i, but we don't know it yet.", num, newId); #endif // This mobj hasn't yet been sent to us. @@ -448,7 +448,7 @@ void ClPlayer_ReadDelta2(boolean skip) if(!justCreated) // && num != consolePlayer) { #ifdef _DEBUG - Con_Message("ClPlayer_ReadDelta2: Copying clmo %i state to real player %i mobj %p.\n", + Con_Message("ClPlayer_ReadDelta2: Copying clmo %i state to real player %i mobj %p.", newId, num, ddpl->mo); #endif Cl_UpdateRealPlayerMobj(ddpl->mo, clmo, 0xffffffff, true); @@ -459,8 +459,8 @@ void ClPlayer_ReadDelta2(boolean skip) // Update the new client mobj's information from the real // mobj, which is already known. #if _DEBUG - Con_Message("Cl_RdPlrD2: Pl%i: Copying pos&angle from real mobj to clmobj.\n", num); - Con_Message(" x=%g y=%g z=%g\n", ddpl->mo->origin[VX], ddpl->mo->origin[VY], ddpl->mo->origin[VZ]); + Con_Message("Cl_RdPlrD2: Pl%i: Copying pos&angle from real mobj to clmobj.", num); + Con_Message(" x=%g y=%g z=%g", ddpl->mo->origin[VX], ddpl->mo->origin[VY], ddpl->mo->origin[VZ]); #endif clmo->pos[VX] = ddpl->mo->origin[VX]; clmo->pos[VY] = ddpl->mo->origin[VY]; @@ -472,10 +472,10 @@ void ClPlayer_ReadDelta2(boolean skip) */ #if _DEBUG - Con_Message("ClPlr_RdD2: Pl%i: mobj=%i old=%p\n", num, s->clMobjId, old); - Con_Message(" x=%g y=%g z=%g fz=%g cz=%g\n", clmo->origin[VX], + Con_Message("ClPlr_RdD2: Pl%i: mobj=%i old=%p", num, s->clMobjId, old); + Con_Message(" x=%g y=%g z=%g fz=%g cz=%g", clmo->origin[VX], clmo->origin[VY], clmo->origin[VZ], clmo->floorZ, clmo->ceilingZ); - Con_Message("ClPlr_RdD2: pl=%i => moid=%i\n", (skip? -1 : num), s->clMobjId); + Con_Message("ClPlr_RdD2: pl=%i => moid=%i", (skip? -1 : num), s->clMobjId); #endif } } @@ -517,7 +517,7 @@ void ClPlayer_ReadDelta2(boolean skip) ddpl->flags &= ~DDPF_REMOTE_VIEW_FILTER; } #ifdef _DEBUG - Con_Message("ClPlayer_ReadDelta2: Filter color set remotely to (%f,%f,%f,%f)\n", + Con_Message("ClPlayer_ReadDelta2: Filter color set remotely to (%f,%f,%f,%f)", ddpl->filterColor[CR], ddpl->filterColor[CG], ddpl->filterColor[CB], diff --git a/doomsday/client/src/client/cl_sound.cpp b/doomsday/client/src/client/cl_sound.cpp index a10c9374a7..1981b23097 100644 --- a/doomsday/client/src/client/cl_sound.cpp +++ b/doomsday/client/src/client/cl_sound.cpp @@ -97,7 +97,7 @@ void Cl_ReadSoundDelta2(deltatype_t type, boolean skip) else { Con_Message("Cl_ReadSoundDelta2: DT_SECTOR_SOUND contains " - "invalid sector num %u. Skipping.\n", index); + "invalid sector num %u. Skipping.", index); skip = true; } } @@ -114,7 +114,7 @@ void Cl_ReadSoundDelta2(deltatype_t type, boolean skip) else { Con_Message("Cl_ReadSoundDelta2: DT_POLY_SOUND contains " - "invalid polyobj num %u. Skipping.\n", index); + "invalid polyobj num %u. Skipping.", index); skip = true; } } @@ -272,7 +272,7 @@ void Cl_Sound(void) // Is the ID valid? if(sound < 1 || sound >= defs.count.sounds.num) { - Con_Message("Cl_Sound: Out of bounds ID %i.\n", sound); + Con_Message("Cl_Sound: Out of bounds ID %i.", sound); return; // Bad sound ID! } #ifdef _DEBUG @@ -302,7 +302,7 @@ void Cl_Sound(void) num = Reader_ReadPackedUInt16(msgReader); if(num >= NUM_SECTORS) { - Con_Message("Cl_Sound: Invalid sector number %i.\n", num); + Con_Message("Cl_Sound: Invalid sector number %i.", num); return; } mo = (mobj_t*) &SECTOR_PTR(num)->base; diff --git a/doomsday/client/src/client/cl_world.cpp b/doomsday/client/src/client/cl_world.cpp index a9d42b19cb..d1d055573e 100644 --- a/doomsday/client/src/client/cl_world.cpp +++ b/doomsday/client/src/client/cl_world.cpp @@ -78,7 +78,7 @@ void Cl_ReadServerMaterials(void) MaterialArchive_Read(serverMaterials, msgReader, -1 /*no forced version*/); #ifdef _DEBUG - Con_Message("Cl_ReadServerMaterials: Received %i materials.\n", MaterialArchive_Count(serverMaterials)); + Con_Message("Cl_ReadServerMaterials: Received %i materials.", MaterialArchive_Count(serverMaterials)); #endif } @@ -103,7 +103,7 @@ void Cl_ReadServerMobjTypeIDs(void) StringArray* ar = StringArray_New(); StringArray_Read(ar, msgReader); #ifdef _DEBUG - Con_Message("Cl_ReadServerMobjTypeIDs: Received %i mobj type IDs.\n", StringArray_Size(ar)); + Con_Message("Cl_ReadServerMobjTypeIDs: Received %i mobj type IDs.", StringArray_Size(ar)); #endif setTableSize(&xlatMobjType, StringArray_Size(ar)); @@ -114,7 +114,7 @@ void Cl_ReadServerMobjTypeIDs(void) xlatMobjType.serverToLocal[i] = Def_GetMobjNum(StringArray_At(ar, i)); if(xlatMobjType.serverToLocal[i] < 0) { - Con_Message("Could not find '%s' in local thing definitions.\n", + Con_Message("Could not find '%s' in local thing definitions.", StringArray_At(ar, i)); } } @@ -128,7 +128,7 @@ void Cl_ReadServerMobjStateIDs(void) StringArray* ar = StringArray_New(); StringArray_Read(ar, msgReader); #ifdef _DEBUG - Con_Message("Cl_ReadServerMobjStateIDs: Received %i mobj state IDs.\n", StringArray_Size(ar)); + Con_Message("Cl_ReadServerMobjStateIDs: Received %i mobj state IDs.", StringArray_Size(ar)); #endif setTableSize(&xlatMobjState, StringArray_Size(ar)); @@ -139,7 +139,7 @@ void Cl_ReadServerMobjStateIDs(void) xlatMobjState.serverToLocal[i] = Def_GetStateNum(StringArray_At(ar, i)); if(xlatMobjState.serverToLocal[i] < 0) { - Con_Message("Could not find '%s' in local state definitions.\n", + Con_Message("Could not find '%s' in local state definitions.", StringArray_At(ar, i)); } } @@ -152,7 +152,7 @@ static Material *Cl_FindLocalMaterial(materialarchive_serialid_t archId) if(!serverMaterials) { // Can't do it. - Con_Message("Cl_FindLocalMaterial: Cannot translate serial id %i, server has not sent its materials!\n", archId); + Con_Message("Cl_FindLocalMaterial: Cannot translate serial id %i, server has not sent its materials!", archId); return 0; } return (Material *)MaterialArchive_Find(serverMaterials, archId, 0); @@ -325,7 +325,7 @@ void Cl_MoverThinker(clplane_t* mover) #ifdef _DEBUG if(GameMap_ClPlaneIndex(map, mover) < 0) { - Con_Message("Cl_MoverThinker: Running a mover that is not in activemovers!\n"); + Con_Message("Cl_MoverThinker: Running a mover that is not in activemovers!"); } #endif @@ -576,7 +576,7 @@ void Cl_SetPolyMover(uint number, int move, int rotate) clpolyobj_t* mover = Cl_FindOrMakeActivePoly(number); if(!mover) { - Con_Message("Cl_SetPolyMover: Out of polymovers.\n"); + Con_Message("Cl_SetPolyMover: Out of polymovers."); return; } @@ -865,7 +865,7 @@ void Cl_ReadPolyDelta2(boolean skip) angleSpeed = ((angle_t)Reader_ReadInt16(msgReader)) << 16; /*#ifdef _DEBUG - Con_Message("Cl_ReadPolyDelta2: PO %i, angle %f, speed %f\n", num, FIX2FLT(destAngle), FIX2FLT(angleSpeed)); + Con_Message("Cl_ReadPolyDelta2: PO %i, angle %f, speed %f", num, FIX2FLT(destAngle), FIX2FLT(angleSpeed)); #endif*/ if(skip) diff --git a/doomsday/client/src/con_config.cpp b/doomsday/client/src/con_config.cpp index 877990c4f5..d2fa95ace5 100644 --- a/doomsday/client/src/con_config.cpp +++ b/doomsday/client/src/con_config.cpp @@ -131,7 +131,7 @@ static boolean writeConsoleState(const char* fileName) FILE* file; if(!fileName || !fileName[0]) return false; - VERBOSE(Con_Message("Writing state to \"%s\"...\n", fileName)); + VERBOSE(Con_Message("Writing state to \"%s\"...", fileName)); Str_Init(&nativePath); Str_Set(&nativePath, fileName); @@ -159,7 +159,7 @@ static boolean writeConsoleState(const char* fileName) fclose(file); return true; } - Con_Message("Warning:writeConsoleState: Failed opening \"%s\" for writing.\n", F_PrettyPath(fileName)); + Con_Message("Warning:writeConsoleState: Failed opening \"%s\" for writing.", F_PrettyPath(fileName)); return false; } @@ -170,7 +170,7 @@ static boolean writeBindingsState(const char* fileName) FILE* file; if(!fileName || !fileName[0]) return false; - VERBOSE(Con_Message("Writing bindings to \"%s\"...\n", fileName)); + VERBOSE(Con_Message("Writing bindings to \"%s\"...", fileName)); Str_Init(&nativePath); Str_Set(&nativePath, fileName); @@ -194,7 +194,7 @@ static boolean writeBindingsState(const char* fileName) fclose(file); return true; } - Con_Message("Warning:writeBindingsState: Failed opening \"%s\" for writing.\n", F_PrettyPath(fileName)); + Con_Message("Warning:writeBindingsState: Failed opening \"%s\" for writing.", F_PrettyPath(fileName)); return false; } #endif // __CLIENT__ @@ -224,11 +224,11 @@ boolean Con_ParseCommands2(const char* fileName, int flags) file = F_Open(fileName, "rt"); if(!file) { - VERBOSE(Con_Message("Could not open: \"%s\"\n", fileName)); + VERBOSE(Con_Message("Could not open: \"%s\"", fileName)); return false; } - VERBOSE(Con_Message("Con_ParseCommands: %s (def:%i)\n", F_PrettyPath(fileName), setdefault)); + VERBOSE(Con_Message("Con_ParseCommands: %s (def:%i)", F_PrettyPath(fileName), setdefault)); // This file is filled with console commands. // Each line is a command. @@ -239,7 +239,7 @@ boolean Con_ParseCommands2(const char* fileName, int flags) { // Execute the commands silently. if(!Con_Execute(CMDS_CONFIG, buff, setdefault, false)) - Con_Message("%s(%d): error executing command\n \"%s\"\n", F_PrettyPath(fileName), line, buff); + Con_Message("%s(%d): error executing command\n \"%s\"", F_PrettyPath(fileName), line, buff); } if(FileHandle_AtEnd(file)) break; @@ -282,6 +282,6 @@ D_CMD(WriteConsole) { DENG2_UNUSED2(src, argc); - Con_Message("Writing to \"%s\"...\n", argv[1]); + Con_Message("Writing to \"%s\"...", argv[1]); return !Con_WriteState(argv[1], NULL); } diff --git a/doomsday/client/src/con_data.cpp b/doomsday/client/src/con_data.cpp index 6cbaedfea5..07f1a83a98 100644 --- a/doomsday/client/src/con_data.cpp +++ b/doomsday/client/src/con_data.cpp @@ -149,7 +149,7 @@ static int clearVariable(CVarDirectory::Node& node, void* parameters) default: { #if _DEBUG AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: clearVariable: Attempt to free user data for non-pointer type variable %s [%p], ignoring.\n", + Con_Message("Warning: clearVariable: Attempt to free user data for non-pointer type variable %s [%p], ignoring.", Str_Text(path), (void*)var); #endif break; } @@ -587,7 +587,7 @@ void CVar_SetInteger2(cvar_t* var, int value, int svFlags) default: { AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::SetInteger: Attempt to set incompatible var %s to %i, ignoring.\n", Str_Text(path), value); + Con_Message("Warning: CVar::SetInteger: Attempt to set incompatible var %s to %i, ignoring.", Str_Text(path), value); return; } } @@ -634,7 +634,7 @@ void CVar_SetFloat2(cvar_t* var, float value, int svFlags) default: { AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::SetFloat: Attempt to set incompatible cvar %s to %g, ignoring.\n", Str_Text(path), value); + Con_Message("Warning: CVar::SetFloat: Attempt to set incompatible cvar %s to %g, ignoring.", Str_Text(path), value); return; } } @@ -660,7 +660,7 @@ int CVar_Integer(cvar_t const* var) default: { #if _DEBUG AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::Integer: Attempted on incompatible variable %s [%p type:%s], returning 0\n", + Con_Message("Warning: CVar::Integer: Attempted on incompatible variable %s [%p type:%s], returning 0", Str_Text(path), (void*)var, Str_Text(CVar_TypeName(CVar_Type(var)))); #endif return 0; } @@ -679,7 +679,7 @@ float CVar_Float(cvar_t const* var) default: { #if _DEBUG AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::Float: Attempted on incompatible variable %s [%p type:%s], returning 0\n", + Con_Message("Warning: CVar::Float: Attempted on incompatible variable %s [%p type:%s], returning 0", Str_Text(path), (void*)var, Str_Text(CVar_TypeName(CVar_Type(var)))); #endif return 0; @@ -699,7 +699,7 @@ byte CVar_Byte(cvar_t const* var) default: { #if _DEBUG AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::Byte: Attempted on incompatible variable %s [%p type:%s], returning 0\n", + Con_Message("Warning: CVar::Byte: Attempted on incompatible variable %s [%p type:%s], returning 0", Str_Text(path), (void*)var, Str_Text(CVar_TypeName(CVar_Type(var)))); #endif return 0; @@ -717,7 +717,7 @@ char const* CVar_String(cvar_t const* var) default: { #if _DEBUG AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::String: Attempted on incompatible variable %s [%p type:%s], returning emptyString\n", + Con_Message("Warning: CVar::String: Attempted on incompatible variable %s [%p type:%s], returning emptyString", Str_Text(path), (void*)var, Str_Text(CVar_TypeName(CVar_Type(var)))); #endif return Str_Text(emptyStr); } @@ -734,7 +734,7 @@ Uri const* CVar_Uri(cvar_t const* var) default: { #if _DEBUG AutoStr* path = CVar_ComposePath(var); - Con_Message("Warning: CVar::String: Attempted on incompatible variable %s [%p type:%s], returning emptyUri\n", + Con_Message("Warning: CVar::String: Attempted on incompatible variable %s [%p type:%s], returning emptyUri", Str_Text(path), (void*)var, Str_Text(CVar_TypeName(CVar_Type(var)))); #endif return emptyUri; } @@ -767,7 +767,7 @@ void Con_AddVariableList(cvartemplate_t const* tplList) if(!tplList) { Con_Message("Warning: Con_AddVariableList: Passed invalid value for " - "argument 'tplList', ignoring.\n"); + "argument 'tplList', ignoring."); return; } for(; tplList->path; ++tplList) @@ -849,7 +849,7 @@ void Con_AddCommand(ccmdtemplate_t const* ccmd) Con_Error("Con_AddCommand: CCmd missing a name."); /*#if _DEBUG -Con_Message("Con_AddCommand: '%s' \"%s\" (%i).\n", ccmd->name, +Con_Message("Con_AddCommand: '%s' \"%s\" (%i).", ccmd->name, ccmd->argTemplate, ccmd->flags); #endif*/ @@ -917,8 +917,6 @@ Con_Message("Con_AddCommand: '%s' \"%s\" (%i).\n", ccmd->name, } /*#if _DEBUG - Con_Message("Con_AddCommand: CCmd '%s': minArgs %i, maxArgs %i: \"", - ccmd->name, minArgs, maxArgs); for(int i = 0; i < minArgs; ++i) { switch(args[i]) @@ -930,7 +928,8 @@ Con_Message("Con_AddCommand: '%s' \"%s\" (%i).\n", ccmd->name, } Con_Printf("%c", c); } - Con_Printf("\".\n"); + Con_Message("Con_AddCommand: CCmd \"%s\": minArgs %i, maxArgs %i:, '%c'.", + ccmd->name, minArgs, maxArgs, c); #endif*/ } else // It's usage is NOT validated by Doomsday. @@ -939,7 +938,7 @@ Con_Message("Con_AddCommand: '%s' \"%s\" (%i).\n", ccmd->name, /*#if _DEBUG if(ccmd->args == NULL) - Con_Message("Con_AddCommand: CCmd '%s' will not have it's usage validated.\n", ccmd->name); + Con_Message("Con_AddCommand: CCmd '%s' will not have it's usage validated.", ccmd->name); #endif*/ } diff --git a/doomsday/client/src/con_main.cpp b/doomsday/client/src/con_main.cpp index b99387b960..5f5f51bafb 100644 --- a/doomsday/client/src/con_main.cpp +++ b/doomsday/client/src/con_main.cpp @@ -391,7 +391,7 @@ boolean Con_Init(void) return true; } - Con_Message("Initializing the console...\n"); + Con_Message("Initializing the console..."); histBuf = CBuffer_New(512, 70, 0); bLineOff = 0; @@ -429,16 +429,20 @@ void Con_Shutdown(void) { if(!ConsoleInited) return; - Con_Message("Shutting down the console...\n"); + Con_Message("Shutting down the console..."); Con_ClearExecBuffer(); Con_ShutdownDatabases(); if(prbuff) - M_Free(prbuff), prbuff = NULL; + { + M_Free(prbuff); prbuff = 0; + } if(histBuf) - CBuffer_Delete(histBuf), histBuf = NULL; + { + CBuffer_Delete(histBuf); histBuf = 0; + } clearCommandHistory(); @@ -576,7 +580,7 @@ static void Con_Send(const char *command, byte src, int silent) if(len >= 0x8000) { - Con_Message("Con_Send: Command is too long, length=%i.\n", len); + Con_Message("Con_Send: Command is too long, length=%i.", len); return; } @@ -663,8 +667,7 @@ static boolean Con_CheckExecBuffer(void) if(count++ > 100) { - Con_Message("Console execution buffer overflow! " - "Everything canceled.\n"); + Con_Message("Console execution buffer overflow! Everything canceled."); Con_ClearExecBuffer(); break; } @@ -1974,7 +1977,8 @@ void Con_Message(char const *message, ...) va_end(argptr); // Ensure the message has a terminating new line character. - if(buffer[qstrlen(buffer)] != '\n') + int messageLen = qstrlen(buffer); + if(messageLen && buffer[messageLen - 1] != '\n') std::strcat(buffer, "\n"); // These messages are always dumped. If consoleDump is set, @@ -2196,7 +2200,7 @@ D_CMD(Quit) #ifdef __CLIENT__ if(Updater_IsDownloadInProgress()) { - Con_Message("Cannot quit while downloading update.\n"); + Con_Message("Cannot quit while downloading update."); return false; } #endif diff --git a/doomsday/client/src/dd_loop.cpp b/doomsday/client/src/dd_loop.cpp index 521d5cb3b0..a486e9af82 100644 --- a/doomsday/client/src/dd_loop.cpp +++ b/doomsday/client/src/dd_loop.cpp @@ -190,7 +190,7 @@ static void endFrame(void) uint nowTime = Timer_RealMilliseconds(); /* - Con_Message("endFrame with %i ms (%i render)\n", nowTime - lastShowAt, nowTime - frameStartAt); + Con_Message("endFrame with %i ms (%i render)", nowTime - lastShowAt, nowTime - frameStartAt); lastShowAt = nowTime; */ @@ -408,7 +408,7 @@ 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\n", SECONDS_TO_TICKS(sysTime + time), + Con_Message("%i,%f,%f,%f,%f", SECONDS_TO_TICKS(sysTime + time), ddPlayers[0].shared.forwardMove, speed, actualSpeed, speed - prevSpeed); V3d_Copy(prevPos, mo->origin); @@ -515,7 +515,7 @@ 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\n", + 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); diff --git a/doomsday/client/src/dd_main.cpp b/doomsday/client/src/dd_main.cpp index 0281edac4b..4e3beb0300 100644 --- a/doomsday/client/src/dd_main.cpp +++ b/doomsday/client/src/dd_main.cpp @@ -174,7 +174,7 @@ D_CMD(CheckForUpdates) { DENG_UNUSED(src); DENG_UNUSED(argc); DENG_UNUSED(argv); - Con_Message("Checking for available updates...\n"); + Con_Message("Checking for available updates..."); Updater_CheckNow(false/* don't notify */); return true; } @@ -184,7 +184,7 @@ D_CMD(CheckForUpdatesAndNotify) DENG_UNUSED(src); DENG_UNUSED(argc); DENG_UNUSED(argv); /// @todo Combine into the same command with CheckForUpdates? - Con_Message("Checking for available updates...\n"); + Con_Message("Checking for available updates..."); Updater_CheckNow(true/* do notify */); return true; } @@ -852,7 +852,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\n", wad->calculateCRC()); + Con_Message(" IWAD identification: %08x", wad->calculateCRC()); } } } @@ -912,7 +912,7 @@ static int DD_LoadGameStartupResourcesWorker(void* parameters) * @note Duplicate processing of the same file is automatically guarded * against by the virtual file system layer. */ - Con_Message("Loading game resources%s\n", verbose >= 1? ":" : "..."); + Con_Message("Loading game resources%s", verbose >= 1? ":" : "..."); de::Game::Manifests const& gameManifests = games->current().manifests(); int const numPackages = gameManifests.count(RC_PACKAGE); @@ -1195,7 +1195,7 @@ static int DD_ActivateGameWorker(void* parameters) configFileName = games->current().mainConfig(); } - Con_Message("Parsing primary config \"%s\"...\n", F_PrettyPath(Str_Text(configFileName))); + Con_Message("Parsing primary config \"%s\"...", F_PrettyPath(Str_Text(configFileName))); Con_ParseCommands2(Str_Text(configFileName), CPCF_SET_DEFAULT | CPCF_ALLOW_SAVE_STATE); if(configFileName == &tmp) Str_Free(&tmp); @@ -1302,7 +1302,7 @@ boolean DD_GameInfo(GameInfo *info) } #if _DEBUG - Con_Message("DD_GameInfo: Warning, no game currently loaded - returning false.\n"); + Con_Message("DD_GameInfo: Warning, no game currently loaded - returning false."); #endif return false; } @@ -1355,7 +1355,7 @@ gameid_t DD_DefineGame(GameDef const *def) { /*de::Game& game =*/ games->byIdentityKey(def->identityKey); #if _DEBUG - Con_Message("Warning: DD_DefineGame: Failed adding game \"%s\", identity key '%s' already in use, ignoring.\n", def->defaultTitle, def->identityKey); + Con_Message("Warning: DD_DefineGame: Failed adding game \"%s\", identity key '%s' already in use, ignoring.", def->defaultTitle, def->identityKey); #endif return 0; // Invalid id. } @@ -1399,7 +1399,7 @@ bool DD_ChangeGame(de::Game& game, bool allowReload = false) if(!allowReload) { if(App_GameLoaded()) - Con_Message("%s (%s) - already loaded.\n", Str_Text(game.title()), Str_Text(game.identityKey())); + Con_Message("%s (%s) - already loaded.", Str_Text(game.title()), Str_Text(game.identityKey())); return true; } // We are re-loading. @@ -1533,11 +1533,11 @@ bool DD_ChangeGame(de::Game& game, bool allowReload = false) VERBOSE( if(!isNullGame(game)) { - Con_Message("Selecting game '%s'...\n", Str_Text(game.identityKey())); + Con_Message("Selecting game '%s'...", Str_Text(game.identityKey())); } else if(!isReload) { - Con_Message("Unloaded game.\n"); + Con_Message("Unloaded game."); } ) @@ -1554,7 +1554,7 @@ bool DD_ChangeGame(de::Game& game, bool allowReload = false) // Re-initialize subsystems needed even when in ringzero. if(!DD_ExchangeGamePluginEntryPoints(game.pluginId())) { - Con_Message("Warning: DD_ChangeGame: Failed exchanging entrypoints with plugin %i, aborting.\n", (int)game.pluginId()); + Con_Message("Warning: DD_ChangeGame: Failed exchanging entrypoints with plugin %i, aborting.", (int)game.pluginId()); return false; } @@ -1670,7 +1670,7 @@ static void DD_AutoLoad(void) int numNewFiles; while((numNewFiles = loadFilesFromDataGameAuto()) > 0) { - VERBOSE( Con_Message("Autoload round completed with %i new files.\n", numNewFiles) ); + VERBOSE( Con_Message("Autoload round completed with %i new files.", numNewFiles) ); } } @@ -1945,7 +1945,7 @@ boolean DD_Init(void) } else { - Con_Message("Warning: Cannot dump unknown lump \"%s\", ignoring.\n", name.toAscii().constData()); + Con_Message("Warning: Cannot dump unknown lump \"%s\", ignoring.", name.toAscii().constData()); } } @@ -1963,17 +1963,17 @@ boolean DD_Init(void) if(CommandLine_CheckWith("-parse", 1)) { uint startTime; - Con_Message("Parsing additional (pre-init) config files:\n"); + Con_Message("Parsing additional (pre-init) config files:"); startTime = Timer_RealMilliseconds(); for(;;) { const char* arg = CommandLine_Next(); if(!arg || arg[0] == '-') break; - Con_Message(" Processing \"%s\"...\n", F_PrettyPath(arg)); + Con_Message(" Processing \"%s\"...", F_PrettyPath(arg)); Con_ParseCommands(arg); } - VERBOSE( Con_Message(" Done in %.2f seconds.\n", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); + VERBOSE( Con_Message(" Done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); } // A console command on the command line? @@ -2045,7 +2045,7 @@ boolean DD_Init(void) // We'll open the console and print a list of the known games too. Con_Execute(CMDS_DDAY, "conopen", true, false); if(!CommandLine_Exists("-noautoselect")) - Con_Message("Automatic game selection failed.\n"); + Con_Message("Automatic game selection failed."); Con_Execute(CMDS_DDAY, "listgames", false, false); } @@ -2054,7 +2054,7 @@ boolean DD_Init(void) static void DD_InitResourceSystem(void) { - Con_Message("Initializing Resource subsystem...\n"); + Con_Message("Initializing Resource subsystem..."); initPathMappings(); @@ -2078,7 +2078,7 @@ static int DD_StartupWorker(void* /*parm*/) // Was the change to userdir OK? if(CommandLine_CheckWith("-userdir", 1) && !app.usingUserDir) - Con_Message("--(!)-- User directory not found (check -userdir).\n"); + Con_Message("--(!)-- User directory not found (check -userdir)."); DD_InitResourceSystem(); @@ -2093,16 +2093,16 @@ static int DD_StartupWorker(void* /*parm*/) { uint startTime = Timer_RealMilliseconds(); - Con_Message("Parsing additional (pre-init) config files:\n"); + Con_Message("Parsing additional (pre-init) config files:"); for(;;) { char const *arg = CommandLine_NextAsPath(); if(!arg || arg[0] == '-') break; - Con_Message(" Processing \"%s\"...\n", F_PrettyPath(arg)); + Con_Message(" Processing \"%s\"...", F_PrettyPath(arg)); Con_ParseCommands(arg); } - VERBOSE( Con_Message(" Done in %.2f seconds.\n", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); + VERBOSE( Con_Message(" Done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); } /* @@ -2132,19 +2132,19 @@ static int DD_StartupWorker(void* /*parm*/) GL_EarlyInitTextureManager(); #endif - Con_Message("Initializing Texture subsystem...\n"); + Con_Message("Initializing Texture subsystem..."); DENG_ASSERT(!textures); textures = new Textures(); DD_CreateTextureSchemes(); - Con_Message("Initializing Material subsystem...\n"); + Con_Message("Initializing Material subsystem..."); DENG_ASSERT(!materials); materials = new Materials(); DD_CreateMaterialSchemes(); Con_SetProgress(140); #ifdef __CLIENT__ - Con_Message("Initializing Binding subsystem...\n"); + Con_Message("Initializing Binding subsystem..."); B_Init(); Con_SetProgress(150); #endif @@ -2157,10 +2157,10 @@ static int DD_StartupWorker(void* /*parm*/) Demo_Init(); #endif - Con_Message("Initializing InFine subsystem...\n"); + Con_Message("Initializing InFine subsystem..."); FI_Init(); - Con_Message("Initializing UI subsystem...\n"); + Con_Message("Initializing UI subsystem..."); UI_Init(); Con_SetProgress(190); @@ -2251,7 +2251,7 @@ void DD_UpdateEngineState(void) { boolean hadFog; - Con_Message("Updating engine state...\n"); + Con_Message("Updating engine state..."); // Stop playing sounds and music. S_Reset(); @@ -2782,7 +2782,7 @@ D_CMD(Load) // Ignore attempts to load directories. if(Str_RAt(searchPath, 0) == '/') { - Con_Message("Directories cannot be \"loaded\" (only files and/or known games).\n"); + Con_Message("Directories cannot be \"loaded\" (only files and/or known games)."); return true; } @@ -2792,9 +2792,9 @@ D_CMD(Load) Game &game = games->byIdentityKey(Str_Text(searchPath)); if(!game.allStartupFilesFound()) { - Con_Message("Failed to locate all required startup resources:\n"); + Con_Message("Failed to locate all required startup resources:"); Game::printFiles(game, FF_STARTUP); - Con_Message("%s (%s) cannot be loaded.\n", Str_Text(game.title()), Str_Text(game.identityKey())); + Con_Message("%s (%s) cannot be loaded.", Str_Text(game.title()), Str_Text(game.identityKey())); return true; } if(!DD_ChangeGame(game)) return false; @@ -2838,7 +2838,7 @@ static de::File1* tryLoadFile(de::Uri const& search, size_t baseOffset) de::FileHandle& hndl = App_FileSystem().openFile(search.path(), "rb", baseOffset, false /* no duplicates */); de::Uri foundFileUri = hndl.file().composeUri(); - VERBOSE( Con_Message("Loading \"%s\"...\n", NativePath(foundFileUri.asText()).pretty().toUtf8().constData()) ) + VERBOSE( Con_Message("Loading \"%s\"...", NativePath(foundFileUri.asText()).pretty().toUtf8().constData()) ) App_FileSystem().index(hndl.file()); @@ -2867,17 +2867,17 @@ static bool tryUnloadFile(de::Uri const& search) if(games->current().isRequiredFile(file)) { Con_Message("\"%s\" is required by the current game.\n" - "Required game files cannot be unloaded in isolation.\n", + "Required game files cannot be unloaded in isolation.", pathUtf8.constData()); return false; } - VERBOSE2( Con_Message("Unloading \"%s\"...\n", pathUtf8.constData()) ) + VERBOSE2( Con_Message("Unloading \"%s\"...", pathUtf8.constData()) ) App_FileSystem().deindex(file); delete &file; - VERBOSE2( Con_Message("Done unloading \"%s\".\n", pathUtf8.constData()) ) + VERBOSE2( Con_Message("Done unloading \"%s\".", pathUtf8.constData()) ) return true; } catch(FS1::NotFoundError const&) @@ -2894,7 +2894,7 @@ D_CMD(Unload) { if(!App_GameLoaded()) { - Con_Message("There is no game currently loaded.\n"); + Con_Message("There is no game currently loaded."); return true; } return DD_ChangeGame(games->nullGame()); @@ -2910,7 +2910,7 @@ D_CMD(Unload) // Ignore attempts to unload directories. if(Str_RAt(searchPath, 0) == '/') { - Con_Message("Directories cannot be \"unloaded\" (only files and/or known games).\n"); + Con_Message("Directories cannot be \"unloaded\" (only files and/or known games)."); return true; } @@ -2925,7 +2925,7 @@ D_CMD(Unload) return DD_ChangeGame(games->nullGame()); } - Con_Message("%s is not currently loaded.\n", Str_Text(game.identityKey())); + Con_Message("%s is not currently loaded.", Str_Text(game.identityKey())); return true; } catch(Games::NotFoundError const &) @@ -2974,7 +2974,7 @@ D_CMD(ReloadGame) if(!App_GameLoaded()) { - Con_Message("No game is presently loaded.\n"); + Con_Message("No game is presently loaded."); return true; } DD_ChangeGame(games->current(), true/* allow reload */); diff --git a/doomsday/client/src/dd_pinit.cpp b/doomsday/client/src/dd_pinit.cpp index efb902a048..5ae210a4f7 100644 --- a/doomsday/client/src/dd_pinit.cpp +++ b/doomsday/client/src/dd_pinit.cpp @@ -144,13 +144,13 @@ void DD_ConsoleInit(void) // Get the console online ASAP. Con_Init(); - Con_Message("Executable: " DOOMSDAY_NICENAME " " DOOMSDAY_VERSION_FULLTEXT ".\n"); + Con_Message("Executable: " DOOMSDAY_NICENAME " " DOOMSDAY_VERSION_FULLTEXT "."); // Print the used command line. - Con_Message("Command line (%i strings):\n", CommandLine_Count()); + Con_Message("Command line (%i strings):", CommandLine_Count()); for(p = 0; p < CommandLine_Count(); ++p) { - Con_Message(" %i: %s\n", p, CommandLine_At(p)); + Con_Message(" %i: %s", p, CommandLine_At(p)); } } diff --git a/doomsday/client/src/dd_plugin.cpp b/doomsday/client/src/dd_plugin.cpp index 2d75781791..b34c4bc29f 100644 --- a/doomsday/client/src/dd_plugin.cpp +++ b/doomsday/client/src/dd_plugin.cpp @@ -87,7 +87,7 @@ static int loadPlugin(void* libraryFile, const char* fileName, const char* plugi plugin = Library_New(pluginPath); if(!plugin) { - Con_Message(" loadPlugin: Did not load \"%s\" (%s).\n", pluginPath, Library_LastError()); + Con_Message(" loadPlugin: Did not load \"%s\" (%s).", pluginPath, Library_LastError()); return 0; // Continue iteration. } @@ -121,7 +121,7 @@ static int loadPlugin(void* libraryFile, const char* fileName, const char* plugi // This seems to be a Doomsday plugin. _splitpath(pluginPath, NULL, NULL, name, NULL); - Con_Message(" (id:%i) %s\n", plugId, name); + Con_Message(" (id:%i) %s", plugId, name); *handle = plugin; @@ -144,7 +144,7 @@ static boolean unloadPlugin(PluginHandle* handle) void Plug_LoadAll(void) { - Con_Message("Initializing plugins...\n"); + Con_Message("Initializing plugins..."); Library_IterateAvailableLibraries(loadPlugin, 0); } @@ -286,7 +286,7 @@ void* DD_FindEntryPoint(pluginid_t pluginId, const char* fn) addr = Library_Symbol(hInstPlug[plugIndex], fn); if(!addr) { - Con_Message("DD_FindEntryPoint: Error locating address of \"%s\" (%s).\n", fn, + Con_Message("DD_FindEntryPoint: Error locating address of \"%s\" (%s).", fn, Library_LastError()); } return addr; diff --git a/doomsday/client/src/dd_wad.cpp b/doomsday/client/src/dd_wad.cpp index f7ccf7555e..0282db33f2 100644 --- a/doomsday/client/src/dd_wad.cpp +++ b/doomsday/client/src/dd_wad.cpp @@ -117,12 +117,12 @@ lumpnum_t W_CheckLumpNumForName2(char const* name, boolean silent) if(!name || !name[0]) { if(!silent) - VERBOSE2( Con_Message("Warning: W_CheckLumpNumForName: Empty name, returning invalid lumpnum.\n") ) + VERBOSE2( Con_Message("Warning: W_CheckLumpNumForName: Empty name, returning invalid lumpnum.") ) return -1; } lumpNum = App_FileSystem().lumpNumForName(name); if(!silent && lumpNum < 0) - VERBOSE2( Con_Message("Warning: W_CheckLumpNumForName: Lump \"%s\" not found.\n", name) ) + VERBOSE2( Con_Message("Warning: W_CheckLumpNumForName: Lump \"%s\" not found.", name) ) return lumpNum; } diff --git a/doomsday/client/src/def_main.cpp b/doomsday/client/src/def_main.cpp index 48346dfeec..593bb455fc 100644 --- a/doomsday/client/src/def_main.cpp +++ b/doomsday/client/src/def_main.cpp @@ -733,7 +733,7 @@ void Def_CountMsg(int count, const char* label) if(!verbose && !count) return; // Don't print zeros if not verbose. - Con_Message("%5i %s\n", count, label); + Con_Message("%5i %s", count, label); } /** @@ -758,7 +758,7 @@ void Def_ReadLumpDefs(void) if(verbose && numProcessedLumps > 0) { - Con_Message("ReadLumpDefs: %i definition lump%s read.\n", numProcessedLumps, numProcessedLumps != 1 ? "s" : ""); + Con_Message("ReadLumpDefs: %i definition lump%s read.", numProcessedLumps, numProcessedLumps != 1 ? "s" : ""); } } @@ -1241,7 +1241,7 @@ void Def_Read() generateMaterialDefs(); // Read all definitions files and lumps. - Con_Message("Parsing definition files%s\n", verbose >= 1? ":" : "..."); + Con_Message("Parsing definition files%s", verbose >= 1? ":" : "..."); readAllDefinitions(); // Any definition hooks? @@ -1417,7 +1417,7 @@ void Def_Read() // It's probably a bias light definition, then? if(!defs.lights[i].uniqueMapID[0]) { - Con_Message("Warning: Def_Read: Undefined state '%s' in Light definition.\n", defs.lights[i].state); + Con_Message("Warning: Def_Read: Undefined state '%s' in Light definition.", defs.lights[i].state); } continue; } @@ -1579,7 +1579,7 @@ void Def_Read() } // Log a summary of the definition database. - Con_Message("Definitions:\n"); + Con_Message("Definitions:"); Def_CountMsg(defs.count.groups.num, "animation groups"); Def_CountMsg(defs.count.compositeFonts.num, "composite fonts"); Def_CountMsg(defs.count.details.num, "detail textures"); @@ -2144,7 +2144,7 @@ int Def_Set(int type, int index, int value, const void* ptr) if(sprite < 0 || sprite >= defs.count.sprites.num) { - Con_Message("Warning: Def_Set: Unknown sprite index %i.\n", sprite); + Con_Message("Warning: Def_Set: Unknown sprite index %i.", sprite); break; } @@ -2173,7 +2173,7 @@ int Def_Set(int type, int index, int value, const void* ptr) sounds[index].lumpNum = App_FileSystem().lumpNumForName(sounds[index].lumpName); if(sounds[index].lumpNum < 0) { - Con_Message("Warning: Def_Set: Unknown sound lump name \"%s\", sound (#%i) will be inaudible.\n", + Con_Message("Warning: Def_Set: Unknown sound lump name \"%s\", sound (#%i) will be inaudible.", sounds[index].lumpName, index); } } @@ -2289,7 +2289,7 @@ D_CMD(ListMobjs) if(defs.count.mobjs.num <= 0) { - Con_Message("There are currently no mobjtypes defined/loaded.\n"); + Con_Message("There are currently no mobjtypes defined/loaded."); return true; } diff --git a/doomsday/client/src/def_read.cpp b/doomsday/client/src/def_read.cpp index 843bfc1032..9ad8ab3eda 100644 --- a/doomsday/client/src/def_read.cpp +++ b/doomsday/client/src/def_read.cpp @@ -881,7 +881,7 @@ static int DED_ReadData(ded_t* ded, const char* buffer, const char* _sourceFile) idx = Def_GetMobjNum(otherMobjId); if(idx < 0) { - VERBOSE( Con_Message("Warning: Unknown Mobj %s in %s on line #%i, will be ignored.\n", + VERBOSE( Con_Message("Warning: Unknown Mobj %s in %s on line #%i, will be ignored.", otherMobjId, source ? source->fileName : "?", source ? source->lineNumber : 0) ) // We'll read into a dummy definition. @@ -980,7 +980,7 @@ static int DED_ReadData(ded_t* ded, const char* buffer, const char* _sourceFile) idx = Def_GetStateNum(otherStateId); if(idx < 0) { - VERBOSE( Con_Message("Warning: Unknown State %s in %s on line #%i, will be ignored.\n", + VERBOSE( Con_Message("Warning: Unknown State %s in %s on line #%i, will be ignored.", otherStateId, source ? source->fileName : "?", source ? source->lineNumber : 0) ) // We'll read into a dummy definition. @@ -1167,7 +1167,7 @@ static int DED_ReadData(ded_t* ded, const char* buffer, const char* _sourceFile) { VERBOSE( AutoStr* path = Uri_ToString(otherMat); - Con_Message("Warning: Unknown Material %s in %s on line #%i, will be ignored.\n", + Con_Message("Warning: Unknown Material %s in %s on line #%i, will be ignored.", Str_Text(path), source ? source->fileName : "?", source ? source->lineNumber : 0); ) diff --git a/doomsday/client/src/edit_bias.cpp b/doomsday/client/src/edit_bias.cpp index 55d6ecd7a1..279bffb125 100644 --- a/doomsday/client/src/edit_bias.cpp +++ b/doomsday/client/src/edit_bias.cpp @@ -370,7 +370,7 @@ static boolean SBE_Save(const char* name) file = fopen(Str_Text(&fileName), "wt"); if(!file) { - Con_Message("Warning: Failed opening \"%s\" for write. Bias Lights not saved.\n", F_PrettyPath(Str_Text(&fileName))); + Con_Message("Warning: Failed opening \"%s\" for write. Bias Lights not saved.", F_PrettyPath(Str_Text(&fileName))); Str_Free(&fileName); return false; } diff --git a/doomsday/client/src/edit_map.cpp b/doomsday/client/src/edit_map.cpp index 98af3794d9..c3ac0b41da 100644 --- a/doomsday/client/src/edit_map.cpp +++ b/doomsday/client/src/edit_map.cpp @@ -310,7 +310,7 @@ static void pruneLinedefs(EditMap* map) if(newNum < map->numLineDefs) { if(unused > 0) - Con_Message(" Pruned %d unused linedefs\n", unused); + Con_Message(" Pruned %d unused linedefs.", unused); map->numLineDefs = newNum; } @@ -346,10 +346,10 @@ static void pruneVertices(EditMap* map) int dupNum = map->vertexCount() - newNum - unused; if(unused > 0) - Con_Message(" Pruned %d unused vertices.\n", unused); + Con_Message(" Pruned %d unused vertices.", unused); if(dupNum > 0) - Con_Message(" Pruned %d duplicate vertices\n", dupNum); + Con_Message(" Pruned %d duplicate vertices.", dupNum); map->vertexCount() = newNum; } @@ -380,10 +380,10 @@ static void pruneUnusedSidedefs(EditMap* map) int dupNum = map->numSideDefs - newNum - unused; if(unused > 0) - Con_Message(" Pruned %d unused sidedefs\n", unused); + Con_Message(" Pruned %d unused sidedefs.", unused); if(dupNum > 0) - Con_Message(" Pruned %d duplicate sidedefs\n", dupNum); + Con_Message(" Pruned %d duplicate sidedefs.", dupNum); map->numSideDefs = newNum; } @@ -418,7 +418,7 @@ static void pruneUnusedSectors(EditMap* map) if(newNum < map->sectorCount()) { - Con_Message(" Pruned %d unused sectors\n", map->sectorCount() - newNum); + Con_Message(" Pruned %d unused sectors.", map->sectorCount() - newNum); map->sectorCount() = newNum; } } @@ -510,7 +510,7 @@ static void hardenSectorBspLeafList(GameMap* map, uint secIDX) static void buildSectorBspLeafLists(GameMap* map) { uint i; - VERBOSE( Con_Message(" Build BSP leaf tables...\n") ) + VERBOSE( Con_Message(" Build BSP leaf tables...") ) for(i = 0; i < map->sectorCount(); ++i) { @@ -1016,14 +1016,14 @@ static void hardenVertexOwnerRings(GameMap* dest, EditMap* src) uint idx; if(verbose >= 2) - Con_Message("Vertex #%i: line owners #%i\n", i, v->numLineOwners); + Con_Message("Vertex #%i: line owners #%i", i, v->numLineOwners); p = base = v->lineOwners; idx = 0; do { if(verbose >= 2) - Con_Message(" %i: p= #%05i this= #%05i n= #%05i, dANG= %-3.f\n", + Con_Message(" %i: p= #%05i this= #%05i n= #%05i, dANG= %-3.f", idx, p->LO_prev->line - map->lineDefs, p->line - map->lineDefs, p->LO_next->line - map->lineDefs, BANG2DEG(p->angle)); @@ -1294,7 +1294,7 @@ void MPE_DetectOverlappingLines(GameMap* map) if(numOverlaps == 0) return; - VERBOSE( Con_Message("Detected %lu overlapped linedefs\n", (unsigned long) numOverlaps) ) + VERBOSE( Con_Message("Detected %lu overlapping linedefs.", (unsigned long) numOverlaps) ) } #endif @@ -1745,7 +1745,7 @@ static int printMissingMaterialWorker(StringPool::Id internId, void* parameters) int const refCount = materialDict->userValue(internId); String const& materialUri = materialDict->string(internId); QByteArray materialUriUtf8 = materialUri.toUtf8(); - Con_Message(" %4u x \"%s\"\n", refCount, materialUriUtf8.constData()); + Con_Message(" %4u x \"%s\"", refCount, materialUriUtf8.constData()); } } } @@ -1764,7 +1764,7 @@ static void printMissingMaterials(void) materialDict->iterate(printMissingMaterialWorker, &numMissing); if(!numMissing) return; - Con_Message(" [110] Warning: Found %u unknown %s:\n", numMissing, numMissing == 1? "material":"materials"); + Con_Message(" [110] Warning: Found %u unknown %s:", numMissing, numMissing == 1? "material":"materials"); // List the missing materials. materialDict->iterate(printMissingMaterialWorker, 0); } @@ -2032,14 +2032,14 @@ boolean MPE_GameObjProperty(const char* entityName, uint elementIndex, entityDef = P_MapEntityDefByName(entityName); if(!entityDef) { - Con_Message("Warning: MPE_GameObjProperty: Unknown entity name:\"%s\", ignoring.\n", entityName); + Con_Message("Warning: MPE_GameObjProperty: Unknown entity name:\"%s\", ignoring.", entityName); return false; } // Is this a known property? if(MapEntityDef_PropertyByName2(entityDef, propertyName, &propertyDef) < 0) { - Con_Message("Warning: MPE_GameObjProperty: Entity \"%s\" has no \"%s\" property, ignoring.\n", entityName, propertyName); + Con_Message("Warning: MPE_GameObjProperty: Entity \"%s\" has no \"%s\" property, ignoring.", entityName, propertyName); return false; } diff --git a/doomsday/client/src/filesys/fs_main.cpp b/doomsday/client/src/filesys/fs_main.cpp index fa7b914403..b7b096aa18 100644 --- a/doomsday/client/src/filesys/fs_main.cpp +++ b/doomsday/client/src/filesys/fs_main.cpp @@ -1101,7 +1101,7 @@ void FS1::clearPathMappings() void FS1::printDirectory(Path path) { QByteArray pathUtf8 = NativePath(path).pretty().toUtf8(); - Con_Message("Directory: %s\n", pathUtf8.constData()); + Con_Message("Directory: %s", pathUtf8.constData()); // We are interested in *everything*. path = path / "*"; @@ -1114,7 +1114,7 @@ void FS1::printDirectory(Path path) DENG2_FOR_EACH_CONST(PathList, i, found) { QByteArray foundPath = NativePath(i->path).pretty().toUtf8(); - Con_Message(" %s\n", foundPath.constData()); + Con_Message(" %s", foundPath.constData()); } } } diff --git a/doomsday/client/src/filesys/fs_util.cpp b/doomsday/client/src/filesys/fs_util.cpp index a21917f42e..e22e41dc6e 100644 --- a/doomsday/client/src/filesys/fs_util.cpp +++ b/doomsday/client/src/filesys/fs_util.cpp @@ -674,7 +674,7 @@ boolean F_Dump(void const* data, size_t size, char const* path) FILE* outFile = fopen(Str_Text(nativePath), "wb"); if(!outFile) { - Con_Message("Warning: Failed to open \"%s\" for writing (error: %s), aborting.\n", + Con_Message("Warning: Failed to open \"%s\" for writing (error: %s), aborting.", F_PrettyPath(Str_Text(nativePath)), strerror(errno)); return false; } diff --git a/doomsday/client/src/games.cpp b/doomsday/client/src/games.cpp index 0f823d5fa8..9c98bce34d 100644 --- a/doomsday/client/src/games.cpp +++ b/doomsday/client/src/games.cpp @@ -210,7 +210,7 @@ static int locateAllResourcesWorker(void *parameters) int n = 0; foreach(Game *game, games->all()) { - Con_Message("Locating \"%s\"...\n", Str_Text(game->title())); + Con_Message("Locating \"%s\"...", Str_Text(game->title())); games->locateStartupResources(*game); Con_SetProgress((n + 1) * 200 / games->count() - 1); diff --git a/doomsday/client/src/gl/gl_defer.cpp b/doomsday/client/src/gl/gl_defer.cpp index 67367857f1..5e653fd137 100644 --- a/doomsday/client/src/gl/gl_defer.cpp +++ b/doomsday/client/src/gl/gl_defer.cpp @@ -361,7 +361,7 @@ DGLuint GL_GetReservedTextureName(void) while(reservedCount == 0) { // Wait for someone to refill the names buffer. - Con_Message("GL_GetReservedTextureName: Sleeping until new names available.\n"); + Con_Message("GL_GetReservedTextureName: Sleeping until new names available."); Sys_Sleep(5); } Sys_Lock(deferredMutex); diff --git a/doomsday/client/src/gl/gl_draw.cpp b/doomsday/client/src/gl/gl_draw.cpp index fe04b4ab8e..5e9b82120f 100644 --- a/doomsday/client/src/gl/gl_draw.cpp +++ b/doomsday/client/src/gl/gl_draw.cpp @@ -396,7 +396,7 @@ DENG_EXTERN_C void GL_BeginBorderedProjection(dgl_borderedprojectionstate_t* bp) if(!bp) { #if _DEBUG - Con_Message("Warning: GL_BeginBorderedProjection: Invalid 'bp' argument, ignoring.\n"); + Con_Message("Warning: GL_BeginBorderedProjection: Invalid 'bp' argument, ignoring."); #endif return; } @@ -461,7 +461,7 @@ DENG_EXTERN_C void GL_EndBorderedProjection(dgl_borderedprojectionstate_t* bp) if(!bp) { #if _DEBUG - Con_Message("Warning: GL_EndBorderedProjection: Invalid 'bp' argument, ignoring.\n"); + Con_Message("Warning: GL_EndBorderedProjection: Invalid 'bp' argument, ignoring."); #endif return; } diff --git a/doomsday/client/src/gl/gl_drawvectorgraphic.cpp b/doomsday/client/src/gl/gl_drawvectorgraphic.cpp index 567cee4ed5..5b19ec9ba0 100644 --- a/doomsday/client/src/gl/gl_drawvectorgraphic.cpp +++ b/doomsday/client/src/gl/gl_drawvectorgraphic.cpp @@ -155,7 +155,7 @@ DENG_EXTERN_C void GL_DrawSvg3(svgid_t id, const Point2Rawf* origin, float scale { #if _DEBUG if(id != 0) - Con_Message("GL_DrawSvg: Invalid origin argument (=NULL), aborting draw.\n"); + Con_Message("GL_DrawSvg: Invalid origin argument (=NULL), aborting draw."); #endif return; } @@ -163,14 +163,14 @@ DENG_EXTERN_C void GL_DrawSvg3(svgid_t id, const Point2Rawf* origin, float scale { #if _DEBUG if(id != 0) - Con_Message("GL_DrawSvg: Unknown SVG id #%u, aborting draw.\n", (unsigned int)id); + Con_Message("GL_DrawSvg: Unknown SVG id #%u, aborting draw.", (unsigned int)id); #endif return; } if(!Svg_Prepare(svg)) { #if _DEBUG - Con_Message("GL_DrawSvg: Failed preparing SVG #%u, aborting draw.\n", (unsigned int)id); + Con_Message("GL_DrawSvg: Failed preparing SVG #%u, aborting draw.", (unsigned int)id); #endif return; } diff --git a/doomsday/client/src/gl/gl_main.cpp b/doomsday/client/src/gl/gl_main.cpp index 39bbc1e0d2..e7aa0051ed 100644 --- a/doomsday/client/src/gl/gl_main.cpp +++ b/doomsday/client/src/gl/gl_main.cpp @@ -285,7 +285,7 @@ static void printConfiguration() Con_Printf(" Texture Compression: %s\n", enabled[GL_state.features.texCompression? 1:0]); Con_Printf(" Texture NPOT: %s\n", enabled[GL_state.features.texNonPowTwo? 1:0]); if(GL_state.forceFinishBeforeSwap) - Con_Message(" glFinish() forced before swapping buffers.\n"); + Con_Message(" glFinish() forced before swapping buffers."); } boolean GL_EarlyInit() @@ -293,7 +293,7 @@ boolean GL_EarlyInit() if(novideo) return true; if(initGLOk) return true; // Already initialized. - Con_Message("Initializing Render subsystem...\n"); + Con_Message("Initializing Render subsystem..."); gamma_support = !CommandLine_Check("-noramp"); @@ -310,7 +310,7 @@ boolean GL_EarlyInit() // Check the maximum texture size. if(GL_state.maxTexSize == 256) { - Con_Message("Using restricted texture w/h ratio (1:8).\n"); + Con_Message("Using restricted texture w/h ratio (1:8)."); ratioLimit = 8; } // Set a custom maximum size? @@ -321,12 +321,12 @@ boolean GL_EarlyInit() if(GL_state.maxTexSize < customSize) customSize = GL_state.maxTexSize; GL_state.maxTexSize = customSize; - Con_Message("Using maximum texture size of %i x %i.\n", GL_state.maxTexSize, GL_state.maxTexSize); + Con_Message("Using maximum texture size of %i x %i.", GL_state.maxTexSize, GL_state.maxTexSize); } if(CommandLine_Check("-outlines")) { fillOutlines = false; - Con_Message("Textures have outlines.\n"); + Con_Message("Textures have outlines."); } renderTextures = !CommandLine_Exists("-notex"); @@ -1198,7 +1198,7 @@ D_CMD(ToggleFullscreen) D_CMD(SetBPP) { - DENG_UNUSED(src); DENG_UNUSED(argc); + DENG2_UNUSED2(src, argc); int attribs[] = { DDWA_COLOR_DEPTH_BITS, atoi(argv[1]), @@ -1209,44 +1209,50 @@ D_CMD(SetBPP) D_CMD(DisplayModeInfo) { - DENG_UNUSED(src); DENG_UNUSED(argc); DENG_UNUSED(argv); + DENG2_UNUSED3(src, argc, argv); Window const *wnd = Window_Main(); DisplayMode const *mode = DisplayMode_Current(); - Con_Message("Current display mode: %i x %i x %i (%i:%i", - mode->width, mode->height, mode->depth, mode->ratioX, mode->ratioY); + QString str = QString("Current display mode:%1 depth:%2 (%3:%4") + .arg(de::Vector2i(mode->width, mode->height).asText()) + .arg(mode->depth) + .arg(mode->ratioX) + .arg(mode->ratioY); if(mode->refreshRate > 0) { - Con_Message(", refresh: %.1f Hz", mode->refreshRate); + str += QString(", refresh: %1 Hz").arg(mode->refreshRate, 0, 'g', 1); } - Con_Message(")\nMain window: (%i,%i) %ix%i fullscreen:%s centered:%s maximized:%s\n", - Window_X(wnd), Window_Y(wnd), Window_Width(wnd), Window_Height(wnd), - Window_IsFullscreen(wnd)? "yes" : "no", - Window_IsCentered(wnd)? "yes" : "no", - Window_IsMaximized(wnd)? "yes" : "no"); - Con_Message("Normal geometry: (%i,%i) %ix%i\n", - Window_NormalX(wnd), Window_NormalY(wnd), - Window_NormalWidth(wnd), Window_NormalHeight(wnd)); + str += QString(")\nMain window origin:%1 dimensions:%2 fullscreen:%3 centered:%4 maximized:%5") + .arg(de::Vector2i(Window_X(wnd), Window_Y(wnd)).asText()) + .arg(de::Vector2i(Window_Width(wnd), Window_Height(wnd)).asText()) + .arg(Window_IsFullscreen(wnd)? "yes" : "no") + .arg(Window_IsCentered(wnd) ? "yes" : "no") + .arg(Window_IsMaximized(wnd) ? "yes" : "no"); + str += QString("\nNormal geometry:%1 %2") + .arg(de::Vector2i(Window_NormalX(wnd), Window_NormalY(wnd)).asText()) + .arg(de::Vector2i(Window_NormalWidth(wnd), Window_NormalHeight(wnd)).asText()); + + Con_Message(str.toUtf8().constData()); return true; } D_CMD(ListDisplayModes) { - DENG_UNUSED(src); DENG_UNUSED(argc); DENG_UNUSED(argv); + DENG2_UNUSED3(src, argc, argv); - Con_Message("There are %i display modes available:\n", DisplayMode_Count()); + Con_Message("There are %i display modes available:", DisplayMode_Count()); for(int i = 0; i < DisplayMode_Count(); ++i) { DisplayMode const *mode = DisplayMode_ByIndex(i); if(mode->refreshRate > 0) { - Con_Message(" %i x %i x %i (%i:%i, refresh: %.1f Hz)\n", mode->width, mode->height, + Con_Message(" %i x %i x %i (%i:%i, refresh: %.1f Hz)", mode->width, mode->height, mode->depth, mode->ratioX, mode->ratioY, mode->refreshRate); } else { - Con_Message(" %i x %i x %i (%i:%i)\n", mode->width, mode->height, + Con_Message(" %i x %i x %i (%i:%i)", mode->width, mode->height, mode->depth, mode->ratioX, mode->ratioY); } } @@ -1255,10 +1261,10 @@ D_CMD(ListDisplayModes) D_CMD(UpdateGammaRamp) { - DENG_UNUSED(src); DENG_UNUSED(argc); DENG_UNUSED(argv); + DENG2_UNUSED3(src, argc, argv); GL_SetGamma(); - Con_Printf("Gamma ramp set.\n"); + Con_Message("Gamma ramp set."); return true; } diff --git a/doomsday/client/src/gl/gl_texmanager.cpp b/doomsday/client/src/gl/gl_texmanager.cpp index ae1306586c..e9c8ff88f7 100644 --- a/doomsday/client/src/gl/gl_texmanager.cpp +++ b/doomsday/client/src/gl/gl_texmanager.cpp @@ -3213,7 +3213,7 @@ D_CMD(MipMap) int newMipMode = String(argv[1]).toInt(); if(newMipMode < 0 || newMipMode > 5) { - Con_Message("Invalid mipmapping mode %i specified. Valid range is [0..5).\n", newMipMode); + Con_Message("Invalid mipmapping mode %i specified. Valid range is [0..5).", newMipMode); return false; } diff --git a/doomsday/client/src/gl/sys_opengl.cpp b/doomsday/client/src/gl/sys_opengl.cpp index 4240e59ddf..f6b619944f 100644 --- a/doomsday/client/src/gl/sys_opengl.cpp +++ b/doomsday/client/src/gl/sys_opengl.cpp @@ -18,8 +18,6 @@ * http://www.gnu.org/licenses */ -// HEADER FILES ------------------------------------------------------------ - #include "de_platform.h" #include "de_base.h" #include "de_console.h" @@ -29,8 +27,7 @@ #include "gl/sys_opengl.h" #include - -// MACROS ------------------------------------------------------------------ +#include #ifdef WIN32 # define GETPROC(Type, x) x = de::function_cast(wglGetProcAddress(#x)) @@ -38,14 +35,6 @@ # define GETPROC(Type, x) x = SDL_GL_GetProcAddress(#x) #endif -// TYPES ------------------------------------------------------------------- - -// FUNCTION PROTOTYPES ----------------------------------------------------- - -// EXTERNAL DATA DECLARATIONS ---------------------------------------------- - -// PUBLIC DATA DEFINITIONS ------------------------------------------------- - gl_state_t GL_state; #ifdef WIN32 @@ -63,8 +52,6 @@ PFNGLLOCKARRAYSEXTPROC glLockArraysEXT = NULL; PFNGLUNLOCKARRAYSEXTPROC glUnlockArraysEXT = NULL; #endif -// PRIVATE DATA DEFINITIONS ------------------------------------------------ - static boolean doneEarlyInit = false; static boolean inited = false; static boolean firstTimeInit = true; @@ -73,8 +60,6 @@ static boolean firstTimeInit = true; static PROC wglGetExtString; #endif -// CODE -------------------------------------------------------------------- - static int query(const char* ext) { int result = 0; @@ -197,40 +182,40 @@ static void printGLUInfo(void) LIBDENG_ASSERT_IN_MAIN_THREAD(); LIBDENG_ASSERT_GL_CONTEXT_ACTIVE(); - Con_Message("OpenGL information:\n"); - Con_Message(" Vendor: %s\n", glGetString(GL_VENDOR)); - Con_Message(" Renderer: %s\n", glGetString(GL_RENDERER)); - Con_Message(" Version: %s\n", glGetString(GL_VERSION)); + Con_Message("OpenGL information:"); + Con_Message(" Vendor: %s", glGetString(GL_VENDOR)); + Con_Message(" Renderer: %s", glGetString(GL_RENDERER)); + Con_Message(" Version: %s", glGetString(GL_VERSION)); #ifdef USE_TEXTURE_COMPRESSION_S3 if(GL_state.extensions.texCompressionS3) { glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &iVal); - Con_Message(" Available Compressed Texture Formats: %i\n", iVal); + Con_Message(" Available Compressed Texture Formats: %i", iVal); } #endif glGetIntegerv(GL_MAX_TEXTURE_UNITS, &iVal); - Con_Message(" Available Texture Units: %i\n", iVal); + Con_Message(" Available Texture Units: %i", iVal); if(GL_state.extensions.texFilterAniso) { glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &iVal); - Con_Message(" Maximum Texture Anisotropy: %i\n", iVal); + Con_Message(" Maximum Texture Anisotropy: %i", iVal); } else { - Con_Message(" Variable Texture Anisotropy Unavailable.\n"); + Con_Message(" Variable Texture Anisotropy Unavailable."); } glGetIntegerv(GL_MAX_TEXTURE_SIZE, &iVal); - Con_Message(" Maximum Texture Size: %i\n", iVal); + Con_Message(" Maximum Texture Size: %i", iVal); glGetFloatv(GL_LINE_WIDTH_GRANULARITY, fVals); - Con_Message(" Line Width Granularity: %3.1f\n", fVals[0]); + Con_Message(" Line Width Granularity: %3.1f", fVals[0]); glGetFloatv(GL_LINE_WIDTH_RANGE, fVals); - Con_Message(" Line Width Range: %3.1f...%3.1f\n", fVals[0], fVals[1]); + Con_Message(" Line Width Range: %3.1f...%3.1f", fVals[0], fVals[1]); Sys_GLPrintExtensions(); } @@ -471,8 +456,8 @@ boolean Sys_GLInitialize(void) double version = (versionStr? strtod((const char*) versionStr, NULL) : 0); if(version == 0) { - Con_Message("Sys_GLInitialize: Failed to determine OpenGL version.\n"); - Con_Message(" OpenGL version: %s\n", glGetString(GL_VERSION)); + Con_Message("Sys_GLInitialize: Failed to determine OpenGL version."); + Con_Message(" OpenGL version: %s", glGetString(GL_VERSION)); } else if(version < 1.4) { @@ -486,8 +471,8 @@ boolean Sys_GLInitialize(void) } else { - Con_Message("Warning: Sys_GLInitialize: OpenGL implementation may be too old (1.4+ required).\n"); - Con_Message(" OpenGL version: %s\n", glGetString(GL_VERSION)); + Con_Message("Warning: Sys_GLInitialize: OpenGL implementation may be too old (1.4+ required)."); + Con_Message(" OpenGL version: %s", glGetString(GL_VERSION)); } } @@ -643,53 +628,41 @@ boolean Sys_GLQueryExtension(const char* name, const GLubyte* extensions) return false; } -static void printExtensions(const GLubyte* extensions) +static void printExtensions(QStringList extensions) { - char* token, *extbuf; - size_t len; - - if(!extensions || !extensions[0]) - return; - len = strlen((const char*) extensions); + QString const indent(4, ' '); - if(0 == (extbuf = (char *) M_Malloc(len+1))) - Con_Error("printExtensions: Failed on allocation of %lu bytes for print buffer.", - (unsigned long) (len+1)); - - strcpy(extbuf, (const char*) extensions); - token = strtok(extbuf, " "); - while(token) + while(!extensions.isEmpty()) { - Con_Message(" "); // Indent. + QString str = indent; if(verbose) { // Show full names. - Con_Message("%s\n", token); + str += extensions.takeFirst(); } else { - // Two on one line, clamp to 30 characters. - Con_Message("%-30.30s", token); - token = strtok(NULL, " "); - if(token) - Con_Message(" %-30.30s", token); - Con_Message("\n"); + // Two on one line, clamp to 30 characters max. + str += extensions.takeFirst().leftJustified(30, ' ', true /*truncate*/); + if(!extensions.isEmpty()) + str += " " + extensions.takeFirst().leftJustified(30, ' ', true /*truncate*/); } - token = strtok(NULL, " "); + + Con_Message(str.toUtf8().constData()); } - free(extbuf); } void Sys_GLPrintExtensions(void) { - Con_Message(" Extensions:\n"); - printExtensions(glGetString(GL_EXTENSIONS)); + Con_Message(" Extensions:"); + printExtensions(QString((char const *) glGetString(GL_EXTENSIONS)).split(" ", QString::SkipEmptyParts)); + #if WIN32 // List the WGL extensions too. if(wglGetExtString) { - Con_Message(" Extensions (WGL):\n"); - printExtensions(((const GLubyte*(__stdcall*)(HDC))wglGetExtString)(wglGetCurrentDC())); + Con_Message(" Extensions (WGL):"); + printExtensions(QString((char const *) ((GLubyte const *(__stdcall *)(HDC))wglGetExtString)(wglGetCurrentDC())).split(" ", QString::SkipEmptyParts)); } #endif } @@ -701,7 +674,7 @@ boolean Sys_GLCheckError(void) { GLenum error = glGetError(); if(error != GL_NO_ERROR) - Con_Message("OpenGL error: 0x%x\n", error); + Con_Message("OpenGL error: 0x%x", error); } #endif return false; diff --git a/doomsday/client/src/m_misc.cpp b/doomsday/client/src/m_misc.cpp index 42be891d36..996d7c80d2 100644 --- a/doomsday/client/src/m_misc.cpp +++ b/doomsday/client/src/m_misc.cpp @@ -331,7 +331,7 @@ static size_t FileReader(const char* name, char** buffer) if(handle == -1) { #if _DEBUG - Con_Message("Warning:FileReader: Failed opening \"%s\" for reading.\n", name); + Con_Message("Warning:FileReader: Failed opening \"%s\" for reading.", name); #endif return length; } diff --git a/doomsday/client/src/map/blockmap.cpp b/doomsday/client/src/map/blockmap.cpp index d09b837649..8da341d46d 100644 --- a/doomsday/client/src/map/blockmap.cpp +++ b/doomsday/client/src/map/blockmap.cpp @@ -68,7 +68,7 @@ Blockmap* Blockmap_New(coord_t const min[2], coord_t const max[2], uint cellWidt height = (uint)ceil((max[1] - min[1]) / (coord_t)cellHeight); bm->gridmap = Gridmap_New(width, height, sizeof(BlockmapCellData), PU_MAPSTATIC); - VERBOSE( Con_Message("Blockmap::New: Width:%u Height:%u\n", width, height) ) + VERBOSE( Con_Message("Blockmap::New: Width:%u Height:%u", width, height) ) return bm; } diff --git a/doomsday/client/src/map/dam_file.cpp b/doomsday/client/src/map/dam_file.cpp index 83b8c4cbd0..6a59989060 100644 --- a/doomsday/client/src/map/dam_file.cpp +++ b/doomsday/client/src/map/dam_file.cpp @@ -1136,7 +1136,7 @@ static boolean doArchiveMap(GameMap* map, const char* path, boolean write) if(!openMapFile(path, write)) return false; // Hmm, invalid path? - Con_Message("DAM_MapRead: %s cached map %s.\n", write? "Saving" : "Loading", path); + Con_Message("DAM_MapRead: %s cached map %s.", write? "Saving" : "Loading", path); /*materialDict = M_Calloc(sizeof(*materialDict)); if(write) diff --git a/doomsday/client/src/map/dam_main.cpp b/doomsday/client/src/map/dam_main.cpp index 455b1d0eaf..b65dccb812 100644 --- a/doomsday/client/src/map/dam_main.cpp +++ b/doomsday/client/src/map/dam_main.cpp @@ -187,7 +187,7 @@ static bool convertMap(GameMap** map, archivedmap_t* dam) VERBOSE( AutoStr* path = Uri_ToString(dam->uri); - Con_Message("convertMap: Attempting conversion of '%s'.\n", Str_Text(path)); + Con_Message("convertMap: Attempting conversion of '%s'.", Str_Text(path)); ); // Any converters available? @@ -208,7 +208,7 @@ static bool convertMap(GameMap** map, archivedmap_t* dam) } if(!converted || verbose >= 2) - Con_Message("convertMap: %s.\n", (converted? "Successful" : "Failed")); + Con_Message("convertMap: %s.", (converted? "Successful" : "Failed")); return converted; } @@ -363,7 +363,7 @@ boolean DAM_AttemptMapLoad(Uri const* _uri) { uint startTime = Timer_RealMilliseconds(); GameMap_InitSkyFix(map); - VERBOSE2( Con_Message("Initial sky fix done in %.2f seconds.\n", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); + VERBOSE2( Con_Message("Initial sky fix done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); } } } diff --git a/doomsday/client/src/map/gamemap.cpp b/doomsday/client/src/map/gamemap.cpp index e28eb7f5f5..6090cdca13 100644 --- a/doomsday/client/src/map/gamemap.cpp +++ b/doomsday/client/src/map/gamemap.cpp @@ -449,7 +449,7 @@ static void initPolyobj(Polyobj* po) if(bspLeaf->polyObj) { Con_Message("Warning: GameMap::initPolyobj: Multiple polyobjs in a single BSP leaf\n" - " (BSP leaf %lu, sector %lu). Previous polyobj overridden.\n", + " (BSP leaf %lu, sector %lu). Previous polyobj overridden.", (unsigned long)GET_BSPLEAF_IDX(bspLeaf), (unsigned long)GET_SECTOR_IDX(bspLeaf->sector)); } bspLeaf->polyObj = po; @@ -496,7 +496,7 @@ void GameMap_InitNodePiles(GameMap* map) DENG2_ASSERT(map); - VERBOSE( Con_Message("GameMap::InitNodePiles: Initializing...\n") ) + VERBOSE( Con_Message("GameMap::InitNodePiles: Initializing...") ) VERBOSE2( starttime = Timer_RealMilliseconds() ) // Initialize node piles and line rings. @@ -512,7 +512,7 @@ void GameMap_InitNodePiles(GameMap* map) } // How much time did we spend? - VERBOSE2( Con_Message(" Done in %.2f seconds.\n", (Timer_RealMilliseconds() - starttime) / 1000.0f) ) + VERBOSE2( Con_Message(" Done in %.2f seconds.", (Timer_RealMilliseconds() - starttime) / 1000.0f) ) } void GameMap_InitLineDefBlockmap(GameMap* map, const_pvec2d_t min_, const_pvec2d_t max_) diff --git a/doomsday/client/src/map/generators.cpp b/doomsday/client/src/map/generators.cpp index 77aaf5d1f1..d4cd07eb56 100644 --- a/doomsday/client/src/map/generators.cpp +++ b/doomsday/client/src/map/generators.cpp @@ -121,7 +121,7 @@ static listnode_t* Generators_NewLink(Generators* gens) if(gens->linkStoreCursor < gens->linkStoreSize) return &gens->linkStore[gens->linkStoreCursor++]; - VERBOSE( Con_Message("Generators_NewLink: Exhausted store.\n") ); + VERBOSE( Con_Message("Generators_NewLink: Exhausted store.") ); return NULL; } diff --git a/doomsday/client/src/map/p_mobj.cpp b/doomsday/client/src/map/p_mobj.cpp index dc44e9f698..e10c96546e 100644 --- a/doomsday/client/src/map/p_mobj.cpp +++ b/doomsday/client/src/map/p_mobj.cpp @@ -83,7 +83,7 @@ mobj_t* P_MobjCreate(thinkfunc_t function, coord_t const pos[3], angle_t angle, #ifdef _DEBUG if(isClient) { - VERBOSE2( Con_Message("P_MobjCreate: Client creating mobj at [x:%f, y:%f, z:%f]\n", pos[VX], pos[VY], pos[VZ]) ); + VERBOSE2( Con_Message("P_MobjCreate: Client creating mobj at [x:%f, y:%f, z:%f]", pos[VX], pos[VY], pos[VZ]) ); } #endif @@ -136,7 +136,7 @@ DENG_EXTERN_C void P_MobjDestroy(mobj_t* mo) #ifdef _DEBUG if(mo->ddFlags & DDMF_MISSILE) { - VERBOSE2( Con_Message("P_MobjDestroy: Destroying missile %i.\n", mo->thinker.id) ); + VERBOSE2( Con_Message("P_MobjDestroy: Destroying missile %i.", mo->thinker.id) ); } #endif @@ -175,7 +175,7 @@ DENG_EXTERN_C void P_MobjSetState(mobj_t* mobj, int statenum) /* if(mobj->ddFlags & DDMF_MISSILE) { - Con_Message("P_MobjSetState: Missile %i going to state %i.\n", mobj->thinker.id, statenum); + Con_Message("P_MobjSetState: Missile %i going to state %i.", mobj->thinker.id, statenum); } */ #endif diff --git a/doomsday/client/src/map/r_world.cpp b/doomsday/client/src/map/r_world.cpp index a24ac5e7b6..af233fcb44 100644 --- a/doomsday/client/src/map/r_world.cpp +++ b/doomsday/client/src/map/r_world.cpp @@ -1133,7 +1133,7 @@ DENG_EXTERN_C void R_SetupMap(int mode, int flags) float startTime = Timer_Seconds(); Rend_CacheForMap(); App_Materials().processCacheQueue(); - VERBOSE( Con_Message("Precaching took %.2f seconds.\n", Timer_Seconds() - startTime) ) + VERBOSE( Con_Message("Precaching took %.2f seconds.", Timer_Seconds() - startTime) ) #endif S_SetupForChangedMap(); diff --git a/doomsday/client/src/network/monitor.cpp b/doomsday/client/src/network/monitor.cpp index 898ae9c938..11856cdd8a 100644 --- a/doomsday/client/src/network/monitor.cpp +++ b/doomsday/client/src/network/monitor.cpp @@ -57,29 +57,29 @@ static void Monitor_Print(void) if(!monitoredBytes) { - Con_Message("Nothing has been sent yet.\n"); + Con_Message("Nothing has been sent yet."); return; } - Con_Message("%u bytes sent (%i packets).\n", monitoredBytes, monitoredPackets); + Con_Message("%u bytes sent (%i packets).", monitoredBytes, monitoredPackets); for(i = 0, k = 0; i < 256; ++i) { - if(!k) Con_Message(" "); + if(!k) Con_Printf(" "); - Con_Message("%10.10lf", (double)(monitor[i]) / (double)monitoredBytes); + Con_Printf("%10.10lf", (double)(monitor[i]) / (double)monitoredBytes); // Break lines. if(++k == 4) { k = 0; - Con_Message(",\n"); + Con_Printf(",\n"); } else { - Con_Message(", "); + Con_Printf(", "); } } - if(k) Con_Message("\n"); + if(k) Con_Printf("\n"); } D_CMD(NetFreqs) diff --git a/doomsday/client/src/network/net_buf.cpp b/doomsday/client/src/network/net_buf.cpp index 9b7300a56b..b3827241cf 100644 --- a/doomsday/client/src/network/net_buf.cpp +++ b/doomsday/client/src/network/net_buf.cpp @@ -354,7 +354,7 @@ boolean N_GetPacket(void) /*{extern byte monitorMsgQueue; if(monitorMsgQueue) - Con_Message("N_GetPacket: %i messages queued.\n", msgCount); + Con_Message("N_GetPacket: %i messages queued.", msgCount); }*/ if((msg = N_GetNextMessage()) == NULL) @@ -366,7 +366,7 @@ boolean N_GetPacket(void) // There was a packet! /* #if _DEBUG - Con_Message("N_GetPacket: from=%x, len=%i\n", msg->sender, msg->size); + Con_Message("N_GetPacket: from=%x, len=%i", msg->sender, msg->size); #endif */ netBuffer.player = msg->player; @@ -415,12 +415,12 @@ void N_PrintTransmissionStats(void) { if(numOutBytes == 0) { - Con_Message("Transmission efficiency: Nothing has been sent yet.\n"); + Con_Message("Transmission efficiency: Nothing has been sent yet."); } else { Con_Message("Transmission efficiency: %.3f%% (data: %i bytes, sent: %i " - "bytes)\n", 100 - (100.0f * numSentBytes) / numOutBytes, + "bytes)", 100 - (100.0f * numSentBytes) / numOutBytes, (int)numOutBytes, (int)numSentBytes); } } diff --git a/doomsday/client/src/network/net_demo.cpp b/doomsday/client/src/network/net_demo.cpp index ce73a8bf7e..17d8a6ffd1 100644 --- a/doomsday/client/src/network/net_demo.cpp +++ b/doomsday/client/src/network/net_demo.cpp @@ -368,7 +368,7 @@ void Demo_StopPlayback(void) if(!playback) return; - Con_Message("Demo was %.2f seconds (%i tics) long.\n", + Con_Message("Demo was %.2f seconds (%i tics) long.", (DEMOTIC - demoStartTic) / (float) TICSPERSEC, DEMOTIC - demoStartTic); @@ -385,9 +385,8 @@ void Demo_StopPlayback(void) if(!diff) diff = 1; // Print summary and exit. - Con_Message("Timedemo results: "); - Con_Message("%i game tics in %.1f seconds\n", r_framecounter, diff); - Con_Message("%f FPS\n", r_framecounter / diff); + Con_Message("Timedemo results: %i game tics in %.1f seconds", r_framecounter, diff); + Con_Message("%f FPS", r_framecounter / diff); Sys_Quit(); } */ diff --git a/doomsday/client/src/network/net_event.cpp b/doomsday/client/src/network/net_event.cpp index 3afbd482fa..ab8f11bebb 100644 --- a/doomsday/client/src/network/net_event.cpp +++ b/doomsday/client/src/network/net_event.cpp @@ -263,7 +263,7 @@ void N_Update(void) { // We're still in a netGame, which means we didn't disconnect // voluntarily. - Con_Message("N_Update: Connection was terminated.\n"); + Con_Message("N_Update: Connection was terminated."); N_Disconnect(); } break;*/ @@ -286,7 +286,7 @@ void N_TerminateClient(int console) if(!clients[console].connected) return; - Con_Message("N_TerminateClient: '%s' from console %i.\n", + Con_Message("N_TerminateClient: '%s' from console %i.", clients[console].name, console); App_ServerSystem().terminateNode(clients[console].nodeID); diff --git a/doomsday/client/src/network/net_main.cpp b/doomsday/client/src/network/net_main.cpp index 296a43e903..e247dd6d49 100644 --- a/doomsday/client/src/network/net_main.cpp +++ b/doomsday/client/src/network/net_main.cpp @@ -338,7 +338,7 @@ void Net_SendPlayerInfo(int srcPlrNum, int destPlrNum) nameLen = strlen(clients[srcPlrNum].name); #ifdef _DEBUG - Con_Message("Net_SendPlayerInfo: src=%i dest=%i name=%s\n", + Con_Message("Net_SendPlayerInfo: src=%i dest=%i name=%s", srcPlrNum, destPlrNum, clients[srcPlrNum].name); #endif @@ -462,7 +462,7 @@ static void Net_DoUpdate(void) #ifdef _DEBUG if(netGame && verbose >= 2) { - Con_Message("Net_DoUpdate: coordTimer=%i cl:%i shmo:%p\n", coordTimer, + Con_Message("Net_DoUpdate: coordTimer=%i cl:%i shmo:%p", coordTimer, isClient, ddPlayers[consolePlayer].shared.mo); } #endif @@ -592,7 +592,7 @@ void Net_StopGame(void) #ifdef __CLIENT__ # ifdef _DEBUG - Con_Message("Net_StopGame: Sending PCL_GOODBYE.\n"); + Con_Message("Net_StopGame: Sending PCL_GOODBYE."); # endif // We are a connected client. Msg_Begin(PCL_GOODBYE); @@ -642,7 +642,7 @@ void Net_StopGame(void) } #ifdef _DEBUG - Con_Message("Net_StopGame: Reseting console & view player to zero.\n"); + Con_Message("Net_StopGame: Reseting console & view player to zero."); #endif consolePlayer = displayPlayer = 0; ddPlayers[0].shared.inGame = true; @@ -791,7 +791,7 @@ void Net_Ticker(timespan_t time) if(Sv_IsFrameTarget(i)) { Con_Message("%i(rdy%i): avg=%05ims thres=%05ims " - "bwr=%05i maxfs=%05lub unakd=%05i\n", i, + "bwr=%05i maxfs=%05lub unakd=%05i", i, clients[i].ready, 0, 0, clients[i].bandwidthRating, /*clients[i].bwrAdjustTime,*/ @@ -799,7 +799,7 @@ void Net_Ticker(timespan_t time) Sv_CountUnackedDeltas(i)); } /*if(ddPlayers[i].inGame) - Con_Message("%i: cmds=%i\n", i, clients[i].numTics);*/ + Con_Message("%i: cmds=%i", i, clients[i].numTics);*/ } } } @@ -1129,7 +1129,7 @@ void Net_FinishConnection(int nodeId, const byte* data, int size) { serverinfo_t info; - Con_Message("Net_FinishConnection: Got reply with %i bytes.\n", size); + Con_Message("Net_FinishConnection: Got reply with %i bytes.", size); // Parse the response for server info. N_ClientHandleResponseToInfoQuery(nodeId, data, size); @@ -1143,14 +1143,14 @@ void Net_FinishConnection(int nodeId, const byte* data, int size) } else { - Con_Message("Net_FinishConnection: Failed to retrieve server info.\n"); + Con_Message("Net_FinishConnection: Failed to retrieve server info."); } } #endif int Net_StartConnection(const char* address, int port) { - Con_Message("Net_StartConnection: Connecting to %s...\n", address); + Con_Message("Net_StartConnection: Connecting to %s...", address); // Start searching at the specified location. Net_ServerLink().connectDomain(de::String(address) + ":" + port, 7 /*timeout*/); @@ -1251,32 +1251,32 @@ D_CMD(Net) else if(!stricmp(argv[1], "info")) { N_PrintNetworkStatus(); - Con_Message("Network game: %s\n", netGame ? "yes" : "no"); - Con_Message("This is console %i (local player %i).\n", consolePlayer, P_ConsoleToLocal(consolePlayer)); + Con_Message("Network game: %s", netGame ? "yes" : "no"); + Con_Message("This is console %i (local player %i).", consolePlayer, P_ConsoleToLocal(consolePlayer)); } #ifdef __CLIENT__ else if(!stricmp(argv[1], "disconnect")) { if(!netGame) { - Con_Printf("This client is not connected to a server.\n"); + Con_Message("This client is not connected to a server."); return false; } if(!isClient) { - Con_Printf("This is not a client.\n"); + Con_Message("This is not a client."); return false; } Net_ServerLink().disconnect(); - Con_Message("Disconnected.\n"); + Con_Message("Disconnected."); } #endif else { - Con_Printf("Bad arguments.\n"); + Con_Message("Bad arguments."); return false; // Bad args. } } @@ -1290,7 +1290,7 @@ D_CMD(Net) { if(netGame) { - Con_Printf("Already in a netGame.\n"); + Con_Message("Already in a netGame."); return false; } @@ -1298,26 +1298,26 @@ D_CMD(Net) if(success) { - Con_Message("Server \"%s\" started.\n", serverName); + Con_Message("Server \"%s\" started.", serverName); } } else if(!stricmp(argv[2], "close") || !stricmp(argv[2], "stop")) { if(!isServer) { - Con_Printf("This is not a server!\n"); + Con_Message("This is not a server!"); return false; } // Close the server and kick everybody out. if((success = N_ServerClose()) != false) { - Con_Message("Server \"%s\" closed.\n", serverName); + Con_Message("Server \"%s\" closed.", serverName); } } else { - Con_Printf("Bad arguments.\n"); + Con_Message("Bad arguments."); return false; } } @@ -1331,7 +1331,7 @@ D_CMD(Net) { if(netGame) { - Con_Printf("Already connected.\n"); + Con_Message("Already connected."); return false; } diff --git a/doomsday/client/src/network/sys_network.cpp b/doomsday/client/src/network/sys_network.cpp index 92d2c97400..3ffe6fa67e 100644 --- a/doomsday/client/src/network/sys_network.cpp +++ b/doomsday/client/src/network/sys_network.cpp @@ -122,12 +122,12 @@ void N_PrintNetworkStatus(void) { if(isClient) { - Con_Message("CLIENT: Connected to server at %s.\n", + Con_Message("CLIENT: Connected to server at %s.", svLink->address().asText().toAscii().constData()); } else { - Con_Message("OFFLINE: Single-player mode.\n"); + Con_Message("OFFLINE: Single-player mode."); } N_PrintBufferInfo(); diff --git a/doomsday/client/src/network/ui_mpi.cpp b/doomsday/client/src/network/ui_mpi.cpp index 5af5068683..d0c58ed25b 100644 --- a/doomsday/client/src/network/ui_mpi.cpp +++ b/doomsday/client/src/network/ui_mpi.cpp @@ -501,10 +501,10 @@ void MPIUpdateServerList(void) stricmp(info.gameIdentityKey, Str_Text(App_CurrentGame().identityKey())) || !info.canJoin) { - Con_Message("Server %s filtered out:\n", info.name); - Con_Message(" remote = %i, local = %i\n", info.version, DOOMSDAY_VERSION); - Con_Message(" remote = %s, local = %s\n", info.gameIdentityKey, Str_Text(App_CurrentGame().identityKey())); - Con_Message(" can join = %i\n", info.canJoin); + Con_Message("Server %s filtered out:", info.name); + Con_Message(" remote = %i, local = %i", info.version, DOOMSDAY_VERSION); + Con_Message(" remote = %s, local = %s", info.gameIdentityKey, Str_Text(App_CurrentGame().identityKey())); + Con_Message(" can join = %i", info.canJoin); continue; } @@ -638,7 +638,7 @@ void DD_NetSetup(int serverMode) { if(!App_GameLoaded()) { - Con_Message("%s setup can only be activated when a game is loaded.\n", serverMode? "Server" : "Client"); + Con_Message("%s setup can only be activated when a game is loaded.", serverMode? "Server" : "Client"); return; } diff --git a/doomsday/client/src/render/r_fakeradio.cpp b/doomsday/client/src/render/r_fakeradio.cpp index 6baa26efb0..2970e8d7c3 100644 --- a/doomsday/client/src/render/r_fakeradio.cpp +++ b/doomsday/client/src/render/r_fakeradio.cpp @@ -267,5 +267,5 @@ void Rend_RadioInitForMap(void) } } - VERBOSE2( Con_Message("R_InitFakeRadioForMap: Done in %.2f seconds.\n", (Timer_RealMilliseconds() - startTime) / 1000.0f) ) + VERBOSE2( Con_Message("R_InitFakeRadioForMap: Done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f) ) } diff --git a/doomsday/client/src/render/r_lgrid.cpp b/doomsday/client/src/render/r_lgrid.cpp index 6aae344cf1..cc7dc21e8b 100644 --- a/doomsday/client/src/render/r_lgrid.cpp +++ b/doomsday/client/src/render/r_lgrid.cpp @@ -275,7 +275,7 @@ void LG_InitForMap(void) /* #if _DEBUG for(n = 0; n < numSamples; ++n) - Con_Message(" %i of %i %i(%f %f)\n", + Con_Message(" %i of %i %i(%f %f)", n, numSamples, (n == center)? 1 : 0, samplePoints[n].pos[VX], samplePoints[n].pos[VY]); #endif @@ -375,7 +375,7 @@ void LG_InitForMap(void) grid = (gridblock_t* ) Z_Calloc(sizeof(gridblock_t) * lgBlockWidth * lgBlockHeight, PU_MAPSTATIC, NULL); - Con_Message("LG_InitForMap: %i x %i grid (%lu bytes).\n", + Con_Message("LG_InitForMap: %i x %i grid (%lu bytes).", lgBlockWidth, lgBlockHeight, (unsigned long) (sizeof(gridblock_t) * lgBlockWidth * lgBlockHeight)); @@ -514,7 +514,7 @@ void LG_InitForMap(void) } /*if _DEBUG -Con_Message(" Sector %i: %i / %i\n", s, changedCount, count); +Con_Message(" Sector %i: %i / %i", s, changedCount, count); #endif*/ sector->changedBlockCount = changedCount; @@ -543,7 +543,7 @@ Con_Message(" Sector %i: %i / %i\n", s, changedCount, count); // How much time did we spend? VERBOSE(Con_Message - ("LG_InitForMap: Done in %.2f seconds.\n", + ("LG_InitForMap: Done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f)); } diff --git a/doomsday/client/src/render/r_main.cpp b/doomsday/client/src/render/r_main.cpp index de05e84a75..372d2c9061 100644 --- a/doomsday/client/src/render/r_main.cpp +++ b/doomsday/client/src/render/r_main.cpp @@ -694,7 +694,7 @@ void R_CheckViewerLimits(viewer_t *src, viewer_t *dst) if(abs(int(dst->angle) - int(src->angle)) >= ANGLE_45) { #ifdef _DEBUG - Con_Message("R_CheckViewerLimits: Snap camera angle to %08x.\n", dst->angle); + Con_Message("R_CheckViewerLimits: Snap camera angle to %08x.", dst->angle); #endif src->angle = dst->angle; } @@ -928,7 +928,7 @@ void R_UpdateViewer(int consoleNum) float yaw = (double)smoothView.angle / ANGLE_MAX * 360; Con_Message("(%i) F=%.3f dt=%-10.3f dx=%-10.3f dy=%-10.3f " - "Rdx=%-10.3f Rdy=%-10.3f\n", + "Rdx=%-10.3f Rdy=%-10.3f", SECONDS_TO_TICKS(gameTime), frameTimePos, sysTime - old->time, @@ -953,7 +953,7 @@ void R_UpdateViewer(int consoleNum) static oldpos_t oldpos[DDMAXPLAYERS]; oldpos_t *old = &oldpos[viewPlayer - ddPlayers]; - Con_Message("(%i) F=%.3f dt=%-10.3f dx=%-10.3f dy=%-10.3f dz=%-10.3f dx/dt=%-10.3f dy/dt=%-10.3f\n", + Con_Message("(%i) F=%.3f dt=%-10.3f dx=%-10.3f dy=%-10.3f dz=%-10.3f dx/dt=%-10.3f dy/dt=%-10.3f", //"Rdx=%-10.3f Rdy=%-10.3f\n", SECONDS_TO_TICKS(gameTime), frameTimePos, @@ -1187,7 +1187,7 @@ DENG_EXTERN_C void R_RenderPlayerView(int num) float time = sysTime - devCameraMovementStartTime; float elapsed = time - prevTime; - Con_Message("%f,%f,%f,%f,%f\n", Sys_GetRealSeconds() - devCameraMovementStartTimeRealSecs, + Con_Message("%f,%f,%f,%f,%f", Sys_GetRealSeconds() - devCameraMovementStartTimeRealSecs, time, elapsed, speed/elapsed, speed/elapsed - prevSpeed); V3f_Copy(prevPos, vd->current.pos); diff --git a/doomsday/client/src/render/rend_bias.cpp b/doomsday/client/src/render/rend_bias.cpp index 5376781bdb..bd9082eb8d 100644 --- a/doomsday/client/src/render/rend_bias.cpp +++ b/doomsday/client/src/render/rend_bias.cpp @@ -456,7 +456,7 @@ void SB_InitForMap(const char* uniqueID) } } - VERBOSE2( Con_Message("SB_InitForMap: Done in %.2f seconds.\n", (Timer_RealMilliseconds() - startTime) / 1000.0f) ) + VERBOSE2( Con_Message("SB_InitForMap: Done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f) ) } void SB_SetColor(float* dest, float* src) @@ -1258,8 +1258,6 @@ void SB_EvalPoint(float light[4], vertexillum_t* illum, if(illum) { - //Con_Message("\n"); - boolean willOverride = false; // Combine the casted light from each source. @@ -1277,8 +1275,7 @@ void SB_EvalPoint(float light[4], vertexillum_t* illum, int n; Con_Message("affected: "); for(n = 0; n < MAX_BIAS_AFFECTED; ++n) - Con_Message("%i ", affectedSources[n].source); - Con_Message("\n"); + Con_Message(" - %i", affectedSources[n].source); Con_Error("not updated: s=%i\n", aff->index); } */ diff --git a/doomsday/client/src/render/rend_font.cpp b/doomsday/client/src/render/rend_font.cpp index a34c8df5d3..573d6bb9df 100644 --- a/doomsday/client/src/render/rend_font.cpp +++ b/doomsday/client/src/render/rend_font.cpp @@ -1023,7 +1023,7 @@ static void parseParamaterBlock(char** strPtr, drawtextstate_t* state, int* numB } } - Con_Message("Warning:parseParamaterBlock: Unknown font '%s'.\n", (*strPtr)); + Con_Message("Warning:parseParamaterBlock: Unknown font '%s'.", (*strPtr)); continue; } diff --git a/doomsday/client/src/render/rend_halo.cpp b/doomsday/client/src/render/rend_halo.cpp index 3bebcb9fc9..e716eacb00 100644 --- a/doomsday/client/src/render/rend_halo.cpp +++ b/doomsday/client/src/render/rend_halo.cpp @@ -405,7 +405,7 @@ D_CMD(FlareConfig) { for(i = 0; i < NUM_FLARES; ++i) { - Con_Message("%i: pos:%f s:%.2f a:%.2f tex:%i\n", i, + Con_Message("%i: pos:%f s:%.2f a:%.2f tex:%i", i, flares[i].offset, flares[i].size, flares[i].alpha, flares[i].texture); } diff --git a/doomsday/client/src/render/sky.cpp b/doomsday/client/src/render/sky.cpp index e1175b174f..2f6ad7059f 100644 --- a/doomsday/client/src/render/sky.cpp +++ b/doomsday/client/src/render/sky.cpp @@ -427,7 +427,7 @@ void Sky_LayerSetActive(int id, boolean active) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerSetActive: Invalid layer id #%i, ignoring.\n", id); + Con_Message("Warning: Sky_LayerSetActive: Invalid layer id #%i, ignoring.", id); #endif return; } @@ -444,7 +444,7 @@ boolean Sky_LayerActive(int id) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerActive: Invalid layer id #%i, returning false.\n", id); + Con_Message("Warning: Sky_LayerActive: Invalid layer id #%i, returning false.", id); #endif return false; } @@ -457,7 +457,7 @@ void Sky_LayerSetMasked(int id, boolean masked) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerSetMasked: Invalid layer id #%i, ignoring.\n", id); + Con_Message("Warning: Sky_LayerSetMasked: Invalid layer id #%i, ignoring.", id); #endif return; } @@ -473,7 +473,7 @@ boolean Sky_LayerMasked(int id) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerMasked: Invalid layer id #%i, returning false.\n", id); + Con_Message("Warning: Sky_LayerMasked: Invalid layer id #%i, returning false.", id); #endif return false; } @@ -486,7 +486,7 @@ Material *Sky_LayerMaterial(int id) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerMaterial: Invalid layer id #%i, returning NULL.\n", id); + Con_Message("Warning: Sky_LayerMaterial: Invalid layer id #%i, returning NULL.", id); #endif return 0; } @@ -499,7 +499,7 @@ void Sky_LayerSetMaterial(int id, Material *mat) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerSetMaterial: Invalid layer id #%i, ignoring.\n", id); + Con_Message("Warning: Sky_LayerSetMaterial: Invalid layer id #%i, ignoring.", id); #endif return; } @@ -515,7 +515,7 @@ float Sky_LayerFadeoutLimit(int id) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerFadeoutLimit: Invalid layer id #%i, returning default.\n", id); + Con_Message("Warning: Sky_LayerFadeoutLimit: Invalid layer id #%i, returning default.", id); #endif return DEFAULT_SKY_SPHERE_FADEOUT_LIMIT; } @@ -528,7 +528,7 @@ void Sky_LayerSetFadeoutLimit(int id, float limit) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerSetFadeoutLimit: Invalid layer id #%i, ignoring.\n", id); + Con_Message("Warning: Sky_LayerSetFadeoutLimit: Invalid layer id #%i, ignoring.", id); #endif return; } @@ -544,7 +544,7 @@ float Sky_LayerOffset(int id) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerOffset: Invalid layer id #%i, returning default.\n", id); + Con_Message("Warning: Sky_LayerOffset: Invalid layer id #%i, returning default.", id); #endif return DEFAULT_SKY_SPHERE_XOFFSET; } @@ -557,7 +557,7 @@ void Sky_LayerSetOffset(int id, float offset) if(!layer) { #if _DEBUG - Con_Message("Warning: Sky_LayerOffset: Invalid layer id #%i, ignoring.\n", id); + Con_Message("Warning: Sky_LayerOffset: Invalid layer id #%i, ignoring.", id); #endif return; } diff --git a/doomsday/client/src/resource/colorpalette.cpp b/doomsday/client/src/resource/colorpalette.cpp index 62fa25c1b0..d3895763e9 100644 --- a/doomsday/client/src/resource/colorpalette.cpp +++ b/doomsday/client/src/resource/colorpalette.cpp @@ -75,13 +75,12 @@ void ColorPalette_ReplaceColorTable(colorpalette_t* pal, const int compOrder[3], void ColorPalette_Color(const colorpalette_t* pal, int colorIdx, uint8_t rgb[3]) { - assert(pal && rgb); - { - size_t offset; + DENG_ASSERT(pal && rgb); + #if _DEBUG if(colorIdx < 0 || colorIdx >= pal->_colorCount) - Con_Message("Warning:ColorPalette::Color: ColorIdx %u out of range [0...%u].\n", + Con_Message("Warning: ColorPalette::Color: ColorIdx %u out of range [0..%u).", colorIdx, pal->_colorCount); #endif @@ -91,11 +90,10 @@ void ColorPalette_Color(const colorpalette_t* pal, int colorIdx, uint8_t rgb[3]) return; } - offset = 3 * (size_t)MINMAX_OF(0, colorIdx, pal->_colorCount-1); + size_t offset = 3 * (size_t)MINMAX_OF(0, colorIdx, pal->_colorCount-1); rgb[CR] = pal->_colorData[offset + CR]; rgb[CG] = pal->_colorData[offset + CG]; rgb[CB] = pal->_colorData[offset + CB]; - } } int ColorPalette_NearestIndex(colorpalette_t* pal, uint8_t red, uint8_t green, uint8_t blue) diff --git a/doomsday/client/src/resource/colorpalettes.cpp b/doomsday/client/src/resource/colorpalettes.cpp index 25a9463aaf..2f67c5bfc6 100644 --- a/doomsday/client/src/resource/colorpalettes.cpp +++ b/doomsday/client/src/resource/colorpalettes.cpp @@ -181,7 +181,7 @@ boolean R_SetDefaultColorPalette(colorpaletteid_t id) defaultColorPalette = id; return true; } - VERBOSE( Con_Message("R_SetDefaultColorPalette: Invalid id %u.\n", id) ); + VERBOSE( Con_Message("R_SetDefaultColorPalette: Invalid id %u.", id) ); return false; } @@ -360,7 +360,7 @@ DENG_EXTERN_C void R_GetColorPaletteRGBubv(colorpaletteid_t paletteId, int color return; } - Con_Message("Warning:R_GetColorPaletteRGBubv: Failed to locate ColorPalette for id %i.\n", paletteId); + Con_Message("Warning: R_GetColorPaletteRGBubv: Failed to locate ColorPalette for id %i.", paletteId); } #undef R_GetColorPaletteRGBf @@ -395,5 +395,5 @@ DENG_EXTERN_C void R_GetColorPaletteRGBf(colorpaletteid_t paletteId, int colorId return; } - Con_Message("Warning:R_GetColorPaletteRGBf: Failed to locate ColorPalette for id %i.\n", paletteId); + Con_Message("Warning: R_GetColorPaletteRGBf: Failed to locate ColorPalette for id %i.", paletteId); } diff --git a/doomsday/client/src/resource/fonts.cpp b/doomsday/client/src/resource/fonts.cpp index b655a075da..f9ea8fb428 100644 --- a/doomsday/client/src/resource/fonts.cpp +++ b/doomsday/client/src/resource/fonts.cpp @@ -1651,7 +1651,7 @@ D_CMD(ListFonts) if(!Fonts_Size()) { - Con_Message("There are currently no fonts defined/loaded.\n"); + Con_Message("There are currently no fonts defined/loaded."); return true; } @@ -1704,11 +1704,11 @@ D_CMD(ListFonts) #if _DEBUG D_CMD(PrintFontStats) { - DENG_UNUSED(src); DENG_UNUSED(argv); DENG_UNUSED(argc); + DENG2_UNUSED3(src, argv, argc); if(!Fonts_Size()) { - Con_Message("There are currently no fonts defined/loaded.\n"); + Con_Message("There are currently no fonts defined/loaded."); return true; } diff --git a/doomsday/client/src/resource/tga.cpp b/doomsday/client/src/resource/tga.cpp index a1efb92eeb..f7ca247074 100644 --- a/doomsday/client/src/resource/tga.cpp +++ b/doomsday/client/src/resource/tga.cpp @@ -395,7 +395,7 @@ uint8_t* TGA_Load(FileHandle* file, int* w, int* h, int* pixelSize) } /*#if _DEBUG - Con_Message("TGA: type=%i pxsize=%i abits=%i\n", header.imageType, + Con_Message("TGA: type=%i pxsize=%i abits=%i", header.imageType, imageSpec.pixelDepth, imageSpec.attributeBits); #endif*/ diff --git a/doomsday/client/src/sys_system.cpp b/doomsday/client/src/sys_system.cpp index f3d48c26fc..7e3b8bd299 100644 --- a/doomsday/client/src/sys_system.cpp +++ b/doomsday/client/src/sys_system.cpp @@ -75,12 +75,12 @@ void Sys_Init(void) { uint startTime; - Con_Message("Setting up platform state...\n"); + Con_Message("Setting up platform state..."); startTime = (verbose >= 2? Timer_RealMilliseconds() : 0); #ifdef __CLIENT__ - VERBOSE( Con_Message("Initializing Input subsystem...\n") ) + VERBOSE( Con_Message("Initializing Input subsystem...") ) if(!I_Init()) Con_Error("Failed to initialize Input subsystem.\n"); @@ -88,7 +88,7 @@ void Sys_Init(void) I_InitVirtualInputDevices(); #endif - VERBOSE( Con_Message("Initializing Audio subsystem...\n") ) + VERBOSE( Con_Message("Initializing Audio subsystem...") ) S_Init(); #if defined(WIN32) && !defined(_DEBUG) @@ -107,10 +107,10 @@ void Sys_Init(void) signal(SIGPIPE, SIG_IGN); #endif - VERBOSE( Con_Message("Initializing Network subsystem...\n") ) + VERBOSE( Con_Message("Initializing Network subsystem...") ) N_Init(); - VERBOSE2( Con_Message("Sys_Init: Done in %.2f seconds.\n", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); + VERBOSE2( Con_Message("Sys_Init: Done in %.2f seconds.", (Timer_RealMilliseconds() - startTime) / 1000.0f) ); } boolean Sys_IsShuttingDown(void) diff --git a/doomsday/client/src/ui/b_command.cpp b/doomsday/client/src/ui/b_command.cpp index a654eddfde..47a479c7dd 100644 --- a/doomsday/client/src/ui/b_command.cpp +++ b/doomsday/client/src/ui/b_command.cpp @@ -189,14 +189,14 @@ boolean B_ParseEvent(evbinding_t* eb, const char* desc) } else { - Con_Message("B_ParseEvent: Device \"%s\" unknown.\n", Str_Text(str)); + Con_Message("B_ParseEvent: Device \"%s\" unknown.", Str_Text(str)); return false; } // Anything left that wasn't used? if(desc) { - Con_Message("B_ParseEvent: Unrecognized \"%s\".\n", desc); + Con_Message("B_ParseEvent: Unrecognized \"%s\".", desc); return false; } diff --git a/doomsday/client/src/ui/b_context.cpp b/doomsday/client/src/ui/b_context.cpp index f21d42959d..0110114497 100644 --- a/doomsday/client/src/ui/b_context.cpp +++ b/doomsday/client/src/ui/b_context.cpp @@ -337,7 +337,7 @@ void B_ActivateContext(bcontext_t* bc, boolean doActivate) if(!(bc->flags & BCF_PROTECTED) && verbose >= 1) #endif { - Con_Message("%s binding context '%s'...\n", doActivate? "Activating" : "Deactivating", bc->name); + Con_Message("%s binding context '%s'...", doActivate? "Activating" : "Deactivating", bc->name); } bc->flags &= ~BCF_ACTIVE; diff --git a/doomsday/client/src/ui/b_device.cpp b/doomsday/client/src/ui/b_device.cpp index 5579440879..e6b0f06063 100644 --- a/doomsday/client/src/ui/b_device.cpp +++ b/doomsday/client/src/ui/b_device.cpp @@ -157,7 +157,7 @@ boolean B_ParseDevice(dbinding_t* cb, const char* desc) } else { - Con_Message("B_ParseEvent: Unrecognized \"%s\".\n", desc); + Con_Message("B_ParseEvent: Unrecognized \"%s\".", desc); return false; } } diff --git a/doomsday/client/src/ui/b_main.cpp b/doomsday/client/src/ui/b_main.cpp index a812c3f507..5831fd0460 100644 --- a/doomsday/client/src/ui/b_main.cpp +++ b/doomsday/client/src/ui/b_main.cpp @@ -372,7 +372,7 @@ void B_DeleteMatching(bcontext_t* bc, evbinding_t* eventBinding, if(bid) { Con_Message("B_BindCommand: Deleting binding %i, it has been overridden by " - "binding %i.\n", bid, eventBinding? eventBinding->bid : deviceBinding->bid); + "binding %i.", bid, eventBinding? eventBinding->bid : deviceBinding->bid); B_DeleteBinding(bc, bid); } } @@ -428,7 +428,7 @@ dbinding_t* B_BindControl(const char* controlDesc, const char* device) localNum = strtoul(Str_Text(str) + 5, NULL, 10) - 1; if(localNum < 0 || localNum >= DDMAXPLAYERS) { - Con_Message("B_BindControl: Local player number %i is invalid.\n", localNum); + Con_Message("B_BindControl: Local player number %i is invalid.", localNum); return NULL; } @@ -441,7 +441,7 @@ dbinding_t* B_BindControl(const char* controlDesc, const char* device) control = P_PlayerControlByName(Str_Text(str)); if(!control) { - Con_Message("B_BindControl: Player control \"%s\" not defined.\n", Str_Text(str)); + Con_Message("B_BindControl: Player control \"%s\" not defined.", Str_Text(str)); return NULL; } @@ -451,7 +451,7 @@ dbinding_t* B_BindControl(const char* controlDesc, const char* device) bc = B_ContextByName(DEFAULT_BINDING_CONTEXT_NAME); } VERBOSE( Con_Message("B_BindControl: Control '%s' in context '%s' of local player %i to be " - "bound to '%s'.\n", control->name, bc->name, localNum, device) ); + "bound to '%s'.", control->name, bc->name, localNum, device) ); if((conBin = B_FindControlBinding(bc, control->id)) == NULL) { @@ -628,7 +628,7 @@ D_CMD(ActivateBindingContext) if(bc->flags & BCF_PROTECTED) { - Con_Message("Binding Context '%s' is protected. It can not be manually %s.\n", bc->name, + Con_Message("Binding Context '%s' is protected. It can not be manually %s.", bc->name, doActivate? "activated" : "deactivated"); return false; } @@ -869,7 +869,7 @@ boolean B_Responder(ddevent_t* ev) echo.type = E_SYMBOLIC; echo.symbolic.id = 0; echo.symbolic.name = Str_Text(&name); - VERBOSE( Con_Message("B_Responder: Symbolic echo: %s\n", echo.symbolic.name) ); + VERBOSE( Con_Message("B_Responder: Symbolic echo: %s", echo.symbolic.name) ); DD_PostEvent(&echo); Str_Free(&name); return true; diff --git a/doomsday/client/src/ui/b_util.cpp b/doomsday/client/src/ui/b_util.cpp index 0cc91674d1..f8302a0af4 100644 --- a/doomsday/client/src/ui/b_util.cpp +++ b/doomsday/client/src/ui/b_util.cpp @@ -81,7 +81,7 @@ boolean B_ParseToggleState(const char* toggleName, ebstate_t* state) return true; } - Con_Message("B_ParseToggleState: \"%s\" is not a toggle state.\n", toggleName); + Con_Message("B_ParseToggleState: \"%s\" is not a toggle state.", toggleName); return false; // Not recognized. } @@ -109,7 +109,7 @@ boolean B_ParseAxisPosition(const char* desc, ebstate_t* state, float* pos) } else { - Con_Message("B_ParseAxisPosition: Axis position \"%s\" is invalid.\n", desc); + Con_Message("B_ParseAxisPosition: Axis position \"%s\" is invalid.", desc); return false; } return true; @@ -142,7 +142,7 @@ boolean B_ParseKeyId(const char* desc, int* id) *id = strtoul(desc + 4, NULL, 10); if(*id <= 0 || *id > 255) { - Con_Message("B_ParseKeyId: Key code %i out of range.\n", *id); + Con_Message("B_ParseKeyId: Key code %i out of range.", *id); return false; } } @@ -153,7 +153,7 @@ boolean B_ParseKeyId(const char* desc, int* id) *id = B_KeyForShortName(desc); if(!*id) { - Con_Message("B_ParseKeyId: Unknown key \"%s\".\n", desc); + Con_Message("B_ParseKeyId: Unknown key \"%s\".", desc); return false; } } @@ -177,7 +177,7 @@ boolean B_ParseMouseTypeAndId(const char* desc, ddeventtype_t* type, int* id) *id = strtoul(desc + 6, NULL, 10) - 1; if(*id < 0 || (uint)*id >= I_GetDevice(IDEV_MOUSE, false)->numKeys) { - Con_Message("B_ParseMouseTypeAndId: Button %i does not exist.\n", *id); + Con_Message("B_ParseMouseTypeAndId: Button %i does not exist.", *id); return false; } } @@ -188,7 +188,7 @@ boolean B_ParseMouseTypeAndId(const char* desc, ddeventtype_t* type, int* id) *id = I_GetAxisByName(I_GetDevice(IDEV_MOUSE, false), desc); if(*id < 0) { - Con_Message("B_ParseMouseTypeAndId: Axis \"%s\" is not defined.\n", desc); + Con_Message("B_ParseMouseTypeAndId: Axis \"%s\" is not defined.", desc); return false; } } @@ -203,7 +203,7 @@ boolean B_ParseJoystickTypeAndId(uint device, const char* desc, ddeventtype_t* t *id = strtoul(desc + 6, NULL, 10) - 1; if(*id < 0 || (uint)*id >= I_GetDevice(device, false)->numKeys) { - Con_Message("B_ParseJoystickTypeAndId: Button %i does not exist in joystick.\n", *id); + Con_Message("B_ParseJoystickTypeAndId: Button %i does not exist in joystick.", *id); return false; } } @@ -213,7 +213,7 @@ boolean B_ParseJoystickTypeAndId(uint device, const char* desc, ddeventtype_t* t *id = strtoul(desc + 3, NULL, 10) - 1; if(*id < 0 || (uint)*id >= I_GetDevice(device, false)->numHats) { - Con_Message("B_ParseJoystickTypeAndId: Hat %i does not exist in joystick.\n", *id); + Con_Message("B_ParseJoystickTypeAndId: Hat %i does not exist in joystick.", *id); return false; } } @@ -229,7 +229,7 @@ boolean B_ParseJoystickTypeAndId(uint device, const char* desc, ddeventtype_t* t *id = I_GetAxisByName(I_GetDevice(device, false), desc); if(*id < 0) { - Con_Message("B_ParseJoystickTypeAndId: Axis \"%s\" is not defined in joystick.\n", desc); + Con_Message("B_ParseJoystickTypeAndId: Axis \"%s\" is not defined in joystick.", desc); return false; } } @@ -248,7 +248,7 @@ boolean B_ParseAnglePosition(const char* desc, float* pos) } else { - Con_Message("B_ParseAnglePosition: Angle position \"%s\" invalid.\n", desc); + Con_Message("B_ParseAnglePosition: Angle position \"%s\" invalid.", desc); return false; } return true; @@ -377,7 +377,7 @@ boolean B_ParseStateCondition(statecondition_t* cond, const char* desc) } else { - Con_Message("B_ParseEvent: Device \"%s\" unknown.\n", Str_Text(str)); + Con_Message("B_ParseEvent: Device \"%s\" unknown.", Str_Text(str)); return false; } @@ -385,7 +385,7 @@ boolean B_ParseStateCondition(statecondition_t* cond, const char* desc) if(cond->type == SCT_TOGGLE_STATE && cond->state != EBTOG_UP && cond->state != EBTOG_DOWN) { - Con_Message("B_ParseStateCondition: \"%s\": Toggle condition can only be 'up' or 'down'.\n", + Con_Message("B_ParseStateCondition: \"%s\": Toggle condition can only be 'up' or 'down'.", desc); return false; } @@ -400,7 +400,7 @@ boolean B_ParseStateCondition(statecondition_t* cond, const char* desc) // Anything left that wasn't used? if(desc) { - Con_Message("B_ParseStateCondition: Unrecognized \"%s\".\n", desc); + Con_Message("B_ParseStateCondition: Unrecognized \"%s\".", desc); return false; } diff --git a/doomsday/client/src/ui/dd_input.cpp b/doomsday/client/src/ui/dd_input.cpp index 5000b25a6f..67099e3820 100644 --- a/doomsday/client/src/ui/dd_input.cpp +++ b/doomsday/client/src/ui/dd_input.cpp @@ -1438,13 +1438,14 @@ void DD_ReadMouse(void) if(verbose >= 3) { for(i = 0; i < IMB_MAXBUTTONS; ++i) + { if(mouse.buttonDowns[i] || mouse.buttonUps[i]) break; + } if(i < IMB_MAXBUTTONS) { for(i = 0; i < IMB_MAXBUTTONS; ++i) - Con_Message("[%02i] %i/%i ", i, mouse.buttonDowns[i], mouse.buttonUps[i]); - Con_Message("\n"); + Con_Message("[%02i] %i/%i", i, mouse.buttonDowns[i], mouse.buttonUps[i]); } } diff --git a/doomsday/client/src/ui/fi_main.cpp b/doomsday/client/src/ui/fi_main.cpp index d9d9b9f635..a63edcd5ee 100644 --- a/doomsday/client/src/ui/fi_main.cpp +++ b/doomsday/client/src/ui/fi_main.cpp @@ -358,7 +358,7 @@ void FI_ScriptTerminate(finaleid_t id) f = finalesById(id); if(!f) { - Con_Message("FI_ScriptTerminate: Unknown finale %u.\n", id); + Con_Message("FI_ScriptTerminate: Unknown finale %u.", id); return; } if(f->active) @@ -433,7 +433,7 @@ int FI_ScriptResponder(finaleid_t id, const void* ev) f = finalesById(id); if(!f) { - Con_Message("FI_ScriptResponder: Unknown finaleid %u.\n", id); + Con_Message("FI_ScriptResponder: Unknown finaleid %u.", id); return false; } if(f->active) diff --git a/doomsday/client/src/ui/finaleinterpreter.cpp b/doomsday/client/src/ui/finaleinterpreter.cpp index 55a6260c76..7d92d08e90 100644 --- a/doomsday/client/src/ui/finaleinterpreter.cpp +++ b/doomsday/client/src/ui/finaleinterpreter.cpp @@ -1506,7 +1506,7 @@ DEFFC(If) } else { - Con_Message("FIC_If: Unknown condition '%s'.\n", token); + Con_Message("FIC_If: Unknown condition '%s'.", token); } // Skip the next command if the value is false. @@ -1557,7 +1557,7 @@ DEFFC(Image) FIData_PicAppendFrame(obj, PFT_RAW, -1, &rawTex->lumpNum, 0, false); return; } - Con_Message("FIC_Image: Warning, missing lump '%s'.\n", name); + Con_Message("FIC_Image: Warning, missing lump '%s'.", name); } DEFFC(ImageAt) @@ -1578,7 +1578,7 @@ DEFFC(ImageAt) FIData_PicAppendFrame(obj, PFT_RAW, -1, &rawTex->lumpNum, 0, false); return; } - Con_Message("FIC_ImageAt: Warning, missing lump '%s'.\n", name); + Con_Message("FIC_ImageAt: Warning, missing lump '%s'.", name); } #ifdef __CLIENT__ @@ -1624,7 +1624,7 @@ DEFFC(XImage) } else { - Con_Message("FIC_XImage: Warning, missing graphic '%s'.\n", fileName); + Con_Message("FIC_XImage: Warning, missing graphic '%s'.", fileName); } #endif // __CLIENT__ } @@ -1645,7 +1645,7 @@ DEFFC(Patch) } else { - Con_Message("FIC_Patch: Warning, missing Patch '%s'.\n", name); + Con_Message("FIC_Patch: Warning, missing Patch '%s'.", name); } } @@ -1659,7 +1659,7 @@ DEFFC(SetPatch) patchId = R_DeclarePatch(name); if(patchId == 0) { - Con_Message("FIC_SetPatch: Warning, missing Patch '%s'.\n", name); + Con_Message("FIC_SetPatch: Warning, missing Patch '%s'.", name); return; } @@ -1695,7 +1695,7 @@ DEFFC(Anim) patchId = R_DeclarePatch(name); if(patchId == 0) { - Con_Message("FIC_Anim: Warning, Patch '%s' not found.\n", name); + Con_Message("FIC_Anim: Warning, Patch '%s' not found.", name); return; } @@ -1716,7 +1716,7 @@ DEFFC(AnimImage) ((fidata_pic_t*)obj)->animComplete = false; return; } - Con_Message("FIC_AnimImage: Warning, lump '%s' not found.\n", name); + Con_Message("FIC_AnimImage: Warning, lump '%s' not found.", name); } DEFFC(Repeat) @@ -2144,7 +2144,7 @@ DEFFC(PredefinedFont) } { AutoStr* fontPath = Uri_ToString(OP_URI(1)); - Con_Message("FIC_PredefinedFont: Warning, unknown font '%s'.\n", Str_Text(fontPath)); + Con_Message("FIC_PredefinedFont: Warning, unknown font '%s'.", Str_Text(fontPath)); } #endif } @@ -2222,7 +2222,7 @@ DEFFC(Font) } { AutoStr* fontPath = Uri_ToString(OP_URI(1)); - Con_Message("FIC_Font: Warning, unknown font '%s'.\n", Str_Text(fontPath)); + Con_Message("FIC_Font: Warning, unknown font '%s'.", Str_Text(fontPath)); } #endif } diff --git a/doomsday/client/src/ui/p_control.cpp b/doomsday/client/src/ui/p_control.cpp index 667dfb28e0..e0a545a93d 100644 --- a/doomsday/client/src/ui/p_control.cpp +++ b/doomsday/client/src/ui/p_control.cpp @@ -310,7 +310,7 @@ void P_MaintainControlDoubleClicks(int playerNum, int control, float pos) Str_Append(symbolicName, playerControls[control].name); VERBOSE( Con_Message("P_MaintainControlDoubleClicks: Triggered plr %i, ctl %i, " - "state %i - threshold %i (%s)\n", + "state %i - threshold %i (%s)", playerNum, control, newState, nowTime - db->previousClickTime, Str_Text(symbolicName)) ); @@ -421,7 +421,7 @@ DENG_EXTERN_C void P_Impulse(int playerNum, int control) // Check that this is really an impulse control. if(pc->type != CTLT_IMPULSE) { - Con_Message("P_Impulse: Control '%s' is not an impulse control.\n", + Con_Message("P_Impulse: Control '%s' is not an impulse control.", pc->name); return; } @@ -485,21 +485,21 @@ D_CMD(ListPlayerControls) uint i, j; char buf[MAX_DESCRIPTOR_LENGTH+1]; - Con_Message("Player Controls:\n"); + Con_Message("Player Controls:"); for(i = 0; i < NUM_CONTROL_CLASSES; ++i) { controlclass_t *cClass = &ctlClass[i]; if(cClass->count > 0) { - Con_Message("%i %s:\n", cClass->count, + Con_Message("%i %s:", cClass->count, ctlClassNames[i][cClass->count > 1]); for(j = 0; j < cClass->count; ++j) { strncpy(buf, cClass->desc[j].name, sizeof(buf) - 1); strlwr(buf); buf[strlen(cClass->desc[j].name)] = 0; - Con_Message(" %s\n", buf); + Con_Message(" %s", buf); } } }*/ diff --git a/doomsday/client/src/ui/window.cpp b/doomsday/client/src/ui/window.cpp index b7229ae641..6cbc54703a 100644 --- a/doomsday/client/src/ui/window.cpp +++ b/doomsday/client/src/ui/window.cpp @@ -566,7 +566,7 @@ struct ddwindow_s if(!changed) { - VERBOSE(Con_Message("New window attributes same as before.\n")); + VERBOSE(Con_Message("New window attributes same as before.")); return true; } @@ -962,7 +962,7 @@ boolean Sys_ShutdownWindowManager(void) */ static boolean createContext(void) { - Con_Message("createContext: OpenGL.\n"); + Con_Message("createContext: OpenGL."); #if 0 // Set GL attributes. We want at least 5 bits per color and a 16 diff --git a/doomsday/client/src/unix/joystick.cpp b/doomsday/client/src/unix/joystick.cpp index 0131a812e5..c8a3e53614 100644 --- a/doomsday/client/src/unix/joystick.cpp +++ b/doomsday/client/src/unix/joystick.cpp @@ -72,14 +72,14 @@ static void initialize(void) if(SDL_InitSubSystem(SDL_INIT_JOYSTICK)) { - Con_Message("SDL init failed for joystick: %s\n", SDL_GetError()); + Con_Message("SDL init failed for joystick: %s", SDL_GetError()); } if((joycount = SDL_NumJoysticks()) > 0) { if(joydevice > joycount) { - Con_Message("I_InitJoystick: joydevice = %i, out of range.\n", + Con_Message("I_InitJoystick: joydevice = %i, out of range.", joydevice); joy = SDL_JoystickOpen(0); } @@ -90,7 +90,7 @@ static void initialize(void) if(joy) { // Show some info. - Con_Message("I_InitJoystick: %s\n", SDL_JoystickName(SDL_JoystickIndex(joy))); + Con_Message("I_InitJoystick: %s", SDL_JoystickName(SDL_JoystickIndex(joy))); // We'll handle joystick events manually SDL_JoystickEventState(SDL_ENABLE); @@ -98,7 +98,7 @@ static void initialize(void) if(verbose) { Con_Message("I_InitJoystick: Joystick reports %i axes, %i buttons, %i hats, " - "and %i trackballs.\n", + "and %i trackballs.", SDL_JoystickNumAxes(joy), SDL_JoystickNumButtons(joy), SDL_JoystickNumHats(joy), @@ -109,7 +109,7 @@ static void initialize(void) } else { - Con_Message("I_InitJoystick: No joysticks found\n"); + Con_Message("I_InitJoystick: No joysticks found"); joyAvailable = false; } } diff --git a/doomsday/client/src/updater/updater.cpp b/doomsday/client/src/updater/updater.cpp index c58a190711..3e74cec5f1 100644 --- a/doomsday/client/src/updater/updater.cpp +++ b/doomsday/client/src/updater/updater.cpp @@ -260,7 +260,7 @@ DENG2_PIMPL(Updater) if(reply->error() != QNetworkReply::NoError) { - Con_Message("Network request failed: %s\n", reply->url().toString().toUtf8().constData()); + Con_Message("Network request failed: %s", reply->url().toString().toUtf8().constData()); return; } @@ -303,7 +303,7 @@ DENG2_PIMPL(Updater) // Is this newer than what we're running? if(latestVersion > currentVersion || alwaysShowNotification) { - Con_Message("Found an update: %s\n", latestVersion.asText().toUtf8().constData()); + Con_Message("Found an update: %s", latestVersion.asText().toUtf8().constData()); // Automatically switch to windowed mode for convenience. bool wasFull = switchToWindowedMode(); @@ -314,7 +314,7 @@ DENG2_PIMPL(Updater) } else { - Con_Message("You are running the latest available %s release.\n", + Con_Message("You are running the latest available %s release.", UpdaterSettings().channel() == UpdaterSettings::Stable? "stable" : "unstable"); } } @@ -586,6 +586,6 @@ void Updater_ShowSettings(void) void Updater_PrintLastUpdated(void) { - Con_Message("Latest update check was made %s.\n", + Con_Message("Latest update check was made %s.", UpdaterSettings().lastCheckAgo().toAscii().constData()); } diff --git a/doomsday/client/src/windows/dd_winit.cpp b/doomsday/client/src/windows/dd_winit.cpp index 5b8bd567f6..b110c08e82 100644 --- a/doomsday/client/src/windows/dd_winit.cpp +++ b/doomsday/client/src/windows/dd_winit.cpp @@ -275,7 +275,7 @@ boolean DD_Win32_Init(void) { // Disable Alt-Tab, Alt-Esc, Ctrl-Alt-Del. A bit of a hack... SystemParametersInfo(SPI_SETSCREENSAVERRUNNING, TRUE, 0, 0); - Con_Message("Windows system keys disabled.\n"); + Con_Message("Windows system keys disabled."); } #endif diff --git a/doomsday/client/src/windows/directinput.cpp b/doomsday/client/src/windows/directinput.cpp index 81d3107f7f..96181cfccd 100644 --- a/doomsday/client/src/windows/directinput.cpp +++ b/doomsday/client/src/windows/directinput.cpp @@ -49,7 +49,7 @@ int DirectInput_Init(void) IID_IDirectInput8, (LPVOID*)&dInput)) || FAILED(hr = dInput->Initialize(app.hInstance, DIRECTINPUT_VERSION))) { - Con_Message("DirectInput 8 init failed (0x%x).\n", hr); + Con_Message("DirectInput 8 init failed (0x%x).", hr); // Try the older version 3 interface instead. // I'm not sure if this works correctly. @@ -57,16 +57,16 @@ int DirectInput_Init(void) IID_IDirectInput2W, (LPVOID*)&dInput3)) || FAILED(hr = dInput3->Initialize(app.hInstance, 0x0300))) { - Con_Message("Failed to create DirectInput 3 object (0x%x).\n", hr); + Con_Message("Failed to create DirectInput 3 object (0x%x).", hr); return false; } - Con_Message("Using DirectInput 3.\n"); + Con_Message("Using DirectInput 3."); } if(!dInput && !dInput3) { - Con_Message(" DirectInput init failed.\n"); + Con_Message(" DirectInput init failed."); return false; } diff --git a/doomsday/client/src/windows/joystick_win32.cpp b/doomsday/client/src/windows/joystick_win32.cpp index 7bf685c015..02d4d2d1c1 100644 --- a/doomsday/client/src/windows/joystick_win32.cpp +++ b/doomsday/client/src/windows/joystick_win32.cpp @@ -83,7 +83,7 @@ boolean Joystick_Init(void) LPDIRECTINPUT8 dInput = DirectInput_IVersion8(); if(!dInput) { - Con_Message("Joystick_Init: DirectInput version 8 interface not available, cannot continue.\n"); + Con_Message("Joystick_Init: DirectInput version 8 interface not available, cannot continue."); return false; } @@ -103,19 +103,19 @@ boolean Joystick_Init(void) if(!firstJoystick.dwSize) return false; // Not found. - Con_Message("Joystick_Init: joydevice = %i, out of range.\n", joyDevice); + Con_Message("Joystick_Init: joydevice = %i, out of range.", joyDevice); // Use the first joystick that was found. memcpy(&ddi, &firstJoystick, sizeof(ddi)); } // Show some info. - Con_Message("Joystick_Init: %s\n", ddi.tszProductName); + Con_Message("Joystick_Init: %s", ddi.tszProductName); // Create the joystick device. HRESULT hr = dInput->CreateDevice(ddi.guidInstance, &didJoy, 0); if(FAILED(hr)) { - Con_Message("Joystick_Init: Failed to create device (0x%x).\n", hr); + Con_Message("Joystick_Init: Failed to create device (0x%x).", hr); return false; } @@ -123,7 +123,7 @@ boolean Joystick_Init(void) hr = didJoy->SetDataFormat(&c_dfDIJoystick); if(FAILED(hr)) { - Con_Message("Joystick_Init: Failed to set data format (0x%x).\n", hr); + Con_Message("Joystick_Init: Failed to set data format (0x%x).", hr); goto kill_joy; } @@ -131,7 +131,7 @@ boolean Joystick_Init(void) hr = didJoy->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND); if(FAILED(hr)) { - Con_Message("Joystick_Init: Failed to set co-op level (0x%x: %s).\n", + Con_Message("Joystick_Init: Failed to set co-op level (0x%x: %s).", hr, DirectInput_ErrorMsg(hr)); goto kill_joy; } @@ -143,7 +143,7 @@ boolean Joystick_Init(void) if(FAILED(hr)) { if(verbose) - Con_Message("Joystick_Init: Failed to set axis '%s' range (0x%x: %s).\n", + Con_Message("Joystick_Init: Failed to set axis '%s' range (0x%x: %s).", axisName[i], hr, DirectInput_ErrorMsg(hr)); } } @@ -152,7 +152,7 @@ boolean Joystick_Init(void) hr = didJoy->SetProperty(DIPROP_DEADZONE, DIPropDWord(DIPH_DEVICE)); if(FAILED(hr)) { - Con_Message("Joystick_Init: Failed to set dead zone (0x%x: %s).\n", + Con_Message("Joystick_Init: Failed to set dead zone (0x%x: %s).", hr, DirectInput_ErrorMsg(hr)); } @@ -160,7 +160,7 @@ boolean Joystick_Init(void) hr = didJoy->SetProperty(DIPROP_AXISMODE, DIPropDWord(DIPH_DEVICE, 0, DIPROPAXISMODE_ABS)); if(FAILED(hr)) { - Con_Message("Joystick_Init: Failed to set absolute axis mode (0x%x: %s).\n", + Con_Message("Joystick_Init: Failed to set absolute axis mode (0x%x: %s).", hr, DirectInput_ErrorMsg(hr)); } diff --git a/doomsday/client/src/windows/mouse_win32.cpp b/doomsday/client/src/windows/mouse_win32.cpp index fbae0db596..d032a80b81 100644 --- a/doomsday/client/src/windows/mouse_win32.cpp +++ b/doomsday/client/src/windows/mouse_win32.cpp @@ -57,7 +57,7 @@ static int Mouse_Win32_Init(void) if(FAILED(hr)) { - Con_Message("Mouse_Init: Failed to create device (0x%x: %s).\n", + Con_Message("Mouse_Init: Failed to create device (0x%x: %s).", hr, DirectInput_ErrorMsg(hr)); return false; } @@ -66,7 +66,7 @@ static int Mouse_Win32_Init(void) hr = didMouse->SetDataFormat(&c_dfDIMouse2); if(FAILED(hr)) { - Con_Message("Mouse_Init: Failed to set data format (0x%x: %s).\n", + Con_Message("Mouse_Init: Failed to set data format (0x%x: %s).", hr, DirectInput_ErrorMsg(hr)); goto kill_mouse; } @@ -75,7 +75,7 @@ static int Mouse_Win32_Init(void) hr = didMouse->SetCooperativeLevel(hWnd, DISCL_EXCLUSIVE | DISCL_FOREGROUND); if(FAILED(hr)) { - Con_Message("Mouse_Init: Failed to set co-op level (0x%x: %s).\n", + Con_Message("Mouse_Init: Failed to set co-op level (0x%x: %s).", hr, DirectInput_ErrorMsg(hr)); goto kill_mouse; } diff --git a/doomsday/libdeng1/src/smoother.cpp b/doomsday/libdeng1/src/smoother.cpp index 5d8d83b53e..9be0598629 100644 --- a/doomsday/libdeng1/src/smoother.cpp +++ b/doomsday/libdeng1/src/smoother.cpp @@ -212,7 +212,7 @@ boolean Smoother_Evaluate(Smoother const *sm, coord_t *xyz) if(!Smoother_IsValid(sm)) { /*#ifdef _DEBUG - Con_Message("Smoother_Evaluate: sm=%p not valid!\n", sm); + Con_Message("Smoother_Evaluate: sm=%p not valid!", sm); #endif*/ return false; } @@ -224,7 +224,7 @@ boolean Smoother_Evaluate(Smoother const *sm, coord_t *xyz) xyz[VY] = past->xyz[VY]; xyz[VZ] = past->xyz[VZ]; /*#if _DEBUG - Con_Message("Smoother_Evaluate: falling behind\n"); + Con_Message("Smoother_Evaluate: falling behind"); ((Smoother *)sm)->prevEval[0] = xyz[0]; ((Smoother *)sm)->prevEval[1] = xyz[1]; #endif*/ @@ -238,7 +238,7 @@ boolean Smoother_Evaluate(Smoother const *sm, coord_t *xyz) xyz[VY] = now->xyz[VY]; xyz[VZ] = now->xyz[VZ]; /*#if _DEBUG - Con_Message("Smoother_Evaluate: stalling\n"); + Con_Message("Smoother_Evaluate: stalling"); ((Smoother *)sm)->prevEval[0] = xyz[0]; ((Smoother *)sm)->prevEval[1] = xyz[1]; #endif*/ @@ -260,7 +260,7 @@ boolean Smoother_Evaluate(Smoother const *sm, coord_t *xyz) if(dt > 0) { float diff[2] = { xyz[0] - sm->prevEval[0], xyz[1] - sm->prevEval[1] }; - Con_Message("Smoother_Evaluate: [%05.3f] diff = %+06.3f %+06.3f\n", dt, diff[0]/dt, diff[1]/dt); + Con_Message("Smoother_Evaluate: [%05.3f] diff = %+06.3f %+06.3f", dt, diff[0]/dt, diff[1]/dt); ((Smoother *)sm)->prevEval[0] = xyz[0]; ((Smoother *)sm)->prevEval[1] = xyz[1]; } diff --git a/doomsday/libdeng2/src/data/huffman.cpp b/doomsday/libdeng2/src/data/huffman.cpp index 8d6b4d6cb2..f21f24a8b0 100644 --- a/doomsday/libdeng2/src/data/huffman.cpp +++ b/doomsday/libdeng2/src/data/huffman.cpp @@ -190,11 +190,11 @@ struct Huffman LOG_MSG("%03i: (%07i) ", i, (int) (6e6 * freqs[i])); for(k = 0; k < huffCodes[i].length; ++k) { - Con_Message("%c", huffCodes[i].code & (1 << k) ? '1' : '0'); + Con_Printf("%c", huffCodes[i].code & (1 << k) ? '1' : '0'); } - Con_Message("\n"); + Con_Printf("\n"); } - Con_Message("realbits=%f, huffbits=%f (%f%%)\n", realBits, huffBits, + Con_Message("realbits=%f, huffbits=%f (%f%%)", realBits, huffBits, huffBits / realBits * 100); } #endif diff --git a/doomsday/plugins/common/src/am_map.c b/doomsday/plugins/common/src/am_map.c index c336dc0273..2a02de1158 100644 --- a/doomsday/plugins/common/src/am_map.c +++ b/doomsday/plugins/common/src/am_map.c @@ -255,7 +255,7 @@ static void initAutomapConfig(automapcfg_t* mcfg) void ST_InitAutomapConfig(void) { - VERBOSE2( Con_Message("Initializing automap...\n") ) + VERBOSE2( Con_Message("Initializing automap...") ) initAutomapConfig(&automapCFG); } diff --git a/doomsday/plugins/common/src/d_net.c b/doomsday/plugins/common/src/d_net.c index da58ec6754..3ac25d3548 100644 --- a/doomsday/plugins/common/src/d_net.c +++ b/doomsday/plugins/common/src/d_net.c @@ -290,14 +290,14 @@ long int D_NetPlayerEvent(int plrNumber, int peType, void *data) else if(plrNumber == CONSOLEPLAYER) { // We have arrived, the game should be begun. - Con_Message("PE: (client) arrived in netgame.\n"); + Con_Message("PE: (client) arrived in netgame."); G_ChangeGameState(GS_WAITING); showmsg = false; } else { // Client responds to new player? - Con_Message("PE: (client) player %i has arrived.\n", plrNumber); + Con_Message("PE: (client) player %i has arrived.", plrNumber); G_DoReborn(plrNumber); //players[plrNumber].playerstate = PST_REBORN; } @@ -313,7 +313,7 @@ long int D_NetPlayerEvent(int plrNumber, int peType, void *data) { AutoStr *str = AutoStr_New(); - Con_Message("PE: player %i has left.\n", plrNumber); + Con_Message("PE: player %i has left.", plrNumber); players[plrNumber].playerState = PST_GONE; @@ -367,7 +367,7 @@ int D_NetWorldEvent(int type, int parm, void* data) // the handshake packet(s) to update his world. // If 'data' is zero, this is a re-handshake that's used to // begin demos. - Con_Message("D_NetWorldEvent: Sending a %shandshake to player %i.\n", + Con_Message("D_NetWorldEvent: Sending a %shandshake to player %i.", newPlayer ? "" : "(re)", parm); // Mark new player for update. @@ -467,7 +467,7 @@ void D_HandlePacket(int fromplayer, int type, void *data, size_t length) { case GPT_GAME_STATE: #ifdef _DEBUG - Con_Message("Received GTP_GAME_STATE\n"); + Con_Message("Received GTP_GAME_STATE"); #endif NetCl_UpdateGameState(reader); @@ -496,7 +496,7 @@ void D_HandlePacket(int fromplayer, int type, void *data, size_t length) size_t len = 0; char *msg = 0; #ifdef _DEBUG - Con_Message("D_HandlePacket: GPT_MESSAGE\n"); + Con_Message("D_HandlePacket: GPT_MESSAGE"); #endif len = Reader_ReadUInt16(reader); msg = Z_Malloc(len + 1, PU_GAMESTATIC, 0); @@ -566,7 +566,7 @@ void D_HandlePacket(int fromplayer, int type, void *data, size_t length) int oldClass = plr->class_; plr->class_ = newClass; #ifdef _DEBUG - Con_Message("D_HandlePacket: Player %i class set to %i.\n", CONSOLEPLAYER, plr->class_); + Con_Message("D_HandlePacket: Player %i class set to %i.", CONSOLEPLAYER, plr->class_); #endif #if __JHERETIC__ if(oldClass != newClass) @@ -574,14 +574,14 @@ void D_HandlePacket(int fromplayer, int type, void *data, size_t length) if(newClass == PCLASS_CHICKEN) { #ifdef _DEBUG - Con_Message("D_HandlePacket: Player %i activating morph..\n", CONSOLEPLAYER); + Con_Message("D_HandlePacket: Player %i activating morph..", CONSOLEPLAYER); #endif P_ActivateMorphWeapon(plr); } else if(oldClass == PCLASS_CHICKEN) { #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: Player %i post-morph weapon %i.\n", CONSOLEPLAYER, plr->readyWeapon); + Con_Message("NetCl_UpdatePlayerState: Player %i post-morph weapon %i.", CONSOLEPLAYER, plr->readyWeapon); #endif // The morph has ended. P_PostMorphWeapon(plr, plr->readyWeapon); @@ -609,7 +609,7 @@ void D_HandlePacket(int fromplayer, int type, void *data, size_t length) break; default: - Con_Message("H_HandlePacket: Received unknown packet, type=%i.\n", type); + Con_Message("H_HandlePacket: Received unknown packet, type=%i.", type); } } @@ -842,7 +842,7 @@ D_CMD(SetMap) map = P_TranslateMapIfExists(map); if(map == P_INVALID_LOGICAL_MAP) { - Con_Message("Map not found.\n"); + Con_Message("Map not found."); return false; } #endif diff --git a/doomsday/plugins/common/src/d_netcl.c b/doomsday/plugins/common/src/d_netcl.c index f56504a7cc..1ce42ea644 100644 --- a/doomsday/plugins/common/src/d_netcl.c +++ b/doomsday/plugins/common/src/d_netcl.c @@ -80,7 +80,7 @@ void NetCl_UpdateGameState(Reader* msg) VERBOSE( AutoStr* str = Uri_ToString(mapUri); - Con_Message("NetCl_UpdateGameState: Flags=%x, Map uri=\"%s\"\n", gsFlags, Str_Text(str)); + Con_Message("NetCl_UpdateGameState: Flags=%x, Map uri=\"%s\"", gsFlags, Str_Text(str)); ) // Demo game state changes are only effective during demo playback. @@ -96,7 +96,7 @@ void NetCl_UpdateGameState(Reader* msg) DD_GameInfo(&gameInfo); if(strcmp(gameInfo.identityKey, gsGameIdentity)) { - Con_Message("NetCl_UpdateGameState: Server's game mode (%s) is different than yours (%s).\n", + Con_Message("NetCl_UpdateGameState: Server's game mode (%s) is different than yours (%s).", gsGameIdentity, gameInfo.identityKey); DD_Execute(false, "net disconnect"); return; @@ -111,21 +111,21 @@ void NetCl_UpdateGameState(Reader* msg) // Some statistics. #if __JHEXEN__ - Con_Message("Game state: Map=%u Skill=%i %s\n", gsMap+1, gsSkill, + Con_Message("Game state: Map=%u Skill=%i %s", gsMap+1, gsSkill, deathmatch == 1 ? "Deathmatch" : deathmatch == 2 ? "Deathmatch2" : "Co-op"); #else - Con_Message("Game state: Map=%u Episode=%u Skill=%i %s\n", gsMap+1, + Con_Message("Game state: Map=%u Episode=%u Skill=%i %s", gsMap+1, gsEpisode+1, gsSkill, deathmatch == 1 ? "Deathmatch" : deathmatch == 2 ? "Deathmatch2" : "Co-op"); #endif #if !__JHEXEN__ - Con_Message(" Respawn=%s Monsters=%s Jumping=%s Gravity=%.1f\n", + Con_Message(" Respawn=%s Monsters=%s Jumping=%s Gravity=%.1f", respawnMonsters ? "yes" : "no", !noMonstersParm ? "yes" : "no", gsJumping ? "yes" : "no", gsGravity); #else - Con_Message(" Monsters=%s Jumping=%s Gravity=%.1f\n", + Con_Message(" Monsters=%s Jumping=%s Gravity=%.1f", !noMonstersParm ? "yes" : "no", gsJumping ? "yes" : "no", gsGravity); #endif @@ -182,8 +182,8 @@ void NetCl_UpdateGameState(Reader* msg) float my = Reader_ReadFloat(msg); float mz = Reader_ReadFloat(msg); angle_t angle = Reader_ReadUInt32(msg); - Con_Message("NetCl_UpdateGameState: Got camera init, but player has no mobj.\n"); - Con_Message(" Pos=%f,%f,%f Angle=%x\n", mx, my, mz, angle); + Con_Message("NetCl_UpdateGameState: Got camera init, but player has no mobj."); + Con_Message(" Pos=%f,%f,%f Angle=%x", mx, my, mz, angle); } } @@ -207,7 +207,7 @@ void NetCl_MobjImpulse(Reader* msg) } #ifdef _DEBUG - Con_Message("NetCl_MobjImpulse: Player %i, clmobj %i\n", CONSOLEPLAYER, id); + Con_Message("NetCl_MobjImpulse: Player %i, clmobj %i", CONSOLEPLAYER, id); #endif // Apply to the local mobj. @@ -229,7 +229,7 @@ void NetCl_PlayerSpawnPosition(Reader* msg) angle = Reader_ReadUInt32(msg); #ifdef _DEBUG - Con_Message("NetCl_PlayerSpawnPosition: Got spawn position %f, %f, %f facing %x\n", + Con_Message("NetCl_PlayerSpawnPosition: Got spawn position %f, %f, %f facing %x", x, y, z, angle); #endif @@ -251,7 +251,7 @@ void NetCl_UpdatePlayerState2(Reader* msg, int plrNum) if(!Get(DD_GAME_READY)) { #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState2: Discarded because game isn't ready.\n"); + Con_Message("NetCl_UpdatePlayerState2: Discarded because game isn't ready."); #endif return; } @@ -291,7 +291,7 @@ void NetCl_UpdatePlayerState2(Reader* msg, int plrNum) #endif #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState2: New state = %s\n", + Con_Message("NetCl_UpdatePlayerState2: New state = %s", pl->playerState == PST_LIVE? "PST_LIVE" : pl->playerState == PST_DEAD? "PST_DEAD" : "PST_REBORN"); #endif @@ -306,7 +306,7 @@ void NetCl_UpdatePlayerState2(Reader* msg, int plrNum) // After being reborn, the server will tell us the new weapon. pl->plr->flags |= DDPF_UNDEFINED_WEAPON; #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState2: Player %i: Marking weapon as undefined.\n", (int)(pl - players)); + Con_Message("NetCl_UpdatePlayerState2: Player %i: Marking weapon as undefined.", (int)(pl - players)); #endif pl->plr->flags &= ~DDPF_DEAD; @@ -347,7 +347,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) /* #ifdef _DEBUG - VERBOSE( Con_Message("NetCl_UpdatePlayerState: fl=%x\n", flags) ); + VERBOSE( Con_Message("NetCl_UpdatePlayerState: fl=%x", flags) ); #endif */ @@ -385,7 +385,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) else { #if _DEBUG - Con_Message("FIXME: NetCl_UpdatePlayerState: Player mobj not yet allocated at this time, ignoring.\n"); + Con_Message("FIXME: NetCl_UpdatePlayerState: Player mobj not yet allocated at this time, ignoring."); #endif } } @@ -483,7 +483,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) if(val && i == PT_ALLMAP && plrNum == CONSOLEPLAYER) { #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: Revealing automap.\n"); + Con_Message("NetCl_UpdatePlayerState: Revealing automap."); #endif ST_RevealAutomap(plrNum, true); } @@ -580,7 +580,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) { P_Impulse(pl - players, CTL_WEAPON1 + weapon); #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: Weapon already known, using an impulse to switch to %i.\n", weapon); + Con_Message("NetCl_UpdatePlayerState: Weapon already known, using an impulse to switch to %i.", weapon); #endif } } @@ -588,7 +588,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) { pl->pendingWeapon = b & 0xf; #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: pendingweapon=%i\n", pl->pendingWeapon); + Con_Message("NetCl_UpdatePlayerState: pendingweapon=%i", pl->pendingWeapon); #endif } @@ -601,13 +601,13 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) { pl->readyWeapon = b >> 4; #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: readyweapon=%i\n", pl->readyWeapon); + Con_Message("NetCl_UpdatePlayerState: readyweapon=%i", pl->readyWeapon); #endif } else { #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: Readyweapon already known (%i), not setting server's value %i.\n", + Con_Message("NetCl_UpdatePlayerState: Readyweapon already known (%i), not setting server's value %i.", pl->readyWeapon, b >> 4); #endif } @@ -618,7 +618,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) if(!(pl->plr->flags & DDPF_UNDEFINED_WEAPON) && wasUndefined) { #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: Weapon was undefined, bringing it up now.\n"); + Con_Message("NetCl_UpdatePlayerState: Weapon was undefined, bringing it up now."); #endif // Bring it up now. @@ -636,7 +636,7 @@ void NetCl_UpdatePlayerState(Reader *msg, int plrNum) { pl->morphTics = Reader_ReadByte(msg) * 35; #ifdef _DEBUG - Con_Message("NetCl_UpdatePlayerState: Player %i morphtics = %i\n", plrNum, pl->morphTics); + Con_Message("NetCl_UpdatePlayerState: Player %i morphtics = %i", plrNum, pl->morphTics); #endif } #endif @@ -810,10 +810,10 @@ void NetCl_UpdatePlayerInfo(Reader *msg) players[num].class_ = cfg.playerClass[num]; #endif -#if __JDOOM__ || __JSTRIFE__ || __JDOOM64__ - Con_Message("NetCl_UpdatePlayerInfo: pl=%i color=%i\n", num, cfg.playerColor[num]); +#if __JDOOM__ || __JDOOM64__ + Con_Message("NetCl_UpdatePlayerInfo: pl=%i color=%i", num, cfg.playerColor[num]); #else - Con_Message("NetCl_UpdatePlayerInfo: pl=%i color=%i class=%i\n", num, cfg.playerColor[num], cfg.playerClass[num]); + Con_Message("NetCl_UpdatePlayerInfo: pl=%i color=%i class=%i", num, cfg.playerColor[num], cfg.playerClass[num]); #endif } @@ -903,7 +903,7 @@ void NetCl_UpdateJumpPower(Reader* msg) { netJumpPower = Reader_ReadFloat(msg); #ifdef _DEBUG - Con_Message("NetCl_UpdateJumpPower: %g\n", netJumpPower); + Con_Message("NetCl_UpdateJumpPower: %g", netJumpPower); #endif } @@ -919,7 +919,7 @@ void NetCl_FloorHitRequest(player_t* player) msg = D_NetWrite(); #ifdef _DEBUG - Con_Message("NetCl_FloorHitRequest: Player %i.\n", (int)(player - players)); + Con_Message("NetCl_FloorHitRequest: Player %i.", (int)(player - players)); #endif // Include the position and momentum of the hit. @@ -950,7 +950,7 @@ void NetCl_PlayerActionRequest(player_t *player, int actionType, int actionParam msg = D_NetWrite(); #ifdef _DEBUG - Con_Message("NetCl_PlayerActionRequest: Player %i, action %i.\n", + Con_Message("NetCl_PlayerActionRequest: Player %i, action %i.", (int)(player - players), actionType); #endif @@ -1009,7 +1009,7 @@ void NetCl_LocalMobjState(Reader* msg) if(!(mo = ClMobj_Find(mobjId))) { #ifdef _DEBUG - Con_Message("NetCl_LocalMobjState: ClMobj %i not found.\n", mobjId); + Con_Message("NetCl_LocalMobjState: ClMobj %i not found.", mobjId); return; #endif } @@ -1018,7 +1018,7 @@ void NetCl_LocalMobjState(Reader* msg) ClMobj_EnableLocalActions(mo, true); #ifdef _DEBUG - Con_Message("NetCl_LocalMobjState: ClMobj %i => state %i (target:%i, special1:%i)\n", + Con_Message("NetCl_LocalMobjState: ClMobj %i => state %i (target:%i, special1:%i)", mobjId, newState, targetId, special1); #endif @@ -1045,7 +1045,7 @@ void NetCl_DamageRequest(mobj_t* target, mobj_t* inflictor, mobj_t* source, int msg = D_NetWrite(); #ifdef _DEBUG - Con_Message("NetCl_DamageRequest: Damage %i on target=%i via inflictor=%i by source=%i.\n", + Con_Message("NetCl_DamageRequest: Damage %i on target=%i via inflictor=%i by source=%i.", damage, target->thinker.id, inflictor? inflictor->thinker.id : 0, source? source->thinker.id : 0); #endif diff --git a/doomsday/plugins/common/src/d_netsv.c b/doomsday/plugins/common/src/d_netsv.c index 1324f8742c..98af4348db 100644 --- a/doomsday/plugins/common/src/d_netsv.c +++ b/doomsday/plugins/common/src/d_netsv.c @@ -448,7 +448,7 @@ void NetSv_TellCycleRulesToPlayer(int destPlr) if(!cyclingMaps) return; #ifdef _DEBUG - Con_Message("NetSv_TellCycleRulesToPlayer: %i\n", destPlr); + Con_Message("NetSv_TellCycleRulesToPlayer: %i", destPlr); #endif // Get the rules of the current map. @@ -511,7 +511,7 @@ void NetSv_MapCycleTicker(void) if(map < 0) { // Hmm?! Abort cycling. - Con_Message("NetSv_CheckCycling: All of a sudden MapCycle is invalid!\n"); + Con_Message("NetSv_CheckCycling: All of a sudden MapCycle is invalid!"); DD_Execute(false, "endcycle"); return; } @@ -569,7 +569,7 @@ void NetSv_MapCycleTicker(void) if(map < 0) { // Hmm?! Abort cycling. - Con_Message("NetSv_CheckCycling: All of a sudden MapCycle is invalid!\n"); + Con_Message("NetSv_CheckCycling: All of a sudden MapCycle is invalid!"); DD_Execute(false, "endcycle"); return; } @@ -593,7 +593,7 @@ void NetSv_ResetPlayerFrags(int plrNum) player_t* plr = &players[plrNum]; #ifdef _DEBUG - Con_Message("NetSv_ResetPlayerFrags: Player %i.\n", plrNum); + Con_Message("NetSv_ResetPlayerFrags: Player %i.", plrNum); #endif memset(plr->frags, 0, sizeof(plr->frags)); @@ -614,7 +614,7 @@ void NetSv_NewPlayerEnters(int plrNum) { player_t* plr = &players[plrNum]; - Con_Message("NetSv_NewPlayerEnters: spawning player %i.\n", plrNum); + Con_Message("NetSv_NewPlayerEnters: spawning player %i.", plrNum); plr->playerState = PST_REBORN; // Force an init. @@ -638,7 +638,7 @@ void NetSv_NewPlayerEnters(int plrNum) { const mapspot_t* spot = &mapSpots[start->spot]; #ifdef _DEBUG - Con_Message("NetSv_NewPlayerEnters: Spawning player with angle:%x\n", spot->angle); + Con_Message("NetSv_NewPlayerEnters: Spawning player with angle:%x", spot->angle); #endif P_SpawnPlayer(plrNum, pClass, spot->origin[VX], spot->origin[VY], spot->origin[VZ], spot->angle, spot->flags, @@ -758,7 +758,7 @@ void NetSv_SendGameState(int flags, int to) // Print a short message that describes the game state. str = Uri_Resolved(mapUri); #ifdef _DEBUG - Con_Message("NetSv_SendGameState: Game setup: %s %s %s\n", + Con_Message("NetSv_SendGameState: Game setup: %s %s %s", gameInfo.identityKey, Str_Text(str), gameConfigString); #endif @@ -844,7 +844,7 @@ void NetSv_SendPlayerSpawnPosition(int plrNum, float x, float y, float z, int an if(!IS_SERVER) return; #ifdef _DEBUG - Con_Message("NetSv_SendPlayerSpawnPosition: Player #%i pos:[%g, %g, %g] angle:%x\n", + Con_Message("NetSv_SendPlayerSpawnPosition: Player #%i pos:[%g, %g, %g] angle:%x", plrNum, x, y, z, angle); #endif writer = D_NetWrite(); @@ -921,7 +921,7 @@ void NetSv_SendPlayerState(int srcPlrNum, int destPlrNum, int flags, boolean rel return; #ifdef _DEBUG - Con_Message("NetSv_SendPlayerState: src=%i, dest=%i, flags=%x\n", srcPlrNum, destPlrNum, flags); + Con_Message("NetSv_SendPlayerState: src=%i, dest=%i, flags=%x", srcPlrNum, destPlrNum, flags); #endif writer = D_NetWrite(); @@ -1101,7 +1101,7 @@ void NetSv_SendPlayerState(int srcPlrNum, int destPlrNum, int flags, boolean rel if(flags & PSF_MORPH_TIME) { #ifdef _DEBUG - Con_Message("NetSv_SendPlayerState: Player %i, sending morph tics as %i seconds.\n", srcPlrNum, (pl->morphTics + 34) / 35); + Con_Message("NetSv_SendPlayerState: Player %i, sending morph tics as %i seconds.", srcPlrNum, (pl->morphTics + 34) / 35); #endif // Send as seconds. Writer_WriteByte(writer, (pl->morphTics + 34) / 35); @@ -1132,7 +1132,7 @@ void NetSv_SendPlayerInfo(int whose, int to_whom) Writer_WriteByte(writer, whose); Writer_WriteByte(writer, cfg.playerColor[whose]); /*#ifdef _DEBUG - Con_Message("NetSv_SendPlayerInfo: To %i, player %i's color is %i.\n", to_whom, whose, cfg.playerColor[whose]); + Con_Message("NetSv_SendPlayerInfo: To %i, player %i's color is %i.", to_whom, whose, cfg.playerColor[whose]); #endif*/ #if __JHERETIC__ || __JHEXEN__ Writer_WriteByte(writer, cfg.playerClass[whose]); // current class @@ -1155,7 +1155,7 @@ void NetSv_ChangePlayerInfo(int from, Reader* msg) P_SetPlayerRespawnClass(from, newClass); // requesting class change? #ifdef _DEBUG - Con_Message("NetSv_ChangePlayerInfo: pl%i, col=%i, requested class=%i\n", + Con_Message("NetSv_ChangePlayerInfo: pl%i, col=%i, requested class=%i", from, cfg.playerColor[from], newClass); #endif @@ -1173,7 +1173,7 @@ void NetSv_ChangePlayerInfo(int from, Reader* msg) #ifdef _DEBUG if(pl->plr->mo) { - Con_Message("Player %i mo %i translation flags %x\n", from, pl->plr->mo->thinker.id, + Con_Message("Player %i mo %i translation flags %x", from, pl->plr->mo->thinker.id, (pl->plr->mo->flags & MF_TRANSLATION) >> MF_TRANSSHIFT); } #endif @@ -1265,7 +1265,7 @@ void NetSv_SendPlayerClass(int plrNum, char cls) Writer* writer; #ifdef _DEBUG - Con_Message("NetSv_SendPlayerClass: Player %i has class %i.\n", plrNum, cls); + Con_Message("NetSv_SendPlayerClass: Player %i has class %i.", plrNum, cls); #endif writer = D_NetWrite(); Writer_WriteByte(writer, cls); @@ -1376,7 +1376,7 @@ static void NetSv_FireWeaponCallback(mobj_t* mo, void* param) static void NetSv_HitFloorCallback(mobj_t* mo, void* param) { #ifdef _DEBUG - Con_Message("NetSv_HitFloorCallback: mo %i\n", mo->thinker.id); + Con_Message("NetSv_HitFloorCallback: mo %i", mo->thinker.id); #endif P_HitFloor(mo); } @@ -1428,7 +1428,7 @@ void NetSv_DoAction(int player, Reader* msg) #ifdef _DEBUG Con_Message("NetSv_DoAction: player=%i, type=%i, xyz=(%.1f,%.1f,%.1f)\n " - "angle=%x lookDir=%g weapon=%i\n", + "angle=%x lookDir=%g weapon=%i", player, type, pos[VX], pos[VY], pos[VZ], angle, lookDir, actionParam); #endif @@ -1440,7 +1440,7 @@ void NetSv_DoAction(int player, Reader* msg) if(type == GPA_USE || type == GPA_FIRE) { #ifdef _DEBUG - Con_Message("NetSv_DoAction: Intermission accelerate.\n"); + Con_Message("NetSv_DoAction: Intermission accelerate."); #endif IN_SkipToNext(); } @@ -1521,7 +1521,7 @@ void NetSv_DoDamage(int player, Reader* msg) thid_t source = Reader_ReadUInt16(msg); #ifdef _DEBUG - Con_Message("NetSv_DoDamage: Client %i requests damage %i on %i via %i by %i.\n", + Con_Message("NetSv_DoDamage: Client %i requests damage %i on %i via %i by %i.", player, damage, target, inflictor, source); #endif @@ -1581,7 +1581,7 @@ void NetSv_SendMessageEx(int plrNum, const char *msg, boolean yellow) return; #ifdef _DEBUG - Con_Message("NetSv_SendMessageEx: Message '%s'\n", msg); + Con_Message("NetSv_SendMessageEx: Message '%s'", msg); #endif if(plrNum == DDSP_ALL_PLAYERS) @@ -1617,7 +1617,7 @@ void NetSv_MaybeChangeWeapon(int plrNum, int weapon, int ammo, int force) return; #ifdef _DEBUG - Con_Message("NetSv_MaybeChangeWeapon: Plr=%i Weapon=%i Ammo=%i Force=%i\n", + Con_Message("NetSv_MaybeChangeWeapon: Plr=%i Weapon=%i Ammo=%i Force=%i", plrNum, weapon, ammo, force); #endif diff --git a/doomsday/plugins/common/src/fi_lib.c b/doomsday/plugins/common/src/fi_lib.c index b70fa3e6e0..abddaa128b 100644 --- a/doomsday/plugins/common/src/fi_lib.c +++ b/doomsday/plugins/common/src/fi_lib.c @@ -153,7 +153,7 @@ static fi_state_t* stateForFinaleId(finaleid_t id) if(remoteFinaleState.finaleId) { #ifdef _DEBUG - VERBOSE2( Con_Message("stateForFinaleId: Finale %i is remote, using server's state (id %i).\n", + VERBOSE2( Con_Message("stateForFinaleId: Finale %i is remote, using server's state (id %i).", id, remoteFinaleState.finaleId) ); #endif return &remoteFinaleState; @@ -239,7 +239,7 @@ void NetCl_UpdateFinaleState(Reader* msg) } #ifdef _DEBUG - Con_Message("NetCl_FinaleState: Updated finale %i: mode %i, secret=%i, leave_hud=%i\n", + Con_Message("NetCl_FinaleState: Updated finale %i: mode %i, secret=%i, leave_hud=%i", s->finaleId, s->mode, s->conditions.secret, s->conditions.leave_hub); #endif } @@ -292,7 +292,7 @@ void FI_StackExecuteWithId(const char* scriptSrc, int flags, finale_mode_t mode, // Should we ignore this? if(defId && stackHasDefId(defId)) { - Con_Message("There already is a finale running with ID \"%s\"; won't execute again.\n", defId); + Con_Message("There already is a finale running with ID \"%s\"; won't execute again.", defId); return; } @@ -425,7 +425,7 @@ int Hook_FinaleScriptStop(int hookType, int finaleId, void* parameters) if(IS_CLIENT && s == &remoteFinaleState) { #ifdef _DEBUG - Con_Message("Hook_FinaleScriptStop: Clientside script stopped, clearing remote state.\n"); + Con_Message("Hook_FinaleScriptStop: Clientside script stopped, clearing remote state."); memset(&remoteFinaleState, 0, sizeof(remoteFinaleState)); #endif return true; diff --git a/doomsday/plugins/common/src/g_controls.c b/doomsday/plugins/common/src/g_controls.c index 64e9c6d0dc..c31cb92c0b 100644 --- a/doomsday/plugins/common/src/g_controls.c +++ b/doomsday/plugins/common/src/g_controls.c @@ -409,7 +409,7 @@ void G_RegisterBindClasses(void) /* uint i; - Con_Message("G_PreInit: Registering Bind Classes...\n"); + Con_Message("G_PreInit: Registering Bind Classes..."); for(i = 0; BindClasses[i].name; ++i) DD_AddBindClass(BindClasses + i); diff --git a/doomsday/plugins/common/src/g_game.c b/doomsday/plugins/common/src/g_game.c index 6e5366b8a0..5336ba70e4 100644 --- a/doomsday/plugins/common/src/g_game.c +++ b/doomsday/plugins/common/src/g_game.c @@ -703,7 +703,7 @@ void R_LoadColorPalettes(void) name[7] = 'A' + idx - 10; idx++; #ifdef _DEBUG - Con_Message("Reading translation table '%s' as tclass=%i tmap=%i.\n", name, cl, i); + Con_Message("Reading translation table '%s' as tclass=%i tmap=%i.", name, cl, i); #endif if(-1 != (lumpNum = W_CheckLumpNumForName(name))) { @@ -891,7 +891,7 @@ void R_InitRefresh(void) { if(IS_DEDICATED) return; - VERBOSE( Con_Message("R_InitRefresh: Loading data for referesh.\n") ); + VERBOSE( Con_Message("R_InitRefresh: Loading data for referesh.") ); // Setup the view border. cfg.screenBlocks = cfg.setBlocks; @@ -931,17 +931,17 @@ void R_InitHud(void) Hu_LoadData(); #if __JHERETIC__ || __JHEXEN__ - VERBOSE( Con_Message("Initializing inventory...\n") ) + VERBOSE( Con_Message("Initializing inventory...") ) Hu_InventoryInit(); #endif - VERBOSE2( Con_Message("Initializing statusbar...\n") ) + VERBOSE2( Con_Message("Initializing statusbar...") ) ST_Init(); - VERBOSE2( Con_Message("Initializing menu...\n") ) + VERBOSE2( Con_Message("Initializing menu...") ) Hu_MenuInit(); - VERBOSE2( Con_Message("Initializing status-message/question system...\n") ) + VERBOSE2( Con_Message("Initializing status-message/question system...") ) Hu_MsgInit(); } @@ -963,10 +963,10 @@ void G_CommonPostInit(void) XG_ReadTypes(); #endif - VERBOSE( Con_Message("Initializing playsim...\n") ) + VERBOSE( Con_Message("Initializing playsim...") ) P_Init(); - VERBOSE( Con_Message("Initializing head-up displays...\n") ) + VERBOSE( Con_Message("Initializing head-up displays...") ) R_InitHud(); G_InitEventSequences(); @@ -1086,7 +1086,7 @@ void G_ChangeGameState(gamestate_t state) { #if _DEBUG // Log gamestate changes in debug builds, with verbose. - Con_Message("G_ChangeGameState: New state %s.\n", getGameStateStr(state)); + Con_Message("G_ChangeGameState: New state %s.", getGameStateStr(state)); #endif gameState = state; } @@ -1167,7 +1167,7 @@ void G_StartHelp(void) G_StartFinale(fin.script, FF_LOCAL, FIMODE_NORMAL, "help"); return; } - Con_Message("Warning: InFine script 'help' not defined, ignoring.\n"); + Con_Message("Warning: InFine script 'help' not defined, ignoring."); } /** @@ -1715,7 +1715,7 @@ static void rebornPlayers(void) // Let's get rid of the mobj. #ifdef _DEBUG - Con_Message("rebornPlayers: Removing player %i's mobj.\n", i); + Con_Message("rebornPlayers: Removing player %i's mobj.", i); #endif P_MobjRemove(mo, true); ddplr->mo = NULL; @@ -2081,7 +2081,7 @@ void G_PlayerReborn(int player) int k; for(k = 0; k < NUM_WEAPON_TYPES; ++k) { - Con_Message("Player %i owns wpn %i: %i\n", player, k, p->weapons[k].owned); + Con_Message("Player %i owns wpn %i: %i", player, k, p->weapons[k].owned); } } #endif @@ -2863,7 +2863,7 @@ boolean G_LoadGame(int slot) if(!SV_IsSlotUsed(slot)) { - Con_Message("Warning:G_LoadGame: Save slot #%i is not in use, aborting load.\n", slot); + Con_Message("Warning:G_LoadGame: Save slot #%i is not in use, aborting load.", slot); return false; } @@ -3697,7 +3697,7 @@ void G_DoScreenShot(void) return; } - Con_Message("Failed to write screenshot \"%s\".\n", fileName? F_PrettyPath(Str_Text(fileName)) : "(null)"); + Con_Message("Failed to write screenshot \"%s\".", fileName? F_PrettyPath(Str_Text(fileName)) : "(null)"); } static void openLoadMenu(void) @@ -3790,7 +3790,7 @@ D_CMD(LoadGame) } // Clearly the caller needs some assistance... - Con_Message("Failed to determine game-save slot from \"%s\"\n", argv[1]); + Con_Message("Failed to determine game-save slot from \"%s\"", argv[1]); // We'll open the load menu if caller is the console. // Reasoning: User attempted to load a named game-save however the name @@ -3798,7 +3798,7 @@ D_CMD(LoadGame) // the user to see the names of the known game-saves. if(CMDS_CONSOLE == src) { - Con_Message("Opening game-save load menu...\n"); + Con_Message("Opening game-save load menu..."); openLoadMenu(); return true; } @@ -3836,7 +3836,7 @@ D_CMD(SaveGame) if(IS_CLIENT || IS_NETWORK_SERVER) { - Con_Message("Network savegames are not supported at the moment.\n"); + Con_Message("Network savegames are not supported at the moment."); return false; } @@ -3896,9 +3896,9 @@ D_CMD(SaveGame) // Clearly the caller needs some assistance... if(!SV_IsValidSlot(slot)) - Con_Message("Failed to determine game-save slot from \"%s\".\n", argv[1]); + Con_Message("Failed to determine game-save slot from \"%s\".", argv[1]); else - Con_Message("Game-save slot #%i is non-user-writable.\n", slot); + Con_Message("Game-save slot #%i is non-user-writable.", slot); // No action means the command failed. return false; @@ -3978,9 +3978,9 @@ D_CMD(DeleteGameSave) // Clearly the caller needs some assistance... if(!SV_IsValidSlot(slot)) - Con_Message("Failed to determine game-save slot from \"%s\".\n", argv[1]); + Con_Message("Failed to determine game-save slot from \"%s\".", argv[1]); else - Con_Message("Game-save slot #%i is non-user-writable.\n", slot); + Con_Message("Game-save slot #%i is non-user-writable.", slot); // No action means the command failed. return false; @@ -4006,7 +4006,7 @@ D_CMD(CycleTextureGamma) D_CMD(ListMaps) { - Con_Message("Available maps:\n"); + Con_Message("Available maps:"); G_PrintMapList(); return true; } diff --git a/doomsday/plugins/common/src/hu_automap.c b/doomsday/plugins/common/src/hu_automap.c index a01d2cdb56..45073aedc1 100644 --- a/doomsday/plugins/common/src/hu_automap.c +++ b/doomsday/plugins/common/src/hu_automap.c @@ -169,7 +169,7 @@ static void calcViewScaleFactors(uiwidget_t* obj) am->maxScaleMTOF = Rect_Height(UIWidget_Geometry(obj)) / am->minScale; #ifdef _DEBUG - VERBOSE2( Con_Message("calcViewScaleFactors: dx=%f dy=%f dist=%f w=%i h=%i a=%f b=%f minmtof=%f\n", + VERBOSE2( Con_Message("calcViewScaleFactors: dx=%f dy=%f dist=%f w=%i h=%i a=%f b=%f minmtof=%f", dx, dy, dist, Rect_Width(UIWidget_Geometry(obj)), Rect_Height(UIWidget_Geometry(obj)), a, b, am->minScaleMTOF) ); #endif @@ -1876,7 +1876,7 @@ void UIAutomap_UpdateGeometry(uiwidget_t* obj) R_ViewWindowGeometry(UIWidget_Player(obj), &newGeom); /*#ifdef _DEBUG - Con_Message("UIAutomap_UpdateGeometry: newGeom %i,%i %i,%i current %i,%i %i,%i\n", + Con_Message("UIAutomap_UpdateGeometry: newGeom %i,%i %i,%i current %i,%i %i,%i", newGeom.origin.x, newGeom.origin.y, newGeom.size.width, newGeom.size.height, Rect_X(obj->geometry), Rect_Y(obj->geometry), Rect_Width(obj->geometry), Rect_Height(obj->geometry)); @@ -2287,7 +2287,7 @@ void UIAutomap_SetWorldBounds(uiwidget_t* obj, coord_t lowX, coord_t hiX, coord_ calcViewScaleFactors(obj); #ifdef _DEBUG - Con_Message("SetWorldBounds: low=%f,%f hi=%f,%f minScaleMTOF=%f\n", lowX, lowY, hiX, hiY, + Con_Message("SetWorldBounds: low=%f,%f hi=%f,%f minScaleMTOF=%f", lowX, lowY, hiX, hiY, am->minScaleMTOF); #endif diff --git a/doomsday/plugins/common/src/hu_lib.c b/doomsday/plugins/common/src/hu_lib.c index 7c98e60bb0..c92a904d62 100644 --- a/doomsday/plugins/common/src/hu_lib.c +++ b/doomsday/plugins/common/src/hu_lib.c @@ -324,7 +324,7 @@ void UIGroup_AddWidget(uiwidget_t* obj, uiwidget_t* other) if(!other || other == obj) { #if _DEBUG - Con_Message("Warning:UIGroup::AddWidget: Attempt to add invalid widget %s, ignoring.\n", obj? "(this)" : "(null)"); + Con_Message("Warning: UIGroup::AddWidget: Attempt to add invalid widget %s, ignoring.", obj? "(this)" : "(null)"); #endif return; } @@ -1297,7 +1297,7 @@ void MNPage_Refocus(mn_page_t* page) #if _DEBUG else { - Con_Message("Warning:MNPage::Refocus: No focusable object on page.\n"); + Con_Message("Warning: MNPage::Refocus: No focusable object on page."); } #endif } @@ -1403,7 +1403,7 @@ void MNPage_SetPredefinedFont(mn_page_t* page, mn_page_fontid_t id, fontid_t fon if(!VALID_MNPAGE_FONTID(id)) { #if _DEBUG - Con_Message("MNPage::SetPredefinedFont: Invalid font id #%i, ignoring.\n", id); + Con_Message("MNPage::SetPredefinedFont: Invalid font id #%i, ignoring.", id); #endif return; } diff --git a/doomsday/plugins/common/src/hu_menu.c b/doomsday/plugins/common/src/hu_menu.c index a7ba06c961..28f2c08298 100644 --- a/doomsday/plugins/common/src/hu_menu.c +++ b/doomsday/plugins/common/src/hu_menu.c @@ -4410,7 +4410,7 @@ mn_page_t* Hu_MenuNewPage(const char* name, const Point2Raw* origin, int flags, if(!name || !name[0]) { #if _DEBUG - Con_Message("Warning: Hu_MenuNewPage: Attempt to create page with invalid name '%s', ignoring.\n", name); + Con_Message("Warning: Hu_MenuNewPage: Attempt to create page with invalid name '%s', ignoring.", name); #endif return NULL; } diff --git a/doomsday/plugins/common/src/m_ctrl.c b/doomsday/plugins/common/src/m_ctrl.c index 01f95e7211..1373e5eed5 100644 --- a/doomsday/plugins/common/src/m_ctrl.c +++ b/doomsday/plugins/common/src/m_ctrl.c @@ -271,7 +271,7 @@ void Hu_MenuInitControlsPage(void) mndata_text_t* texts; mn_page_t* page; - VERBOSE( Con_Message("Hu_MenuInitControlsPage: Creating controls items.\n") ) + VERBOSE( Con_Message("Hu_MenuInitControlsPage: Creating controls items.") ) textCount = 0; bindingsCount = 0; @@ -714,7 +714,7 @@ int MNBindings_PrivilegedResponder(mn_object_t* obj, event_t* ev) if((!strcmp(bindContext, "menu") || !strcmp(bindContext, "shortcut")) && !strcmp(symbol + 5, "key-delete-down")) { - Con_Message("The Delete key in the Menu context is reserved for deleting bindings.\n"); + Con_Message("The Delete key in the Menu context is reserved for deleting bindings."); return false; } } @@ -790,7 +790,7 @@ int MNBindings_PrivilegedResponder(mn_object_t* obj, event_t* ev) sprintf(cmd, "bindcontrol {%s} {%s%s}", binds->controlName, temp3, extra); } - VERBOSE( Con_Message("MNBindings_PrivilegedResponder: %s\n", cmd) ); + VERBOSE( Con_Message("MNBindings_PrivilegedResponder: %s", cmd) ); DD_Execute(true, cmd); // We've finished the grab. diff --git a/doomsday/plugins/common/src/p_inventory.c b/doomsday/plugins/common/src/p_inventory.c index 84ded2cc72..69a92e2c21 100644 --- a/doomsday/plugins/common/src/p_inventory.c +++ b/doomsday/plugins/common/src/p_inventory.c @@ -580,7 +580,7 @@ int P_InventoryUse(int player, inventoryitemtype_t type, int silent) inv = &inventories[player]; #ifdef _DEBUG - Con_Message("P_InventoryUse: Player %i using item %i\n", player, type); + Con_Message("P_InventoryUse: Player %i using item %i", player, type); #endif if(IS_CLIENT) diff --git a/doomsday/plugins/common/src/p_map.c b/doomsday/plugins/common/src/p_map.c index de6d33e09f..042281ad57 100644 --- a/doomsday/plugins/common/src/p_map.c +++ b/doomsday/plugins/common/src/p_map.c @@ -1255,7 +1255,7 @@ boolean P_CheckPositionXYZ(mobj_t* thing, coord_t x, coord_t y, coord_t z) #if _DEBUG VERBOSE2( if(thing->onMobj) - Con_Message("thing->onMobj = %p/%i (solid:%i) [thing:%p/%i]\n", thing->onMobj, + Con_Message("thing->onMobj = %p/%i (solid:%i) [thing:%p/%i]", thing->onMobj, thing->onMobj->thinker.id, (thing->onMobj->flags & MF_SOLID)!=0, thing, thing->thinker.id) @@ -1581,7 +1581,7 @@ static boolean P_TryMove2(mobj_t* thing, coord_t x, coord_t y, boolean dropoff) #ifdef _DEBUG if(!IS_CLIENT && thing->player) { - Con_Message("P_TryMove2: Mobj %i crossing line %i from %f,%f to %f,%f\n", + Con_Message("P_TryMove2: Mobj %i crossing line %i from %f,%f to %f,%f", thing->thinker.id, P_ToIndex(ld), oldpos[VX], oldpos[VY], thing->origin[VX], thing->origin[VY]); @@ -1867,7 +1867,7 @@ int PTR_ShootTraverse(const intercept_t* in, void* parameters) } /* if(lineWasHit) - Con_Message("Hit line [%i,%i]\n", P_GetIntp(li, DMU_SIDEDEF0), P_GetIntp(li, DMU_SIDEDEF1)); + Con_Message("Hit line [%i,%i]", P_GetIntp(li, DMU_SIDEDEF0), P_GetIntp(li, DMU_SIDEDEF1)); */ #endif // Don't go any farther. @@ -2405,7 +2405,7 @@ void P_UseLines(player_t* player) if(IS_CLIENT) { #ifdef _DEBUG - Con_Message("P_UseLines: Sending a use request for player %i.\n", (int) (player - players)); + Con_Message("P_UseLines: Sending a use request for player %i.", (int) (player - players)); #endif NetCl_PlayerActionRequest(player, GPA_USE, 0); return; @@ -2714,7 +2714,7 @@ void P_SlideMove(mobj_t* mo) // Didn't move? if(mo->player && mo->origin[VX] == oldPos[VX] && mo->origin[VY] == oldPos[VY]) { - Con_Message("P_SlideMove: Mobj pos stays the same.\n"); + Con_Message("P_SlideMove: Mobj pos stays the same."); } #endif } diff --git a/doomsday/plugins/common/src/p_mapsetup.c b/doomsday/plugins/common/src/p_mapsetup.c index b9a23bba9c..c13d47bd19 100644 --- a/doomsday/plugins/common/src/p_mapsetup.c +++ b/doomsday/plugins/common/src/p_mapsetup.c @@ -554,7 +554,7 @@ static void loadMapSpots(void) if(numDMStarts < playerCount) { - Con_Message("P_SetupMap: Player count (%i) exceeds deathmatch spots (%i).\n", playerCount, numDMStarts); + Con_Message("P_SetupMap: Player count (%i) exceeds deathmatch spots (%i).", playerCount, numDMStarts); } } } @@ -593,7 +593,7 @@ static void spawnMapObjects(void) } /*#if _DEBUG - Con_Message("spawning x:[%g, %g, %g] angle:%i ednum:%i flags:%i\n", + Con_Message("spawning x:[%g, %g, %g] angle:%i ednum:%i flags:%i", spot->pos[VX], spot->pos[VY], spot->pos[VZ], spot->angle, spot->doomedNum, spot->flags); #endif*/ @@ -628,7 +628,7 @@ static void spawnMapObjects(void) } else { - Con_Message("Warning: Unknown DoomEdNum %i at [%g, %g, %g].\n", spot->doomEdNum, + Con_Message("Warning: Unknown DoomEdNum %i at [%g, %g, %g].", spot->doomEdNum, spot->origin[VX], spot->origin[VY], spot->origin[VZ]); } } diff --git a/doomsday/plugins/common/src/p_player.c b/doomsday/plugins/common/src/p_player.c index 4af9ed9cfb..608b862400 100644 --- a/doomsday/plugins/common/src/p_player.c +++ b/doomsday/plugins/common/src/p_player.c @@ -427,7 +427,7 @@ weapontype_t P_MaybeChangeWeapon(player_t *player, weapontype_t weapon, } #ifdef _DEBUG - Con_Message("P_MaybeChangeWeapon: plr %i, weapon %i, ammo %i, force %i\n", + Con_Message("P_MaybeChangeWeapon: plr %i, weapon %i, ammo %i, force %i", (int)(player - players), weapon, ammo, force); #endif @@ -590,7 +590,7 @@ weapontype_t P_MaybeChangeWeapon(player_t *player, weapontype_t weapon, if(returnval != WT_NOCHANGE) { #ifdef _DEBUG - Con_Message("P_MaybeChangeWeapon: Decided to change to weapon %i.\n", returnval); + Con_Message("P_MaybeChangeWeapon: Decided to change to weapon %i.", returnval); #endif player->pendingWeapon = returnval; diff --git a/doomsday/plugins/common/src/p_saveg.c b/doomsday/plugins/common/src/p_saveg.c index b4542b5968..da18416984 100644 --- a/doomsday/plugins/common/src/p_saveg.c +++ b/doomsday/plugins/common/src/p_saveg.c @@ -622,7 +622,7 @@ void SV_ClearSlot(int slot) #endif { AutoStr* ident = SV_ComposeSlotIdentifier(slot); - Con_Message("Clearing save slot %s\n", Str_Text(ident)); + Con_Message("Clearing save slot %s", Str_Text(ident)); } { int i; @@ -850,7 +850,7 @@ void SV_CopySlot(int sourceSlot, int destSlot) if(!SV_IsValidSlot(sourceSlot)) { #if _DEBUG - Con_Message("Warning: SV_CopySlot: Source slot %i invalid, save game not copied.\n", sourceSlot); + Con_Message("Warning: SV_CopySlot: Source slot %i invalid, save game not copied.", sourceSlot); #endif return; } @@ -858,7 +858,7 @@ void SV_CopySlot(int sourceSlot, int destSlot) if(!SV_IsValidSlot(destSlot)) { #if _DEBUG - Con_Message("Warning: SV_CopySlot: Dest slot %i invalid, save game not copied.\n", destSlot); + Con_Message("Warning: SV_CopySlot: Dest slot %i invalid, save game not copied.", destSlot); #endif return; } @@ -1115,7 +1115,7 @@ mobj_t* SV_GetArchiveThing(int thingid, void *address) if(thingid < 1 || (uint) thingid > thingArchiveSize) { - Con_Message("SV_GetArchiveThing: Invalid NUM %i??\n", thingid); + Con_Message("SV_GetArchiveThing: Invalid NUM %i??", thingid); return NULL; } @@ -5376,11 +5376,11 @@ boolean SV_LoadGame(int slot) path = composeGameSavePathForSlot(slot); if(Str_IsEmpty(path)) { - Con_Message("Warning: Path \"%s\" is unreachable, game not loaded.\n", SV_SavePath()); + Con_Message("Warning: Path \"%s\" is unreachable, game not loaded.", SV_SavePath()); return false; } - VERBOSE( Con_Message("Attempting load of game-save slot #%i...\n", slot) ) + VERBOSE( Con_Message("Attempting load of game-save slot #%i...", slot) ) #if __JHEXEN__ // Copy all needed save files to the base slot. @@ -5401,7 +5401,7 @@ boolean SV_LoadGame(int slot) } else { - Con_Message("Warning: Failed loading game-save slot #%i.\n", slot); + Con_Message("Warning: Failed loading game-save slot #%i.", slot); } return !loadError; @@ -5425,7 +5425,7 @@ void SV_SaveGameClient(uint gameId) gameSavePath = composeGameSavePathForClientGameId(gameId); if(!SV_OpenFile(Str_Text(gameSavePath), "wp")) { - Con_Message("Warning:SV_SaveGameClient: Failed opening \"%s\" for writing.\n", Str_Text(gameSavePath)); + Con_Message("Warning: SV_SaveGameClient: Failed opening \"%s\" for writing.", Str_Text(gameSavePath)); return; } @@ -5483,7 +5483,7 @@ void SV_LoadGameClient(uint gameId) gameSavePath = composeGameSavePathForClientGameId(gameId); if(!SV_OpenFile(Str_Text(gameSavePath), "rp")) { - Con_Message("Warning:SV_LoadGameClient: Failed opening \"%s\" for reading.\n", Str_Text(gameSavePath)); + Con_Message("Warning: SV_LoadGameClient: Failed opening \"%s\" for reading.", Str_Text(gameSavePath)); return; } @@ -5495,7 +5495,7 @@ void SV_LoadGameClient(uint gameId) { SaveInfo_Delete(saveInfo); SV_CloseFile(); - Con_Message("SV_LoadGameClient: Bad magic!\n"); + Con_Message("SV_LoadGameClient: Bad magic!"); return; } @@ -5566,7 +5566,7 @@ static void unarchiveMap(void) bufferSize = M_ReadFile(Str_Text(path), (char**)&saveBuffer); if(0 == bufferSize) { - Con_Message("Warning:unarchiveMap: Failed opening \"%s\" for reading.\n", Str_Text(path)); + Con_Message("Warning: unarchiveMap: Failed opening \"%s\" for reading.", Str_Text(path)); return; } @@ -5585,7 +5585,7 @@ static void unarchiveMap(void) static int saveStateWorker(const char* path, SaveInfo* saveInfo) { #if _DEBUG - VERBOSE( Con_Message("SV_SaveGame: Attempting save game to \"%s\".\n", path) ) + VERBOSE( Con_Message("SV_SaveGame: Attempting save game to \"%s\".", path) ) #endif if(!openGameSaveFile(path, true)) @@ -5693,19 +5693,19 @@ boolean SV_SaveGame(int slot, const char* name) if(!SV_IsValidSlot(slot)) { - Con_Message("Warning: Invalid slot '%i' specified, game not saved.\n", slot); + Con_Message("Warning: Invalid slot '%i' specified, game not saved.", slot); return false; } if(!name[0]) { - Con_Message("Warning: Empty name specified for slot #%i, game not saved.\n", slot); + Con_Message("Warning: Empty name specified for slot #%i, game not saved.", slot); return false; } path = composeGameSavePathForSlot(logicalSlot); if(Str_IsEmpty(path)) { - Con_Message("Warning: Path \"%s\" is unreachable, game not saved.\n", SV_SavePath()); + Con_Message("Warning: Path \"%s\" is unreachable, game not saved.", SV_SavePath()); return false; } @@ -5732,7 +5732,7 @@ boolean SV_SaveGame(int slot, const char* name) if(saveError == SV_INVALIDFILENAME) { - Con_Message("Warning: Failed opening \"%s\" for writing.\n", Str_Text(path)); + Con_Message("Warning: Failed opening \"%s\" for writing.", Str_Text(path)); } } diff --git a/doomsday/plugins/common/src/p_saveio.c b/doomsday/plugins/common/src/p_saveio.c index db9c5a3ad7..c1c2fb5d93 100644 --- a/doomsday/plugins/common/src/p_saveio.c +++ b/doomsday/plugins/common/src/p_saveio.c @@ -136,8 +136,8 @@ void SV_ConfigureSavePaths(void) savePathExists = false; #endif if(!savePathExists) - Con_Message("Warning:configureSavePaths: Failed to locate \"%s\"\nPerhaps it could " - "not be created (insufficent permissions?). Saving will not be possible.\n", + Con_Message("Warning: configureSavePaths: Failed to locate \"%s\"\nPerhaps it could " + "not be created (insufficent permissions?). Saving will not be possible.", Str_Text(&savePath)); } } @@ -192,7 +192,7 @@ void SV_CopyFile(const Str* srcPath, const Str* destPath) length = M_ReadFile(Str_Text(srcPath), &buffer); if(0 == length) { - Con_Message("Warning: SV_CopyFile: Failed opening \"%s\" for reading.\n", Str_Text(srcPath)); + Con_Message("Warning: SV_CopyFile: Failed opening \"%s\" for reading.", Str_Text(srcPath)); return; } diff --git a/doomsday/plugins/common/src/p_sound.c b/doomsday/plugins/common/src/p_sound.c index 44cda33d36..7fffffbbb8 100644 --- a/doomsday/plugins/common/src/p_sound.c +++ b/doomsday/plugins/common/src/p_sound.c @@ -36,7 +36,7 @@ void S_MapMusic(uint episode, uint map) // Update the 'currentmap' music definition. - VERBOSE( Con_Message("S_MapMusic: Ep %i, map %i, lump %s\n", episode, map, P_GetMapSongLump(map)) ) + VERBOSE( Con_Message("S_MapMusic: Ep %i, map %i, lump %s", episode, map, P_GetMapSongLump(map)) ) Def_Set(DD_DEF_MUSIC, idx, DD_LUMP, P_GetMapSongLump(map)); Def_Set(DD_DEF_MUSIC, idx, DD_CD_TRACK, &cdTrack); diff --git a/doomsday/plugins/common/src/p_start.c b/doomsday/plugins/common/src/p_start.c index 109e13d112..419f48e365 100644 --- a/doomsday/plugins/common/src/p_start.c +++ b/doomsday/plugins/common/src/p_start.c @@ -158,7 +158,7 @@ void P_SetPlayerRespawnClass(int plrNum, playerclass_t pc) playerRespawnAsClass[plrNum] = pc; #ifdef _DEBUG - Con_Message("SetPlayerRespawnClass: plrNum=%i class=%i\n", plrNum, pc); + Con_Message("SetPlayerRespawnClass: plrNum=%i class=%i", plrNum, pc); #endif } @@ -171,7 +171,7 @@ playerclass_t P_ClassForPlayerWhenRespawning(int plrNum, boolean clear) #endif #ifdef _DEBUG - Con_Message("ClassForPlayerWhenRespawning: plrNum=%i reqclass=%i\n", plrNum, playerRespawnAsClass[plrNum]); + Con_Message("ClassForPlayerWhenRespawning: plrNum=%i reqclass=%i", plrNum, playerRespawnAsClass[plrNum]); #endif if(playerRespawnAsClass[plrNum] != -1) @@ -184,7 +184,7 @@ playerclass_t P_ClassForPlayerWhenRespawning(int plrNum, boolean clear) } } #ifdef _DEBUG - Con_Message("ClassForPlayerWhenRespawning: plrNum=%i actualclass=%i\n", plrNum, pClass); + Con_Message("ClassForPlayerWhenRespawning: plrNum=%i actualclass=%i", plrNum, pClass); #endif return pClass; @@ -389,7 +389,7 @@ void P_DealPlayerStarts(uint entryPoint) if(!numPlayerStarts) { - Con_Message("Warning: Zero player starts found, players will spawn as cameras.\n"); + Con_Message("Warning: Zero player starts found, players will spawn as cameras."); return; } @@ -467,7 +467,7 @@ void P_SpawnPlayer(int plrNum, playerclass_t pClass, coord_t x, coord_t y, coord x, y, z, angle); #ifdef _DEBUG - Con_Message("P_SpawnPlayer: Player #%i spawned pos:[%g, %g, %g] angle:%x floorz:%g mobjid:%i\n", + Con_Message("P_SpawnPlayer: Player #%i spawned pos:[%g, %g, %g] angle:%x floorz:%g mobjid:%i", plrNum, mo->origin[VX], mo->origin[VY], mo->origin[VZ], mo->angle, mo->floorZ, mo->thinker.id); #endif @@ -497,7 +497,7 @@ void P_SpawnPlayer(int plrNum, playerclass_t pClass, coord_t x, coord_t y, coord */ #ifdef _DEBUG - Con_Message("P_SpawnPlayer: Player #%i spawning with color translation %i.\n", + Con_Message("P_SpawnPlayer: Player #%i spawning with color translation %i.", plrNum, (mo->flags & MF_TRANSLATION) >> MF_TRANSSHIFT); #endif @@ -534,7 +534,7 @@ void P_SpawnPlayer(int plrNum, playerclass_t pClass, coord_t x, coord_t y, coord if(p->plr->flags & DDPF_CAMERA) { - VERBOSE( Con_Message("Player #%i spawned as a camera.\n", plrNum) ) + VERBOSE( Con_Message("Player #%i spawned as a camera.", plrNum) ) p->plr->mo->origin[VZ] += (coord_t) cfg.plrViewHeight; p->viewHeight = 0; @@ -657,7 +657,7 @@ void P_SpawnClient(int plrNum) playerclass_t pClass = P_ClassForPlayerWhenRespawning(plrNum, true); #ifdef _DEBUG - Con_Message("P_SpawnClient: Spawning client player mobj (for player %i; console player is %i).\n", plrNum, CONSOLEPLAYER); + Con_Message("P_SpawnClient: Spawning client player mobj (for player %i; console player is %i).", plrNum, CONSOLEPLAYER); #endif // The server will fix the player's position and angles soon after. @@ -702,7 +702,7 @@ void P_RebornPlayer(int plrNum) pClass = P_ClassForPlayerWhenRespawning(plrNum, false); p = &players[plrNum]; - Con_Message("P_RebornPlayer: player %i (class %i).\n", plrNum, pClass); + Con_Message("P_RebornPlayer: player %i (class %i).", plrNum, pClass); if(p->plr->mo) { @@ -714,7 +714,7 @@ void P_RebornPlayer(int plrNum) if(G_GameState() != GS_MAP) { #ifdef _DEBUG - Con_Message("P_RebornPlayer: Game state is %i, won't spawn.\n", G_GameState()); + Con_Message("P_RebornPlayer: Game state is %i, won't spawn.", G_GameState()); #endif return; // Nothing else to do. } @@ -780,7 +780,7 @@ void P_RebornPlayer(int plrNum) #if __JDOOM__ || __JHERETIC__ || __JDOOM64__ if(!foundSpot) { - Con_Message("- force spawning at %i.\n", p->startSpot); + Con_Message("- force spawning at %i.", p->startSpot); if(assigned) { @@ -811,7 +811,7 @@ void P_RebornPlayer(int plrNum) int i; #ifdef _DEBUG - Con_Message("P_RebornPlayer: Trying other spots for %i.\n", plrNum); + Con_Message("P_RebornPlayer: Trying other spots for %i.", plrNum); #endif // Try to spawn at one of the other player start spots. @@ -835,12 +835,12 @@ void P_RebornPlayer(int plrNum) foundSpot = true; #ifdef _DEBUG - Con_Message("P_RebornPlayer: Spot [%f, %f] selected.\n", spot->origin[VX], spot->origin[VY]); + Con_Message("P_RebornPlayer: Spot [%f, %f] selected.", spot->origin[VX], spot->origin[VY]); #endif break; } #ifdef _DEBUG - Con_Message("P_RebornPlayer: Spot [%f, %f] is not available.\n", spot->origin[VX], spot->origin[VY]); + Con_Message("P_RebornPlayer: Spot [%f, %f] is not available.", spot->origin[VX], spot->origin[VY]); #endif } } @@ -873,7 +873,7 @@ void P_RebornPlayer(int plrNum) } #ifdef _DEBUG - Con_Message("P_RebornPlayer: Spawning player at (%f,%f,%f) angle:%x.\n", + Con_Message("P_RebornPlayer: Spawning player at (%f,%f,%f) angle:%x.", pos[VX], pos[VY], pos[VZ], angle); #endif @@ -1044,7 +1044,7 @@ void P_SpawnPlayers(void) spawnFlags, makeCamera, false, true); #ifdef _DEBUG - Con_Message("P_SpawnPlayers: Player %i at %f, %f, %f\n", i, pos[VX], pos[VY], pos[VZ]); + Con_Message("P_SpawnPlayers: Player %i at %f, %f, %f", i, pos[VX], pos[VY], pos[VZ]); #endif } } @@ -1212,7 +1212,7 @@ static int turnMobjToNearestLine(thinker_t* th, void* context) return false; // Continue iteration. #ifdef _DEBUG - VERBOSE( Con_Message("Checking mo %i...\n", mo->thinker.id) ); + VERBOSE( Con_Message("Checking mo %i...", mo->thinker.id) ); #endif memset(¶ms, 0, sizeof(params)); @@ -1231,13 +1231,13 @@ static int turnMobjToNearestLine(thinker_t* th, void* context) { mo->angle = P_GetAnglep(params.line, DMU_ANGLE) - ANGLE_90; #ifdef _DEBUG - VERBOSE( Con_Message("turnMobjToNearestLine: mo=%i angle=%x\n", mo->thinker.id, mo->angle) ); + VERBOSE( Con_Message("turnMobjToNearestLine: mo=%i angle=%x", mo->thinker.id, mo->angle) ); #endif } else { #ifdef _DEBUG - VERBOSE( Con_Message("turnMobjToNearestLine: mo=%i => no nearest line found\n", mo->thinker.id) ); + VERBOSE( Con_Message("turnMobjToNearestLine: mo=%i => no nearest line found", mo->thinker.id) ); #endif } diff --git a/doomsday/plugins/common/src/p_switch.c b/doomsday/plugins/common/src/p_switch.c index 70fbf69112..9dc6859516 100644 --- a/doomsday/plugins/common/src/p_switch.c +++ b/doomsday/plugins/common/src/p_switch.c @@ -221,12 +221,12 @@ void P_InitSwitchList(void) // Has a custom SWITCHES lump been loaded? if(lumpNum >= 0) { - VERBOSE( Con_Message("Processing lump %s::SWITCHES...\n", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) + VERBOSE( Con_Message("Processing lump %s::SWITCHES...", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) sList = (switchlist_t*) W_CacheLump(lumpNum); } else { - VERBOSE( Con_Message("Registering default switches...\n") ); + VERBOSE( Con_Message("Registering default switches...") ); } uri = Uri_New(); @@ -253,7 +253,7 @@ void P_InitSwitchList(void) switchlist[index++] = P_ToPtr(DMU_MATERIAL, Materials_ResolveUri(uri)); if(verbose > (lumpNum >= 0? 1 : 2)) { - Con_Message(" %d: Epi:%d A:\"%s\" B:\"%s\"\n", i, SHORT(sList[i].episode), sList[i].name1, sList[i].name2); + Con_Message(" %d: Epi:%d A:\"%s\" B:\"%s\"", i, SHORT(sList[i].episode), sList[i].name1, sList[i].name2); } } } diff --git a/doomsday/plugins/common/src/p_terraintype.c b/doomsday/plugins/common/src/p_terraintype.c index 21113a4588..59240c2a2f 100644 --- a/doomsday/plugins/common/src/p_terraintype.c +++ b/doomsday/plugins/common/src/p_terraintype.c @@ -207,7 +207,7 @@ void P_InitTerrainTypes(void) mat = P_ToPtr(DMU_MATERIAL, Materials_ResolveUriCString(defs[i].materialUri)); if(!mat) continue; - VERBOSE( Con_Message("P_InitTerrainTypes: Material \"%s\" linked to terrain type '%s'.\n", defs[i].materialUri, defs[i].ttName) ) + VERBOSE( Con_Message("P_InitTerrainTypes: Material \"%s\" linked to terrain type '%s'.", defs[i].materialUri, defs[i].ttName) ) getMaterialTerrainType(mat, idx); } } diff --git a/doomsday/plugins/common/src/p_user.c b/doomsday/plugins/common/src/p_user.c index 0d2305652b..1bf0fe7ca8 100644 --- a/doomsday/plugins/common/src/p_user.c +++ b/doomsday/plugins/common/src/p_user.c @@ -333,7 +333,7 @@ void P_PlayerRemoteMove(player_t* player) /* #ifdef _DEBUG - Con_Message("P_PlayerRemoteMove: player=%i IS_NETGAME=%i mo=%p smoother=%p IS_CLIENT=%i IS_SERVER=%i CNSPLR=%i\n", + Con_Message("P_PlayerRemoteMove: player=%i IS_NETGAME=%i mo=%p smoother=%p IS_CLIENT=%i IS_SERVER=%i CNSPLR=%i", plrNum, IS_NETGAME, mo, smoother, IS_CLIENT, IS_SERVER, CONSOLEPLAYER); #endif */ @@ -380,14 +380,14 @@ void P_PlayerRemoteMove(player_t* player) // It successfully moved to the right XY coords. mo->origin[VZ] = mo->floorZ; #ifdef _DEBUG - VERBOSE2( Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f (floorz)\n", + VERBOSE2( Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f (floorz)", plrNum, mo->origin[VX], mo->origin[VY], mo->origin[VZ]) ); #endif } else { #ifdef _DEBUG - VERBOSE2( Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f\n", + VERBOSE2( Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f", plrNum, mo->origin[VX], mo->origin[VY], mo->origin[VZ]) ); #endif } @@ -397,17 +397,17 @@ void P_PlayerRemoteMove(player_t* player) { // The player must have teleported. #ifdef _DEBUG - Con_Message("P_PlayerRemoteMove: Player %i: Clearing smoother because of FIXPOS.\n", plrNum); + Con_Message("P_PlayerRemoteMove: Player %i: Clearing smoother because of FIXPOS.", plrNum); #endif Smoother_Clear(smoother); } } else { - #ifdef _DEBUG - Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f FAILED!\n", +#ifdef _DEBUG + Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f FAILED!", plrNum, mo->origin[VX], mo->origin[VY], mo->origin[VZ]); - #endif +#endif } } else @@ -415,7 +415,7 @@ void P_PlayerRemoteMove(player_t* player) #ifdef _DEBUG //Smoother_Debug(smoother); #endif - /*Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f (floorz)\n", + /*Con_Message("P_PlayerRemoteMove: Player %i: Smooth move to %f, %f, %f (floorz)", plrNum, xyz[VX], xyz[VY], xyz[VZ]);*/ /* @@ -467,7 +467,7 @@ void P_MovePlayer(player_t *player) if(dp->fixCounter.angles == dp->fixAcked.angles) // all acked? { #ifdef _DEBUG - VERBOSE2( Con_Message("Server accepts client %i angle from command (ang=%i).\n", + VERBOSE2( Con_Message("Server accepts client %i angle from command (ang=%i).", player - players, cmd->angle) ); #endif // Accept the client's version of the angles. @@ -736,7 +736,7 @@ void P_PlayerReborn(player_t* player) if(plrNum == CONSOLEPLAYER) { #ifdef _DEBUG - Con_Message("P_PlayerReborn: Console player reborn, reseting InFine.\n"); + Con_Message("P_PlayerReborn: Console player reborn, reseting InFine."); #endif // Clear the currently playing script, if any. FI_StackClear(); @@ -1283,7 +1283,7 @@ void P_PlayerThinkWeapons(player_t* player) if(!player->weapons[newweapon].owned) { - Con_Message("P_PlayerThinkWeapons: Player %i tried to change to unowned weapon %i!\n", + Con_Message("P_PlayerThinkWeapons: Player %i tried to change to unowned weapon %i!", (int)(player - players), newweapon); newweapon = WT_NOCHANGE; } @@ -1337,7 +1337,7 @@ void P_PlayerThinkWeapons(player_t* player) NetCl_PlayerActionRequest(player, GPA_CHANGE_WEAPON, newweapon); } #ifdef _DEBUG - Con_Message("P_PlayerThinkWeapons: Player %i changing weapon to %i (brain thinks %i).\n", + Con_Message("P_PlayerThinkWeapons: Player %i changing weapon to %i (brain thinks %i).", (int)(player - players), newweapon, brain->changeWeapon); #endif player->pendingWeapon = newweapon; @@ -1898,14 +1898,14 @@ void P_PlayerThinkAssertions(player_t* player) { if(!(mo->ddFlags & DDMF_SOLID)) { - Con_Message("P_PlayerThinkAssertions: player %i, mobj should be solid when alive!\n", plrNum); + Con_Message("P_PlayerThinkAssertions: player %i, mobj should be solid when alive!", plrNum); } } else if(player->playerState == PST_DEAD) { if(mo->ddFlags & DDMF_SOLID) { - Con_Message("P_PlayerThinkAssertions: player %i, mobj should not be solid when dead!\n", plrNum); + Con_Message("P_PlayerThinkAssertions: player %i, mobj should not be solid when dead!", plrNum); } } } diff --git a/doomsday/plugins/common/src/p_view.c b/doomsday/plugins/common/src/p_view.c index 717c43886c..6cd31fd2ca 100644 --- a/doomsday/plugins/common/src/p_view.c +++ b/doomsday/plugins/common/src/p_view.c @@ -92,7 +92,7 @@ void P_CalcHeight(player_t* plr) if((pmo->flags2 & MF2_FLY) && pmo->origin[VZ] > pmo->floorZ) { #ifdef _DEBUG - Con_Message("Flying! z=%f flz=%f\n", pmo->origin[VZ], pmo->floorZ); + Con_Message("Flying! z=%f flz=%f", pmo->origin[VZ], pmo->floorZ); #endif plr->bob = 1.0f / 2; } diff --git a/doomsday/plugins/common/src/p_xgfile.c b/doomsday/plugins/common/src/p_xgfile.c index ee2c2153ae..2dfb252a42 100644 --- a/doomsday/plugins/common/src/p_xgfile.c +++ b/doomsday/plugins/common/src/p_xgfile.c @@ -340,7 +340,7 @@ void XG_ReadXGLump(lumpnum_t lumpNum) xgDataLumps = true; - Con_Message("XG_ReadTypes: Reading XG types from DDXGDATA.\n"); + Con_Message("XG_ReadTypes: Reading XG types from DDXGDATA."); len = W_LumpLength(lumpNum); buf = (uint8_t*) malloc(len); diff --git a/doomsday/plugins/dehread/src/dehread.cpp b/doomsday/plugins/dehread/src/dehread.cpp index 1eccf22931..0990174ce0 100644 --- a/doomsday/plugins/dehread/src/dehread.cpp +++ b/doomsday/plugins/dehread/src/dehread.cpp @@ -69,7 +69,7 @@ static void readLump(lumpnum_t lumpNum) deh.append(QChar(0)); W_UnlockLump(lumpNum); - Con_Message("Applying DeHackEd patch lump #%i \"%s:%s\"...\n", lumpNum, + Con_Message("Applying DeHackEd patch lump #%i \"%s:%s\"...", lumpNum, F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum))), Str_Text(W_LumpName(lumpNum))); readDehPatch(deh, NoInclude | IgnoreEOF); @@ -89,7 +89,7 @@ static void readFile(const String& filePath) Block deh = file.readAll(); deh.append(QChar(0)); - Con_Message("Applying DeHackEd patch file \"%s\"...\n", F_PrettyPath(filePath.toUtf8().constData())); + Con_Message("Applying DeHackEd patch file \"%s\"...", F_PrettyPath(filePath.toUtf8().constData())); readDehPatch(deh, IgnoreEOF); } diff --git a/doomsday/plugins/directsound/src/driver_directsound.cpp b/doomsday/plugins/directsound/src/driver_directsound.cpp index 49276d7e5b..146cadbb38 100644 --- a/doomsday/plugins/directsound/src/driver_directsound.cpp +++ b/doomsday/plugins/directsound/src/driver_directsound.cpp @@ -148,8 +148,7 @@ static IDirectSound3DBuffer8* get3DBuffer(IDirectSoundBuffer8* buf8) if(FAILED(hr = buf8->QueryInterface(IID_IDirectSound3DBuffer8, (LPVOID*) &buf3d))) { - Con_Message("dsDirectSound::get3DBuffer: " - "Failed to get 3D interface (0x%x).\n", hr); + Con_Message("dsDirectSound::get3DBuffer: Failed to get 3D interface (0x%x).", hr); buf3d = NULL; } @@ -221,7 +220,7 @@ int DS_Init(void) verbose = CommandLine_Exists("-verbose"); if(verbose) - Con_Message("dsDirectSound::DS_Init: Initializing Direct Sound...\n"); + Con_Message("dsDirectSound::DS_Init: Initializing Direct Sound..."); // Can we set the Primary Sound Format? canSetPSF = !CommandLine_Exists("-nopsf"); @@ -246,8 +245,7 @@ int DS_Init(void) else { if(verbose) - Con_Message("dsDirectSound::DS_Init: " - "EAX couldn't be initialized (0x%x).\n", hr); + Con_Message("dsDirectSound::DS_Init: EAX couldn't be initialized (0x%x).", hr); } } @@ -260,8 +258,7 @@ int DS_Init(void) } else { - Con_Message("dsDirectSound::DS_Init: " - "Failed to create the DS8 instance (0x%x).\n", hr); + Con_Message("dsDirectSound::DS_Init: Failed to create the DS8 instance (0x%x).", hr); } } @@ -273,8 +270,7 @@ int DS_Init(void) // Set cooperative level. if((hr = dsound->SetCooperativeLevel(hWnd, DSSCL_PRIORITY)) != DS_OK) { - Con_Message("dsDirectSound::DS_Init: " - "Failed to set cooperative level (0x%x).\n", hr); + Con_Message("dsDirectSound::DS_Init: Failed to set cooperative level (0x%x).", hr); return false; } @@ -282,8 +278,7 @@ int DS_Init(void) dsoundCaps.dwSize = sizeof(dsoundCaps); if((hr = dsound->GetCaps(&dsoundCaps)) != DS_OK) { - Con_Message("dsDirectSound::DS_Init: " - "Failed querying device caps (0x%x).\n", hr); + Con_Message("dsDirectSound::DS_Init: Failed querying device caps (0x%x).", hr); return false; } @@ -316,8 +311,7 @@ int DS_Init(void) if((hr = dsound->CreateSoundBuffer(&desc, &primary, NULL)) != DS_OK) { - Con_Message("dsDirectSound::DS_Init: " - "Failed creating primary (2D) buffer (0x%x).\n", hr); + Con_Message("dsDirectSound::DS_Init: Failed creating primary (2D) buffer (0x%x).", hr); return false; } @@ -334,8 +328,7 @@ int DS_Init(void) (LPVOID*) &dsListener))) { if(verbose) - Con_Message("dsDirectSound::DS_Init: " - "3D listener not available (0x%x).\n", hr); + Con_Message("dsDirectSound::DS_Init: 3D listener not available (0x%x).", hr); } } @@ -416,7 +409,7 @@ int DS_Init(void) useEAX = false; if(verbose) - Con_Message("dsDirectSound::DS_Init: Failed retrieving property set.\n"); + Con_Message("dsDirectSound::DS_Init: Failed retrieving property set."); } } @@ -439,14 +432,14 @@ int DS_Init(void) { const eaxproperty_t* p = &eaxProps[i]; - Con_Message(" %s: %s\n", p->name, + Con_Message(" %s: %s", p->name, queryEAXSupport(p->prop)? "Present" : "Not available"); } } // Success! if(verbose) - Con_Message("dsDirectSound::DS_Init: Initialization complete, OK.\n"); + Con_Message("dsDirectSound::DS_Init: Initialization complete, OK."); return true; #undef NUMBUFFERS_HW_3D @@ -554,8 +547,7 @@ sfxbuffer_t* DS_SFX_CreateBuffer(int flags, int bits, int rate) buf_object8 = createBuffer(&desc); if(!buf_object8) { - Con_Message("dsDirectSound::DS_SFX_CreateBuffer: " - "Failed creating buffer [rate:%i bits:%i].\n", + Con_Message("dsDirectSound::DS_SFX_CreateBuffer: Failed creating buffer [rate:%i bits:%i].", rate, bits); return NULL; } @@ -566,8 +558,7 @@ sfxbuffer_t* DS_SFX_CreateBuffer(int flags, int bits, int rate) buf_object3d = get3DBuffer(buf_object8); if(!buf_object3d) { - Con_Message("dsDirectSound::DS_SFX_CreateBuffer: " - "Failed to retrieve 3D interface.\n"); + Con_Message("dsDirectSound::DS_SFX_CreateBuffer: Failed to retrieve 3D interface."); buf_object8->Release(); return NULL; } @@ -1068,7 +1059,7 @@ static void setEAXdw(DWORD prop, int value) 0, &value, sizeof(DWORD)))) { if(reportEAXError(prop, hr)) - Con_Message("setEAXdw (prop:%i value:%i) failed. Result: %x.\n", + Con_Message("setEAXdw (prop:%i value:%i) failed. Result: %x.", prop, value, hr); } } @@ -1083,7 +1074,7 @@ static void setEAXf(DWORD prop, float value) 0, &value, sizeof(float)))) { if(reportEAXError(prop, hr)) - Con_Message("setEAXf (prop:%i value:%f) failed. Result: %x.\n", + Con_Message("setEAXf (prop:%i value:%f) failed. Result: %x.", prop, value, hr); } } @@ -1103,7 +1094,7 @@ static void mulEAXdw(DWORD prop, float mul) &retBytes))) { if(reportEAXError(prop, hr)) - Con_Message("mulEAXdw (prop:%i) get failed. Result: %x.\n", + Con_Message("mulEAXdw (prop:%i) get failed. Result: %x.", prop, hr & 0xffff); } @@ -1125,7 +1116,7 @@ static void mulEAXf(DWORD prop, float mul, float min, float max) &retBytes))) { if(reportEAXError(prop, hr)) - Con_Message("mulEAXf (prop:%i) get failed. Result: %x.\n", + Con_Message("mulEAXf (prop:%i) get failed. Result: %x.", prop, hr & 0xffff); } diff --git a/doomsday/plugins/doom/src/d_main.c b/doomsday/plugins/doom/src/d_main.c index 91fef467a1..130b3db944 100644 --- a/doomsday/plugins/doom/src/d_main.c +++ b/doomsday/plugins/doom/src/d_main.c @@ -480,10 +480,7 @@ void D_PostInit(void) if(p && p < myargc - 1 && deathmatch) { int time = atoi(CommandLine_At(p + 1)); - Con_Message("Maps will end after %d minute", time); - if(time > 1) - Con_Message("s"); - Con_Message(".\n"); + Con_Message("Maps will end after %d %s", time, time == 1? "minute" : "minutes"); } // Turbo option. @@ -501,7 +498,7 @@ void D_PostInit(void) if(scale > 400) scale = 400; - Con_Message("turbo scale: %i%%\n", scale); + Con_Message("turbo scale: %i%%", scale); turboMul = scale / 100.f; } @@ -552,9 +549,9 @@ void D_PostInit(void) if(autoStart) { if(gameModeBits & (GM_ANY_DOOM2|GM_DOOM_CHEX)) - Con_Message("Warp to Map %d, Skill %d\n", startMap+1, startSkill + 1); + Con_Message("Warp to Map %d, Skill %d", startMap+1, startSkill + 1); else - Con_Message("Warp to Episode %d, Map %d, Skill %d\n", startEpisode+1, startMap+1, startSkill + 1); + Con_Message("Warp to Episode %d, Map %d, Skill %d", startEpisode+1, startMap+1, startSkill + 1); } // Validate episode and map. diff --git a/doomsday/plugins/doom/src/d_refresh.c b/doomsday/plugins/doom/src/d_refresh.c index 7cb8adba3e..a296a536c4 100644 --- a/doomsday/plugins/doom/src/d_refresh.c +++ b/doomsday/plugins/doom/src/d_refresh.c @@ -143,7 +143,7 @@ boolean R_ViewFilterColor(float rgba[4], int filter) } if(filter) - Con_Message("R_ViewFilterColor: Real strange filter number: %d.\n", filter); + Con_Message("R_ViewFilterColor: Real strange filter number: %d.", filter); return false; } @@ -158,7 +158,7 @@ void R_UpdateViewFilter(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:R_UpdateViewFilter: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: R_UpdateViewFilter: Invalid player #%i, ignoring.", player); #endif return; } @@ -360,7 +360,7 @@ void Mobj_UpdateColorMap(mobj_t* mo) if(mo->flags & MF_TRANSLATION) { mo->tmap = (mo->flags & MF_TRANSLATION) >> MF_TRANSSHIFT; - //Con_Message("Mobj %i color tmap:%i\n", mo->thinker.id, mo->tmap); + //Con_Message("Mobj %i color tmap:%i", mo->thinker.id, mo->tmap); } else { diff --git a/doomsday/plugins/doom/src/m_cheat.c b/doomsday/plugins/doom/src/m_cheat.c index 57197d9071..fc419b7fea 100644 --- a/doomsday/plugins/doom/src/m_cheat.c +++ b/doomsday/plugins/doom/src/m_cheat.c @@ -481,19 +481,19 @@ static void printDebugInfo(player_t* plr) // Also print some information to the console. Con_Message("%s", textBuffer); sub = plr->plr->mo->bspLeaf; - Con_Message("\nBspLeaf %i / Sector %i:\n", P_ToIndex(sub), P_ToIndex(P_GetPtrp(sub, DMU_SECTOR))); + Con_Message("BspLeaf %i / Sector %i:", P_ToIndex(sub), P_ToIndex(P_GetPtrp(sub, DMU_SECTOR))); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_FLOOR_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" FloorZ:%g Material:%s\n", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); + Con_Message(" FloorZ:%g Material:%s", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); Uri_Delete(uri); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_CEILING_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" CeilingZ:%g Material:%s\n", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); + Con_Message(" CeilingZ:%g Material:%s", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); Uri_Delete(uri); - Con_Message("Player height:%g Player radius:%g\n", + Con_Message("Player height:%g Player radius:%g", plr->plr->mo->height, plr->plr->mo->radius); } diff --git a/doomsday/plugins/doom/src/p_inter.c b/doomsday/plugins/doom/src/p_inter.c index adde64679b..6381de1211 100644 --- a/doomsday/plugins/doom/src/p_inter.c +++ b/doomsday/plugins/doom/src/p_inter.c @@ -856,7 +856,7 @@ void P_TouchSpecialMobj(mobj_t* special, mobj_t* toucher) } else { - Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.\n", + Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.", (int) special->type); } diff --git a/doomsday/plugins/doom/src/p_pspr.c b/doomsday/plugins/doom/src/p_pspr.c index 89fa20cfbd..2b7bf7bd7e 100644 --- a/doomsday/plugins/doom/src/p_pspr.c +++ b/doomsday/plugins/doom/src/p_pspr.c @@ -158,7 +158,7 @@ void P_BringUpWeapon(player_t* player) wminfo = WEAPON_INFO(raiseWeapon, player->class_, 0); #if _DEBUG - Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i\n", + Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i", (int)(player - players), oldPendingWeapon, wminfo->states[WSN_UP]); #endif diff --git a/doomsday/plugins/doom/src/p_spec.c b/doomsday/plugins/doom/src/p_spec.c index 28175caf9f..89bdb8c3ae 100644 --- a/doomsday/plugins/doom/src/p_spec.c +++ b/doomsday/plugins/doom/src/p_spec.c @@ -181,7 +181,7 @@ static void loadAnimDefs(animdef_t* animDefs, boolean isCustom) numFrames = endFrame - startFrame + 1; if(numFrames < 2) { - Con_Message("Warning:loadAnimDefs: Bad cycle from '%s' to '%s' in sequence #%i, ignoring.\n", animDefs[i].startname, animDefs[i].endname, i); + Con_Message("Warning: loadAnimDefs: Bad cycle from '%s' to '%s' in sequence #%i, ignoring.", animDefs[i].startname, animDefs[i].endname, i); continue; } @@ -200,7 +200,7 @@ static void loadAnimDefs(animdef_t* animDefs, boolean isCustom) { AutoStr* from = Uri_ToString(startUri); AutoStr* to = Uri_ToString(endUri); - Con_Message(" %d: From:\"%s\" To:\"%s\" Tics:%i\n", i, Str_Text(from), Str_Text(to), ticsPerFrame); + Con_Message(" %d: From:\"%s\" To:\"%s\" Tics:%i", i, Str_Text(from), Str_Text(to), ticsPerFrame); } // Find an animation group for this. @@ -238,13 +238,13 @@ void P_InitPicAnims(void) * Support for this extension should be considered depreciated. * All new features should be added, accessed via DED. */ - VERBOSE( Con_Message("Processing lump %s::ANIMATED...\n", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) + VERBOSE( Con_Message("Processing lump %s::ANIMATED...", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) loadAnimDefs((animdef_t*)W_CacheLump(lumpNum), true); W_UnlockLump(lumpNum); return; }} - VERBOSE( Con_Message("Registering default texture animations...\n") ); + VERBOSE( Con_Message("Registering default texture animations...") ); loadAnimDefs(animsShared, false); } diff --git a/doomsday/plugins/doom/src/p_telept.c b/doomsday/plugins/doom/src/p_telept.c index ccaf678cdc..a960055940 100644 --- a/doomsday/plugins/doom/src/p_telept.c +++ b/doomsday/plugins/doom/src/p_telept.c @@ -185,7 +185,7 @@ int EV_Teleport(LineDef* line, int side, mobj_t* mo, boolean spawnFog) //mo->dPlayer->clAngle = mo->angle; /* $unifiedangles */ mo->dPlayer->flags |= DDPF_FIXANGLES | DDPF_FIXORIGIN | DDPF_FIXMOM; #ifdef _DEBUG - Con_Message("EV_Teleport: Player %p set FIX flags.\n", mo->dPlayer); + Con_Message("EV_Teleport: Player %p set FIX flags.", mo->dPlayer); #endif } diff --git a/doomsday/plugins/doom/src/st_stuff.c b/doomsday/plugins/doom/src/st_stuff.c index 3253951020..850550de74 100644 --- a/doomsday/plugins/doom/src/st_stuff.c +++ b/doomsday/plugins/doom/src/st_stuff.c @@ -519,14 +519,14 @@ void ST_HUDUnHide(int player, hueevent_t ev) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid player #%i, ignoring.", player); + Con_Message("Warning: ST_HUDUnHide: Invalid player #%i, ignoring.", player); #endif return; } if(ev < HUE_FORCE || ev > NUMHUDUNHIDEEVENTS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); + Con_Message("Warning: ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); #endif return; } @@ -2626,7 +2626,7 @@ void ST_Drawer(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_Drawer: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: ST_Drawer: Invalid player #%i, ignoring.", player); #endif return; } @@ -3371,7 +3371,7 @@ D_CMD(ChatOpen) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -3415,9 +3415,9 @@ D_CMD(ChatSendMacro) if(argc < 2 || argc > 3) { - Con_Message("Usage: %s (team) (macro number)\n", argv[0]); + Con_Message("Usage: %s (team) (macro number)", argv[0]); Con_Message("Send a chat macro to other player(s).\n" - "If (team) is omitted, the message will be sent to all players.\n"); + "If (team) is omitted, the message will be sent to all players."); return true; } @@ -3429,7 +3429,7 @@ D_CMD(ChatSendMacro) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -3437,7 +3437,7 @@ D_CMD(ChatSendMacro) macroId = UIChat_ParseMacroId(argc == 3? argv[2] : argv[1]); if(-1 == macroId) { - Con_Message("Invalid macro id.\n"); + Con_Message("Invalid macro id."); return false; } diff --git a/doomsday/plugins/doom64/src/d_main.c b/doomsday/plugins/doom64/src/d_main.c index 5e868bc426..ece471f225 100644 --- a/doomsday/plugins/doom64/src/d_main.c +++ b/doomsday/plugins/doom64/src/d_main.c @@ -391,10 +391,7 @@ void D_PostInit(void) if(p && p < myargc - 1 && deathmatch) { int time = atoi(CommandLine_At(p + 1)); - Con_Message("Levels will end after %d minute", time); - if(time > 1) - Con_Message("s"); - Con_Message(".\n"); + Con_Message("Maps will end after %d %s", time, time == 1? "minute" : "minutes"); } // Turbo option. @@ -412,7 +409,7 @@ void D_PostInit(void) if(scale > 400) scale = 400; - Con_Message("turbo scale: %i%%\n", scale); + Con_Message("turbo scale: %i%%", scale); turboMul = scale / 100.f; } @@ -445,7 +442,7 @@ void D_PostInit(void) // Are we autostarting? if(autoStart) { - Con_Message("Warp to Episode %d, Map %d, Skill %d\n", startEpisode+1, + Con_Message("Warp to Episode %d, Map %d, Skill %d", startEpisode+1, startMap+1, startSkill + 1); } diff --git a/doomsday/plugins/doom64/src/d_refresh.c b/doomsday/plugins/doom64/src/d_refresh.c index d6e6e7f711..4aeb0f1e38 100644 --- a/doomsday/plugins/doom64/src/d_refresh.c +++ b/doomsday/plugins/doom64/src/d_refresh.c @@ -141,7 +141,7 @@ boolean R_ViewFilterColor(float rgba[4], int filter) } if(filter) - Con_Message("R_ViewFilterColor: Real strange filter number: %d.\n", filter); + Con_Message("R_ViewFilterColor: Real strange filter number: %d.", filter); return false; } @@ -156,7 +156,7 @@ void R_UpdateViewFilter(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:R_UpdateViewFilter: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: R_UpdateViewFilter: Invalid player #%i, ignoring.", player); #endif return; } diff --git a/doomsday/plugins/doom64/src/m_cheat.c b/doomsday/plugins/doom64/src/m_cheat.c index 01d2459f42..1421717d5d 100644 --- a/doomsday/plugins/doom64/src/m_cheat.c +++ b/doomsday/plugins/doom64/src/m_cheat.c @@ -202,19 +202,19 @@ void printDebugInfo(player_t* plr) // Also print some information to the console. Con_Message("%s", textBuffer); sub = plr->plr->mo->bspLeaf; - Con_Message("\nBspLeaf %i:\n", P_ToIndex(sub)); + Con_Message("BspLeaf %i:", P_ToIndex(sub)); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_FLOOR_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" FloorZ:%g Material:%s\n", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); + Con_Message(" FloorZ:%g Material:%s", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); Uri_Delete(uri); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_CEILING_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" CeilingZ:%g Material:%s\n", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); + Con_Message(" CeilingZ:%g Material:%s", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); Uri_Delete(uri); - Con_Message("Player height:%g Player radius:%g\n", plr->plr->mo->height, plr->plr->mo->radius); + Con_Message("Player height:%g Player radius:%g", plr->plr->mo->height, plr->plr->mo->radius); } /** diff --git a/doomsday/plugins/doom64/src/p_inter.c b/doomsday/plugins/doom64/src/p_inter.c index 5d7cbca3f7..f3989cc1a1 100644 --- a/doomsday/plugins/doom64/src/p_inter.c +++ b/doomsday/plugins/doom64/src/p_inter.c @@ -877,7 +877,7 @@ void P_TouchSpecialMobj(mobj_t* special, mobj_t* toucher) } else { - Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.\n", + Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.", (int) special->type); } diff --git a/doomsday/plugins/doom64/src/p_mobj.c b/doomsday/plugins/doom64/src/p_mobj.c index 7994b8f2bd..79a8b71cfc 100644 --- a/doomsday/plugins/doom64/src/p_mobj.c +++ b/doomsday/plugins/doom64/src/p_mobj.c @@ -782,7 +782,7 @@ mobj_t* P_SpawnMobjXYZ(mobjtype_t type, coord_t x, coord_t y, coord_t z, angle_t if(type < MT_FIRST || type >= Get(DD_NUMMOBJTYPES)) { - Con_Message("Warning: P_SpawnMobj: Attempt to spawn unknown mobj type %i, ignoring.\n", type); + Con_Message("Warning: P_SpawnMobj: Attempt to spawn unknown mobj type %i, ignoring.", type); return NULL; } diff --git a/doomsday/plugins/doom64/src/p_pspr.c b/doomsday/plugins/doom64/src/p_pspr.c index 633e166c7d..92ed517025 100644 --- a/doomsday/plugins/doom64/src/p_pspr.c +++ b/doomsday/plugins/doom64/src/p_pspr.c @@ -167,7 +167,7 @@ void P_BringUpWeapon(player_t* player) wminfo = WEAPON_INFO(raiseWeapon, player->class_, 0); #if _DEBUG - Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i\n", + Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i", (int)(player - players), oldPendingWeapon, wminfo->states[WSN_UP]); #endif diff --git a/doomsday/plugins/doom64/src/p_spec.c b/doomsday/plugins/doom64/src/p_spec.c index 2c24f5cd7f..a434478d5c 100644 --- a/doomsday/plugins/doom64/src/p_spec.c +++ b/doomsday/plugins/doom64/src/p_spec.c @@ -169,7 +169,7 @@ static void loadAnimDefs(animdef_t* animDefs, boolean isCustom) numFrames = (endFrame > startFrame? endFrame - startFrame : startFrame - endFrame) + 1; if(numFrames < 2) { - Con_Message("Warning:loadAnimDefs: Bad cycle from '%s' to '%s' in sequence #%i, ignoring.\n", + Con_Message("Warning: loadAnimDefs: Bad cycle from '%s' to '%s' in sequence #%i, ignoring.", animDefs[i].startname, animDefs[i].endname, i); continue; } @@ -189,7 +189,7 @@ static void loadAnimDefs(animdef_t* animDefs, boolean isCustom) { AutoStr* from = Uri_ToString(startUri); AutoStr* to = Uri_ToString(endUri); - Con_Message(" %d: From:\"%s\" To:\"%s\" Tics:%i\n", i, Str_Text(from), Str_Text(to), ticsPerFrame); + Con_Message(" %d: From:\"%s\" To:\"%s\" Tics:%i", i, Str_Text(from), Str_Text(to), ticsPerFrame); } // Find an animation group for this. @@ -227,13 +227,13 @@ void P_InitPicAnims(void) * Support for this extension should be considered depreciated. * All new features should be added, accessed via DED. */ - VERBOSE( Con_Message("Processing lump %s::ANIMATED...\n", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) + VERBOSE( Con_Message("Processing lump %s::ANIMATED...", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) loadAnimDefs((animdef_t*)W_CacheLump(lumpNum), true); W_UnlockLump(lumpNum); return; }} - VERBOSE( Con_Message("Registering default texture animations...\n") ); + VERBOSE( Con_Message("Registering default texture animations...") ); loadAnimDefs(animsShared, false); } diff --git a/doomsday/plugins/doom64/src/st_stuff.c b/doomsday/plugins/doom64/src/st_stuff.c index 9c8850540d..49e58fd368 100644 --- a/doomsday/plugins/doom64/src/st_stuff.c +++ b/doomsday/plugins/doom64/src/st_stuff.c @@ -146,14 +146,14 @@ void ST_HUDUnHide(int player, hueevent_t ev) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid player #%i, ignoring.", player); + Con_Message("Warning: ST_HUDUnHide: Invalid player #%i, ignoring.", player); #endif return; } if(ev < HUE_FORCE || ev > NUMHUDUNHIDEEVENTS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); + Con_Message("Warning: ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); #endif return; } @@ -617,7 +617,7 @@ void ST_Drawer(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_Drawer: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: ST_Drawer: Invalid player #%i, ignoring.", player); #endif return; } @@ -1141,7 +1141,7 @@ D_CMD(ChatOpen) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -1191,9 +1191,9 @@ D_CMD(ChatSendMacro) if(argc < 2 || argc > 3) { - Con_Message("Usage: %s (team) (macro number)\n", argv[0]); + Con_Message("Usage: %s (team) (macro number)", argv[0]); Con_Message("Send a chat macro to other player(s).\n" - "If (team) is omitted, the message will be sent to all players.\n"); + "If (team) is omitted, the message will be sent to all players."); return true; } @@ -1208,7 +1208,7 @@ D_CMD(ChatSendMacro) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -1216,7 +1216,7 @@ D_CMD(ChatSendMacro) macroId = UIChat_ParseMacroId(argc == 3? argv[2] : argv[1]); if(-1 == macroId) { - Con_Message("Invalid macro id.\n"); + Con_Message("Invalid macro id."); return false; } diff --git a/doomsday/plugins/example/src/example.c b/doomsday/plugins/example/src/example.c index 7a44bf8872..f7a4ce37a4 100644 --- a/doomsday/plugins/example/src/example.c +++ b/doomsday/plugins/example/src/example.c @@ -45,7 +45,7 @@ static int ExampleHook(int hookType, int parm, void *data) DENG_UNUSED(parm); DENG_UNUSED(data); - Con_Message("ExampleHook: Hook successful!\n"); + Con_Message("ExampleHook: Hook successful!"); return true; } diff --git a/doomsday/plugins/fluidsynth/src/driver_fluidsynth.cpp b/doomsday/plugins/fluidsynth/src/driver_fluidsynth.cpp index fd1be5ea40..cd827264fd 100644 --- a/doomsday/plugins/fluidsynth/src/driver_fluidsynth.cpp +++ b/doomsday/plugins/fluidsynth/src/driver_fluidsynth.cpp @@ -67,7 +67,7 @@ int DS_Init(void) fsSynth = new_fluid_synth(fsConfig); if(!fsSynth) { - Con_Message("Failed to create FluidSynth synthesizer.\n"); + Con_Message("Failed to create FluidSynth synthesizer."); return false; } @@ -82,7 +82,7 @@ int DS_Init(void) fsDriver = new_fluid_audio_driver(fsConfig, fsSynth); if(!fsDriver) { - Con_Message("Failed to create FluidSynth audio driver '%s'.\n", driverName); + Con_Message("Failed to create FluidSynth audio driver '%s'.", driverName); return false; } #else diff --git a/doomsday/plugins/fmod/src/driver_fmod.cpp b/doomsday/plugins/fmod/src/driver_fmod.cpp index be80d2c94c..7cd1098c64 100644 --- a/doomsday/plugins/fmod/src/driver_fmod.cpp +++ b/doomsday/plugins/fmod/src/driver_fmod.cpp @@ -66,7 +66,7 @@ int DS_Init(void) FMOD_RESULT result; if((result = FMOD::System_Create(&fmodSystem)) != FMOD_OK) { - Con_Message("FMOD::System_Create failed: (%d) %s\n", result, FMOD_ErrorString(result)); + Con_Message("FMOD::System_Create failed: (%d) %s", result, FMOD_ErrorString(result)); fmodSystem = 0; return false; } @@ -98,7 +98,7 @@ int DS_Init(void) // Initialize FMOD. if((result = fmodSystem->init(50, FMOD_INIT_NORMAL | FMOD_INIT_3D_RIGHTHANDED | FMOD_INIT_HRTF_LOWPASS, 0)) != FMOD_OK) { - Con_Message("FMOD init failed: (%d) %s\n", result, FMOD_ErrorString(result)); + Con_Message("FMOD init failed: (%d) %s", result, FMOD_ErrorString(result)); fmodSystem->release(); fmodSystem = 0; return false; @@ -132,7 +132,7 @@ int DS_Init(void) #endif // Print the credit required by FMOD license. - Con_Message("FMOD Sound System (c) Firelight Technologies Pty, Ltd., 1994-2012.\n"); + Con_Message("FMOD Sound System (c) Firelight Technologies Pty, Ltd., 1994-2013."); DSFMOD_TRACE("DS_Init: FMOD initialized."); return true; diff --git a/doomsday/plugins/heretic/src/h_main.c b/doomsday/plugins/heretic/src/h_main.c index badd8f9847..c7940701e3 100644 --- a/doomsday/plugins/heretic/src/h_main.c +++ b/doomsday/plugins/heretic/src/h_main.c @@ -424,7 +424,7 @@ void H_PostInit(void) if(scale > 400) scale = 400; - Con_Message("turbo scale: %i%%\n", scale); + Con_Message("turbo scale: %i%%", scale); turboMul = scale / 100.f; } @@ -466,7 +466,7 @@ void H_PostInit(void) // Are we autostarting? if(autoStart) { - Con_Message("Warp to Episode %d, Map %d, Skill %d\n", startEpisode+1, + Con_Message("Warp to Episode %d, Map %d, Skill %d", startEpisode+1, startMap+1, startSkill + 1); } diff --git a/doomsday/plugins/heretic/src/h_refresh.c b/doomsday/plugins/heretic/src/h_refresh.c index 8733c01390..ab92429b28 100644 --- a/doomsday/plugins/heretic/src/h_refresh.c +++ b/doomsday/plugins/heretic/src/h_refresh.c @@ -106,7 +106,7 @@ boolean R_ViewFilterColor(float rgba[4], int filter) } if(filter) - Con_Message("R_ViewFilterColor: Real strange filter number: %d.\n", filter); + Con_Message("R_ViewFilterColor: Real strange filter number: %d.", filter); return false; } @@ -123,7 +123,7 @@ void R_UpdateViewFilter(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:R_UpdateViewFilter: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: R_UpdateViewFilter: Invalid player #%i, ignoring.", player); #endif return; } diff --git a/doomsday/plugins/heretic/src/m_cheat.c b/doomsday/plugins/heretic/src/m_cheat.c index fc72a6167f..6de021fb88 100644 --- a/doomsday/plugins/heretic/src/m_cheat.c +++ b/doomsday/plugins/heretic/src/m_cheat.c @@ -272,19 +272,19 @@ static void printDebugInfo(int player) // Also print some information to the console. Con_Message("%s", textBuffer); sub = plr->plr->mo->bspLeaf; - Con_Message("\nBspLeaf %i:\n", P_ToIndex(sub)); + Con_Message("BspLeaf %i:", P_ToIndex(sub)); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_FLOOR_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" FloorZ:%g Material:%s\n", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); + Con_Message(" FloorZ:%g Material:%s", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); Uri_Delete(uri); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_CEILING_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" CeilingZ:%g Material:%s\n", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); + Con_Message(" CeilingZ:%g Material:%s", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); Uri_Delete(uri); - Con_Message("Player height:%g Player radius:%g\n", + Con_Message("Player height:%g Player radius:%g", plr->plr->mo->height, plr->plr->mo->radius); } diff --git a/doomsday/plugins/heretic/src/p_inter.c b/doomsday/plugins/heretic/src/p_inter.c index 0c61450646..ee1a258a5b 100644 --- a/doomsday/plugins/heretic/src/p_inter.c +++ b/doomsday/plugins/heretic/src/p_inter.c @@ -855,7 +855,7 @@ void P_TouchSpecialMobj(mobj_t* special, mobj_t* toucher) } else { - Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.\n", + Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.", (int) special->type); } @@ -988,7 +988,7 @@ boolean P_MorphPlayer(player_t* player) int oldFlags2; #ifdef _DEBUG - Con_Message("P_MorphPlayer: Player %i.\n", (int)(player - players)); + Con_Message("P_MorphPlayer: Player %i.", (int)(player - players)); #endif if(player->morphTics) @@ -1204,13 +1204,13 @@ int P_DamageMobj2(mobj_t* target, mobj_t* inflictor, mobj_t* source, } #ifdef _DEBUG - Con_Message("P_DamageMobj2: Damaging %i with %i points.\n", target->thinker.id, damage); + Con_Message("P_DamageMobj2: Damaging %i with %i points.", target->thinker.id, damage); #endif if(!(target->flags & MF_SHOOTABLE)) { #ifdef _DEBUG - Con_Message("P_DamageMobj2: Target %i is not shootable!\n", target->thinker.id); + Con_Message("P_DamageMobj2: Target %i is not shootable!", target->thinker.id); #endif return 0; // Shouldn't happen... } diff --git a/doomsday/plugins/heretic/src/p_mobj.c b/doomsday/plugins/heretic/src/p_mobj.c index f2be3223d7..2d76cbb194 100644 --- a/doomsday/plugins/heretic/src/p_mobj.c +++ b/doomsday/plugins/heretic/src/p_mobj.c @@ -526,7 +526,7 @@ void P_MobjMoveZ(mobj_t* mo) if(!P_CheckPosition(mo, mo->origin)) { #ifdef _DEBUG - Con_Message("Floating thing %i has gotten stuck! onmobj=%i z=%f flz=%f tmfz=%f\n", + Con_Message("Floating thing %i has gotten stuck! onmobj=%i z=%f flz=%f tmfz=%f", mo->thinker.id, mo->onMobj? mo->onMobj->thinker.id : 0, mo->origin[VZ], mo->floorZ, tmFloorZ); #endif if(mo->origin[VZ] < tmFloorZ) diff --git a/doomsday/plugins/heretic/src/p_pspr.c b/doomsday/plugins/heretic/src/p_pspr.c index 1350ec3a2e..e749bd8fc2 100644 --- a/doomsday/plugins/heretic/src/p_pspr.c +++ b/doomsday/plugins/heretic/src/p_pspr.c @@ -608,7 +608,7 @@ void P_BringUpWeapon(struct player_s* player) wminfo = WEAPON_INFO(raiseWeapon, player->class_, (player->powers[PT_WEAPONLEVEL2]? 1:0)); #if _DEBUG - Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i\n", + Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i", (int)(player - players), oldPendingWeapon, wminfo->states[WSN_UP]); #endif @@ -624,7 +624,7 @@ void P_FireWeapon(player_t *player) int lvl = (player->powers[PT_WEAPONLEVEL2]? 1 : 0); #ifdef _DEBUG - Con_Message("P_FireWeapon: player %i\n", (int)(player - players)); + Con_Message("P_FireWeapon: player %i", (int)(player - players)); #endif if(!P_CheckAmmo(player)) @@ -634,7 +634,7 @@ void P_FireWeapon(player_t *player) P_MobjChangeState(player->plr->mo, PCLASS_INFO(player->class_)->attackState); #ifdef _DEBUG - Con_Message("P_FireWeapon: Setting player %i to attack state.\n", (int)(player - players)); + Con_Message("P_FireWeapon: Setting player %i to attack state.", (int)(player - players)); #endif if(player->refire) @@ -1935,7 +1935,7 @@ void C_DECL A_Egg(mobj_t* mo) return; #ifdef _DEBUG - Con_Message("A_Egg: Spawning EGGFXs.\n"); + Con_Message("A_Egg: Spawning EGGFXs."); #endif #if __JHEXEN__ diff --git a/doomsday/plugins/heretic/src/p_spec.c b/doomsday/plugins/heretic/src/p_spec.c index aee98e8b47..bcb34b12a2 100644 --- a/doomsday/plugins/heretic/src/p_spec.c +++ b/doomsday/plugins/heretic/src/p_spec.c @@ -318,7 +318,7 @@ static void loadAnimDefs(animdef_t* animDefs, boolean isCustom) numFrames = (endFrame > startFrame? endFrame - startFrame : startFrame - endFrame) + 1; if(numFrames < 2) { - Con_Message("Warning:loadAnimDefs: Bad cycle from '%s' to '%s' in sequence #%i, ignoring.\n", animDefs[i].startname, animDefs[i].endname, i); + Con_Message("Warning: loadAnimDefs: Bad cycle from '%s' to '%s' in sequence #%i, ignoring.", animDefs[i].startname, animDefs[i].endname, i); continue; } @@ -337,7 +337,7 @@ static void loadAnimDefs(animdef_t* animDefs, boolean isCustom) { AutoStr* from = Uri_ToString(startUri); AutoStr* to = Uri_ToString(endUri); - Con_Message(" %d: From:\"%s\" To:\"%s\" Tics:%i\n", i, Str_Text(from), Str_Text(to), ticsPerFrame); + Con_Message(" %d: From:\"%s\" To:\"%s\" Tics:%i", i, Str_Text(from), Str_Text(to), ticsPerFrame); } // Find an animation group for this. @@ -375,13 +375,13 @@ void P_InitPicAnims(void) * Support for this extension should be considered depreciated. * All new features should be added, accessed via DED. */ - VERBOSE( Con_Message("Processing lump %s::ANIMATED...\n", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) + VERBOSE( Con_Message("Processing lump %s::ANIMATED...", F_PrettyPath(Str_Text(W_LumpSourceFile(lumpNum)))) ) loadAnimDefs((animdef_t*)W_CacheLump(lumpNum), true); W_UnlockLump(lumpNum); return; }} - VERBOSE( Con_Message("Registering default texture animations...\n") ); + VERBOSE( Con_Message("Registering default texture animations...") ); loadAnimDefs(anims, false); } diff --git a/doomsday/plugins/heretic/src/st_stuff.c b/doomsday/plugins/heretic/src/st_stuff.c index 9548c75166..be7564882d 100644 --- a/doomsday/plugins/heretic/src/st_stuff.c +++ b/doomsday/plugins/heretic/src/st_stuff.c @@ -1288,14 +1288,14 @@ void ST_HUDUnHide(int player, hueevent_t ev) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid player #%i, ignoring.", player); + Con_Message("Warning: ST_HUDUnHide: Invalid player #%i, ignoring.", player); #endif return; } if(ev < HUE_FORCE || ev > NUMHUDUNHIDEEVENTS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); + Con_Message("Warning: ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); #endif return; } @@ -2457,7 +2457,7 @@ void ST_Drawer(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_Drawer: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: ST_Drawer: Invalid player #%i, ignoring.", player); #endif return; } @@ -3184,7 +3184,7 @@ D_CMD(ChatOpen) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -3234,9 +3234,9 @@ D_CMD(ChatSendMacro) if(argc < 2 || argc > 3) { - Con_Message("Usage: %s (team) (macro number)\n", argv[0]); + Con_Message("Usage: %s (team) (macro number)", argv[0]); Con_Message("Send a chat macro to other player(s).\n" - "If (team) is omitted, the message will be sent to all players.\n"); + "If (team) is omitted, the message will be sent to all players."); return true; } @@ -3251,7 +3251,7 @@ D_CMD(ChatSendMacro) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -3259,7 +3259,7 @@ D_CMD(ChatSendMacro) macroId = UIChat_ParseMacroId(argc == 3? argv[2] : argv[1]); if(-1 == macroId) { - Con_Message("Invalid macro id.\n"); + Con_Message("Invalid macro id."); return false; } diff --git a/doomsday/plugins/hexen/src/h2_main.c b/doomsday/plugins/hexen/src/h2_main.c index d433a18d8a..67254befe8 100644 --- a/doomsday/plugins/hexen/src/h2_main.c +++ b/doomsday/plugins/hexen/src/h2_main.c @@ -384,7 +384,7 @@ void X_PostInit(void) if(scale > 400) scale = 400; - Con_Message("Turbo scale: %i%%\n", scale); + Con_Message("Turbo scale: %i%%", scale); turboMul = scale / 100.f; } @@ -396,10 +396,10 @@ void X_PostInit(void) P_InitMapMusicInfo(); // Init music fields in mapinfo. - Con_Message("Parsing SNDINFO...\n"); + Con_Message("Parsing SNDINFO..."); S_ParseSndInfoLump(); - Con_Message("SN_InitSequenceScript: Registering sound sequences.\n"); + Con_Message("SN_InitSequenceScript: Registering sound sequences."); SN_InitSequenceScript(); // Load a saved game? @@ -425,11 +425,11 @@ void X_PostInit(void) playerclass_t pClass = (playerclass_t)atoi(CommandLine_At(p + 1)); if(!VALID_PLAYER_CLASS(pClass)) { - Con_Message("Warning: Invalid player class id=%d specified with -class, ignoring.\n", (int)pClass); + Con_Message("Warning: Invalid player class id=%d specified with -class, ignoring.", (int)pClass); } else if(!PCLASS_INFO(pClass)->userSelectable) { - Con_Message("Warning: Non-user-selectable player class id=%d specified with -class, ignoring.\n", (int)pClass); + Con_Message("Warning: Non-user-selectable player class id=%d specified with -class, ignoring.", (int)pClass); } else { @@ -439,7 +439,7 @@ void X_PostInit(void) if(startPlayerClass != PCLASS_NONE) { - Con_Message("Player Class: '%s'\n", PCLASS_INFO(startPlayerClass)->niceName); + Con_Message("Player Class: '%s'", PCLASS_INFO(startPlayerClass)->niceName); cfg.playerClass[CONSOLEPLAYER] = startPlayerClass; autoStart = true; } @@ -461,7 +461,7 @@ void X_PostInit(void) // Are we autostarting? if(autoStart) { - Con_Message("Warp to Map %d (\"%s\":%d), Skill %d\n", warpMap+1, P_GetMapName(startMap), startMap+1, startSkill + 1); + Con_Message("Warp to Map %d (\"%s\":%d), Skill %d", warpMap+1, P_GetMapName(startMap), startMap+1, startSkill + 1); } // Validate episode and map. diff --git a/doomsday/plugins/hexen/src/hrefresh.c b/doomsday/plugins/hexen/src/hrefresh.c index 17bdbace28..9b9723b5ff 100644 --- a/doomsday/plugins/hexen/src/hrefresh.c +++ b/doomsday/plugins/hexen/src/hrefresh.c @@ -116,7 +116,7 @@ void R_UpdateViewFilter(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:R_UpdateViewFilter: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: R_UpdateViewFilter: Invalid player #%i, ignoring.", player); #endif return; } @@ -180,7 +180,7 @@ static void rendPlayerView(int player) if(!plr->plr->mo) { - Con_Message("rendPlayerView: Rendering view of player %i, who has no mobj!\n", player); + Con_Message("rendPlayerView: Rendering view of player %i, who has no mobj!", player); return; } diff --git a/doomsday/plugins/hexen/src/m_cheat.c b/doomsday/plugins/hexen/src/m_cheat.c index 27ed403d11..2f0b2cb274 100644 --- a/doomsday/plugins/hexen/src/m_cheat.c +++ b/doomsday/plugins/hexen/src/m_cheat.c @@ -286,19 +286,19 @@ static void printDebugInfo(int player) // Also print some information to the console. Con_Message("%s", textBuffer); sub = plr->plr->mo->bspLeaf; - Con_Message("\nBspLeaf %i:\n", P_ToIndex(sub)); + Con_Message("BspLeaf %i:", P_ToIndex(sub)); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_FLOOR_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" FloorZ:%g Material:%s\n", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); + Con_Message(" FloorZ:%g Material:%s", P_GetDoublep(sub, DMU_FLOOR_HEIGHT), Str_Text(path)); Uri_Delete(uri); uri = Materials_ComposeUri(P_GetIntp(sub, DMU_CEILING_MATERIAL)); path = Uri_ToString(uri); - Con_Message(" CeilingZ:%g Material:%s\n", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); + Con_Message(" CeilingZ:%g Material:%s", P_GetDoublep(sub, DMU_CEILING_HEIGHT), Str_Text(path)); Uri_Delete(uri); - Con_Message("Player height:%g Player radius:%g\n", + Con_Message("Player height:%g Player radius:%g", plr->plr->mo->height, plr->plr->mo->radius); } diff --git a/doomsday/plugins/hexen/src/p_acs.c b/doomsday/plugins/hexen/src/p_acs.c index 9dce6d9a8e..08218789b0 100644 --- a/doomsday/plugins/hexen/src/p_acs.c +++ b/doomsday/plugins/hexen/src/p_acs.c @@ -256,7 +256,7 @@ void P_LoadACScripts(int lump) acsinfo_t* info; int i; - VERBOSE( Con_Message("Loading ACS bytecode lump %s:%s (#%i)...\n", + VERBOSE( Con_Message("Loading ACS bytecode lump %s:%s (#%i)...", F_PrettyPath(Str_Text(W_LumpSourceFile(lump))), Str_Text(W_LumpName(lump)), lump) ) ACScriptCount = 0; @@ -277,7 +277,7 @@ void P_LoadACScripts(int lump) if(ACScriptCount == 0 || IS_CLIENT) { // Empty/Invalid lump. - Con_Message("Warning: P_LoadACSScripts: lumpnum %i does not appear to be valid ACS bytecode, ignoring.\n", lump); + Con_Message("Warning: P_LoadACSScripts: lumpnum %i does not appear to be valid ACS bytecode, ignoring.", lump); return; } @@ -383,7 +383,7 @@ boolean P_StartACS(int number, uint map, byte* args, mobj_t* activator, #ifdef _DEBUG if(IS_CLIENT) { - Con_Message("P_StartACS: Client is attempting to start a script!\n"); + Con_Message("P_StartACS: Client is attempting to start a script!"); } #endif diff --git a/doomsday/plugins/hexen/src/p_inter.c b/doomsday/plugins/hexen/src/p_inter.c index 95b86b75f4..a16f4a7933 100644 --- a/doomsday/plugins/hexen/src/p_inter.c +++ b/doomsday/plugins/hexen/src/p_inter.c @@ -1227,7 +1227,7 @@ void P_TouchSpecialMobj(mobj_t* special, mobj_t* toucher) } else { - Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.\n", + Con_Message("P_TouchSpecialMobj: Unknown gettable thing %i.", (int) special->type); } diff --git a/doomsday/plugins/hexen/src/p_mapinfo.c b/doomsday/plugins/hexen/src/p_mapinfo.c index 0b4b9f8e30..edd1578eca 100644 --- a/doomsday/plugins/hexen/src/p_mapinfo.c +++ b/doomsday/plugins/hexen/src/p_mapinfo.c @@ -325,7 +325,7 @@ void P_InitMapInfo(void) } #ifdef _DEBUG - Con_Message("MAPINFO: map%i \"%s\" warp:%i\n", map, info->name, info->warpTrans); + Con_Message("MAPINFO: map%i \"%s\" warp:%i", map, info->name, info->warpTrans); #endif mapMax = map > mapMax ? map : mapMax; @@ -355,7 +355,7 @@ static void setSongCDTrack(int index, int track) int cdTrack = track; #ifdef _DEBUG - Con_Message("setSongCDTrack: index=%i, track=%i\n", index, track); + Con_Message("setSongCDTrack: index=%i, track=%i", index, track); #endif // Set the internal array. @@ -385,14 +385,14 @@ uint P_TranslateMapIfExists(uint map) if(info->cluster) { #ifdef _DEBUG - Con_Message("P_TranslateMapIfExists: warp %i translated to logical %i, cluster %i\n", map, i, info->cluster); + Con_Message("P_TranslateMapIfExists: warp %i translated to logical %i, cluster %i", map, i, info->cluster); #endif return i; } else { #ifdef _DEBUG - Con_Message("P_TranslateMapIfExists: warp %i matches logical %i, but it has no cluster\n", map, i); + Con_Message("P_TranslateMapIfExists: warp %i matches logical %i, but it has no cluster", map, i); #endif matchedWithoutCluster = i; } @@ -400,7 +400,7 @@ uint P_TranslateMapIfExists(uint map) } #ifdef _DEBUG - Con_Message("P_TranslateMapIfExists: could not find warp %i, translating to logical %i\n", + Con_Message("P_TranslateMapIfExists: could not find warp %i, translating to logical %i", map, matchedWithoutCluster); #endif return matchedWithoutCluster; diff --git a/doomsday/plugins/hexen/src/p_pspr.c b/doomsday/plugins/hexen/src/p_pspr.c index d479a7061d..6d0e59eefd 100644 --- a/doomsday/plugins/hexen/src/p_pspr.c +++ b/doomsday/plugins/hexen/src/p_pspr.c @@ -437,7 +437,7 @@ void P_BringUpWeapon(player_t* player) wminfo = WEAPON_INFO(raiseWeapon, player->class_, 0); #if _DEBUG - Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i\n", + Con_Message("P_BringUpWeapon: Player %i, pending weapon was %i, weapon pspr to %i", (int)(player - players), oldPendingWeapon, wminfo->states[WSN_UP]); #endif diff --git a/doomsday/plugins/hexen/src/po_man.c b/doomsday/plugins/hexen/src/po_man.c index ebda5fe210..0515c93c44 100644 --- a/doomsday/plugins/hexen/src/po_man.c +++ b/doomsday/plugins/hexen/src/po_man.c @@ -621,7 +621,7 @@ void PO_InitForMap(void) { uint i; - Con_Message("PO_InitForMap: Initializing polyobjects.\n"); + Con_Message("PO_InitForMap: Initializing polyobjects."); // thrustMobj will handle polyobj <-> mobj interaction. P_SetPolyobjCallback(thrustMobj); diff --git a/doomsday/plugins/hexen/src/sc_man.c b/doomsday/plugins/hexen/src/sc_man.c index b4bc6d0fef..5727c31d59 100644 --- a/doomsday/plugins/hexen/src/sc_man.c +++ b/doomsday/plugins/hexen/src/sc_man.c @@ -93,7 +93,7 @@ static void openScriptLump(lumpnum_t lumpNum) if(lumpNum < 0 || lumpNum >= Get(DD_NUMLUMPS)) { - Con_Message("Warning: SC_OpenLump: Invalid lump #%i, ignoring.\n", lumpNum); + Con_Message("Warning: SC_OpenLump: Invalid lump #%i, ignoring.", lumpNum); return; } @@ -123,7 +123,7 @@ static void openScriptFile(const char* name) ScriptSize = M_ReadFile(name, &bufferHandle); if(0 == ScriptSize) { - Con_Message("Warning:SC_Open: Failed opening \"%s\" for reading.\n", name); + Con_Message("Warning: SC_Open: Failed opening \"%s\" for reading.", name); return; } diff --git a/doomsday/plugins/hexen/src/sn_sonix.c b/doomsday/plugins/hexen/src/sn_sonix.c index dc05fe9a55..e20eea193a 100644 --- a/doomsday/plugins/hexen/src/sn_sonix.c +++ b/doomsday/plugins/hexen/src/sn_sonix.c @@ -393,14 +393,14 @@ void SN_UpdateActiveSequences(void) { case SS_CMD_PLAY: #if 0 -Con_Message("play: %s: %p\n", SequenceTranslate[node->sequence].name, +Con_Message("play: %s: %p", SequenceTranslate[node->sequence].name, node->mobj); #endif if(!sndPlaying) { node->currentSoundID = *(node->sequencePtr + 1); #if 0 -Con_Message("PLAY: %s: %p\n", SequenceTranslate[node->sequence].name, +Con_Message("PLAY: %s: %p", SequenceTranslate[node->sequence].name, node->mobj); #endif S_StartSoundAtVolume(node->currentSoundID, node->mobj, @@ -419,15 +419,15 @@ Con_Message("PLAY: %s: %p\n", SequenceTranslate[node->sequence].name, case SS_CMD_PLAYREPEAT: #if 0 -Con_Message("rept: %s: %p\n", SequenceTranslate[node->sequence].name, +Con_Message("rept: %s: %p", SequenceTranslate[node->sequence].name, node->mobj); #endif if(!sndPlaying) { #if 0 -Con_Printf("REPT: id=%i, %s: %p\n", node->currentSoundID, - SequenceTranslate[node->sequence].name, node->mobj); +Con_Message("REPT: id=%i, %s: %p", node->currentSoundID, + SequenceTranslate[node->sequence].name, node->mobj); #endif node->currentSoundID = *(node->sequencePtr + 1); diff --git a/doomsday/plugins/hexen/src/st_stuff.c b/doomsday/plugins/hexen/src/st_stuff.c index 5c278ab1a5..b127eadb4b 100644 --- a/doomsday/plugins/hexen/src/st_stuff.c +++ b/doomsday/plugins/hexen/src/st_stuff.c @@ -2050,14 +2050,14 @@ void ST_HUDUnHide(int player, hueevent_t ev) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid player #%i, ignoring.", player); + Con_Message("Warning: ST_HUDUnHide: Invalid player #%i, ignoring.", player); #endif return; } if(ev < HUE_FORCE || ev > NUMHUDUNHIDEEVENTS) { #if _DEBUG - Con_Message("Warning:ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); + Con_Message("Warning: ST_HUDUnHide: Invalid event type %i, ignoring.", (int) ev); #endif return; } @@ -3663,7 +3663,7 @@ void ST_Drawer(int player) if(player < 0 || player >= MAXPLAYERS) { #if _DEBUG - Con_Message("Warning:ST_Drawer: Invalid player #%i, ignoring.\n", player); + Con_Message("Warning: ST_Drawer: Invalid player #%i, ignoring.", player); #endif return; } @@ -3719,7 +3719,7 @@ D_CMD(ChatOpen) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -3769,9 +3769,9 @@ D_CMD(ChatSendMacro) if(argc < 2 || argc > 3) { - Con_Message("Usage: %s (team) (macro number)\n", argv[0]); + Con_Message("Usage: %s (team) (macro number)", argv[0]); Con_Message("Send a chat macro to other player(s).\n" - "If (team) is omitted, the message will be sent to all players.\n"); + "If (team) is omitted, the message will be sent to all players."); return true; } @@ -3786,7 +3786,7 @@ D_CMD(ChatSendMacro) destination = UIChat_ParseDestination(argv[1]); if(destination < 0) { - Con_Message("Invalid team number #%i (valid range: 0..%i).\n", destination, NUMTEAMS); + Con_Message("Invalid team number #%i, valid range: [0..%i).", destination, NUMTEAMS); return false; } } @@ -3794,7 +3794,7 @@ D_CMD(ChatSendMacro) macroId = UIChat_ParseMacroId(argc == 3? argv[2] : argv[1]); if(-1 == macroId) { - Con_Message("Invalid macro id.\n"); + Con_Message("Invalid macro id."); return false; } diff --git a/doomsday/plugins/openal/src/driver_openal.cpp b/doomsday/plugins/openal/src/driver_openal.cpp index 8bf8c22f65..9234283791 100644 --- a/doomsday/plugins/openal/src/driver_openal.cpp +++ b/doomsday/plugins/openal/src/driver_openal.cpp @@ -151,7 +151,7 @@ int DS_Init(void) device = alcOpenDevice((ALCchar*) "DirectSound3D"); if(!device) { - Con_Message("OpenAL init failed (device: DirectSound3D).\n"); + Con_Message("OpenAL init failed (device: DirectSound3D)."); return false; } @@ -300,14 +300,6 @@ void DS_SFX_Play(sfxbuffer_t* buf) if(!buf || !buf->sample) return; source = SRC(buf); - -/*#if _DEBUG - alGetSourcei(source, AL_BUFFER, &bn); - Con_Message("Buffer = %x\n", bn); - if(bn != BUF(buf)) - Con_Message("Not the same!\n"); -#endif*/ - alSourcei(source, AL_BUFFER, BUF(buf)); alSourcei(source, AL_LOOPING, (buf->flags & SFXBF_REPEAT) != 0); alSourcePlay(source); diff --git a/doomsday/plugins/winmm/src/cdaudio.cpp b/doomsday/plugins/winmm/src/cdaudio.cpp index ded8d586e3..6e5bd43369 100644 --- a/doomsday/plugins/winmm/src/cdaudio.cpp +++ b/doomsday/plugins/winmm/src/cdaudio.cpp @@ -82,7 +82,7 @@ static int sendMCICmd(char* returnInfo, int returnLength, if((error = mciSendStringA(buf, returnInfo, returnLength, NULL))) { mciGetErrorStringA(error, buf, 300); - Con_Message("DM_WinCD: %s\n", buf); + Con_Message("DM_WinCD: %s", buf); return false; } diff --git a/doomsday/plugins/winmm/src/dswinmm.cpp b/doomsday/plugins/winmm/src/dswinmm.cpp index 1a67804846..4eb126a760 100644 --- a/doomsday/plugins/winmm/src/dswinmm.cpp +++ b/doomsday/plugins/winmm/src/dswinmm.cpp @@ -169,17 +169,17 @@ static void initMixerLine(mixerdata_t* mix, DWORD type) MMSYSERR_NOERROR) { if(verbose) - Con_Message(" Error getting line info: " "Error %i\n", res); + Con_Message(" Error getting line info: Error %i", res); return; } if(verbose) { - Con_Message(" Destination line idx: %i\n", mix->line.dwDestination); - Con_Message(" Line ID: 0x%x\n", mix->line.dwLineID); - Con_Message(" Channels: %i\n", mix->line.cChannels); - Con_Message(" Controls: %i\n", mix->line.cControls); - Con_Message(" Name: %s (%s)\n", mix->line.szName, + Con_Message(" Destination line idx: %i", mix->line.dwDestination); + Con_Message(" Line ID: 0x%x", mix->line.dwLineID); + Con_Message(" Channels: %i", mix->line.cChannels); + Con_Message(" Controls: %i", mix->line.cControls); + Con_Message(" Name: %s (%s)", mix->line.szName, mix->line.szShortName); } @@ -195,17 +195,15 @@ static void initMixerLine(mixerdata_t* mix, DWORD type) MMSYSERR_NOERROR) { if(verbose) - Con_Message(" Error getting line controls " "(vol): error %i\n", - res); + Con_Message(" Error getting line controls " "(vol): error %i", res); return; } if(verbose) { - Con_Message(" Volume control ID: 0x%x\n", mix->volume.dwControlID); - Con_Message(" Name: %s (%s)\n", mix->volume.szName, - mix->volume.szShortName); - Con_Message(" Min/Max: %i/%i\n", mix->volume.Bounds.dwMinimum, + Con_Message(" Volume control ID: 0x%x", mix->volume.dwControlID); + Con_Message(" Name: %s (%s)", mix->volume.szName, mix->volume.szShortName); + Con_Message(" Min/Max: %i/%i", mix->volume.Bounds.dwMinimum, mix->volume.Bounds.dwMaximum); } @@ -229,7 +227,7 @@ static int initMixer(void) if(verbose) { // In verbose mode, print a lot of extra information. - Con_Message("dsWinMM::initMixer: Number of mixer devices: %i\n", num); + Con_Message("dsWinMM::initMixer: Number of mixer devices: %i", num); } // Open the mixer device. @@ -237,24 +235,24 @@ static int initMixer(void) if(res != MMSYSERR_NOERROR) { if(verbose) - Con_Message(" Error opening mixer: Error %i\n", res); + Con_Message(" Error opening mixer: Error %i", res); return 0; } // Get the device caps. mixerGetDevCaps((UINT_PTR) mixer, &mixerCaps, sizeof(mixerCaps)); - Con_Message("dsWinMM::initMixer: %s\n", mixerCaps.szPname); + Con_Message("dsWinMM::initMixer: %s", mixerCaps.szPname); if(verbose) - Con_Message(" Audio line destinations: %i\n", + Con_Message(" Audio line destinations: %i", mixerCaps.cDestinations); // Init CD mixer. if(verbose) - Con_Message("Init CD audio line:\n"); + Con_Message("Init CD audio line:"); initMixerLine(&mixCD, MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC); if(verbose) - Con_Message("Init synthesizer line:\n"); + Con_Message("Init synthesizer line:"); initMixerLine(&mixMidi, MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER); // We're successful. @@ -324,7 +322,7 @@ int DM_Music_Init(void) if(midiAvail) return true; // Already initialized. - Con_Message("DM_WinMusInit: %i MIDI-Out devices present.\n", + Con_Message("DM_WinMusInit: %i MIDI-Out devices present.", midiOutGetNumDevs()); MIDIStreamer = new WinMIDIStreamer; @@ -337,7 +335,7 @@ int DM_Music_Init(void) MIDIStreamer->volumeShift = CommandLine_Exists("-mdvol") ? 1 : 0; // Now the MIDI is available. - Con_Message("DM_WinMusInit: MIDI initialized.\n"); + Con_Message("DM_WinMusInit: MIDI initialized."); return midiAvail = true; } diff --git a/doomsday/plugins/winmm/src/midistream.cpp b/doomsday/plugins/winmm/src/midistream.cpp index 3612af7c6e..5187df49b4 100644 --- a/doomsday/plugins/winmm/src/midistream.cpp +++ b/doomsday/plugins/winmm/src/midistream.cpp @@ -233,7 +233,7 @@ int WinMIDIStreamer::GetNextEvent(MIDIEVENT* mev) midiParm2 = i; /*#if _DEBUG -Con_Message("time: %i note: p1:%i p2:%i\n", mev->dwDeltaTime, midiParm1, +Con_Message("time: %i note: p1:%i p2:%i", mev->dwDeltaTime, midiParm1, midiParm2); #endif*/ break; @@ -269,7 +269,7 @@ Con_Message("time: %i note: p1:%i p2:%i\n", mev->dwDeltaTime, midiParm1, midiParm2 = i >> 7; /*#if _DEBUG -Con_Message("pitch wheel: ch %d (%x %x = %x)\n", evDesc->channel, +Con_Message("pitch wheel: ch %d (%x %x = %x)", evDesc->channel, midiParm1, midiParm2, midiParm1 | (midiParm2 << 7)); #endif*/ break; @@ -294,7 +294,7 @@ Con_Message("pitch wheel: ch %d (%x %x = %x)\n", evDesc->channel, midiChan = 15; /*#if _DEBUG -Con_Message("MIDI event/%d: %x %d %d\n",evDesc->channel,midiStatus, +Con_Message("MIDI event/%d: %x %d %d",evDesc->channel,midiStatus, midiParm1,midiParm2); #endif*/ diff --git a/doomsday/server/src/server/sv_frame.cpp b/doomsday/server/src/server/sv_frame.cpp index bcb78d6d7d..4c2308634d 100644 --- a/doomsday/server/src/server/sv_frame.cpp +++ b/doomsday/server/src/server/sv_frame.cpp @@ -146,7 +146,7 @@ void Sv_TransmitFrame(void) if(clients[i].ready) // && clients[i].updateCount > 0) { /*#ifdef _DEBUG - Con_Message("Sv_TransmitFrame: Sending at tic %i to plr %i\n", lastTransmitTic, i); + Con_Message("Sv_TransmitFrame: Sending at tic %i to plr %i", lastTransmitTic, i); #endif*/ // A frame will be sent to this client. If the client // doesn't send ticcmds, the updatecount will eventually @@ -158,7 +158,7 @@ void Sv_TransmitFrame(void) #ifdef _DEBUG else { - Con_Message("Sv_TransmitFrame: NOT sending at tic %i to plr %i (ready:%i)\n", lastTransmitTic, i, + Con_Message("Sv_TransmitFrame: NOT sending at tic %i to plr %i (ready:%i)", lastTransmitTic, i, clients[i].ready); } #endif @@ -412,7 +412,7 @@ void Sv_WritePlayerDelta(const void* deltaPtr) { Writer_WriteUInt32(msgWriter, d->filter); #ifdef _DEBUG - Con_Message("Sv_WritePlayerDelta: Plr %i, filter %08x\n", delta->delta.id, d->filter); + Con_Message("Sv_WritePlayerDelta: Plr %i, filter %08x", delta->delta.id, d->filter); #endif } if(df & PDF_PSPRITES) // Only set if there's something to write. diff --git a/doomsday/server/src/server/sv_main.cpp b/doomsday/server/src/server/sv_main.cpp index 1bc9d2b74b..b45f77555a 100644 --- a/doomsday/server/src/server/sv_main.cpp +++ b/doomsday/server/src/server/sv_main.cpp @@ -222,7 +222,7 @@ void Sv_HandlePlayerInfoFromClient(client_t* sender) assert(netBuffer.player == (sender - clients)); #ifdef _DEBUG - Con_Message("Sv_HandlePlayerInfoFromClient: from=%i, console=%i\n", netBuffer.player, console); + Con_Message("Sv_HandlePlayerInfoFromClient: from=%i, console=%i", netBuffer.player, console); #endif console = netBuffer.player; @@ -378,7 +378,7 @@ Con_Printf("Sv_HandlePacket: OK (\"ready!\") from client %i " finaleid_t fid = Reader_ReadUInt32(msgReader); uint16_t params = Reader_ReadUInt16(msgReader); #ifdef _DEBUG - Con_Message("PCL_FINALE_REQUEST: fid=%i params=%i\n", fid, params); + Con_Message("PCL_FINALE_REQUEST: fid=%i params=%i", fid, params); #endif if(params == 1) { @@ -426,7 +426,7 @@ void Sv_Login(void) // OK! netRemoteUser = netBuffer.player; - Con_Message("Sv_Login: %s (client %i) logged in.\n", + Con_Message("Sv_Login: %s (client %i) logged in.", clients[netRemoteUser].name, netRemoteUser); // Send a confirmation packet to the client. Msg_Begin(PKT_LOGIN); @@ -449,7 +449,7 @@ void Sv_ExecuteCommand(void) if(!netRemoteUser) { - Con_Message("Sv_ExecuteCommand: Cmd received but no one's logged in!\n"); + Con_Message("Sv_ExecuteCommand: Cmd received but no one's logged in!"); return; } // The command packet is very simple. @@ -528,7 +528,7 @@ void Sv_GetPackets(void) acked->origin = Reader_ReadInt32(msgReader); acked->mom = Reader_ReadInt32(msgReader); #ifdef _DEBUG - Con_Message("PCL_ACK_PLAYER_FIX: (%i) Angles %i (%i), pos %i (%i), mom %i (%i).\n", + Con_Message("PCL_ACK_PLAYER_FIX: (%i) Angles %i (%i), pos %i (%i), mom %i (%i).", netBuffer.player, acked->angles, ddpl->fixCounter.angles, @@ -582,7 +582,7 @@ boolean Sv_PlayerArrives(unsigned int nodeID, char const *name) { int i; - Con_Message("Sv_PlayerArrives: '%s' has arrived.\n", name); + Con_Message("Sv_PlayerArrives: '%s' has arrived.", name); // We need to find the new player a client entry. for(i = 1; i < DDMAXPLAYERS; ++i) @@ -645,7 +645,7 @@ void Sv_PlayerLeaves(unsigned int nodeID) plr = &ddPlayers[plrNum]; // Print a little something in the console. - Con_Message("Sv_PlayerLeaves: '%s' (console %i) has left, was connected for %f seconds.\n", + Con_Message("Sv_PlayerLeaves: '%s' (console %i) has left, was connected for %f seconds.", cl->name, plrNum, Timer_RealSeconds() - cl->enterTime); wasInGame = plr->shared.inGame; @@ -686,7 +686,7 @@ void Sv_Handshake(int plrNum, boolean newPlayer) uint playersInGame = 0; #ifdef _DEBUG - Con_Message("Sv_Handshake: Shaking hands with player %i.\n", plrNum); + Con_Message("Sv_Handshake: Shaking hands with player %i.", plrNum); #endif for(i = 0; i < DDMAXPLAYERS; ++i) @@ -797,7 +797,7 @@ void Sv_StartNetGame(void) // Prepare the material dictionary we'll be using with clients. materialDict = MaterialArchive_New(false); #ifdef _DEBUG - Con_Message("Sv_StartNetGame: Prepared material dictionary with %i materials.\n", + Con_Message("Sv_StartNetGame: Prepared material dictionary with %i materials.", MaterialArchive_Count(materialDict)); #endif @@ -888,7 +888,7 @@ void Sv_SendPlayerFixes(int plrNum) Writer_WriteUInt16(msgWriter, ddpl->mo->thinker.id); #ifdef _DEBUG - Con_Message("Sv_SendPlayerFixes: Fixing mobj %i...\n", ddpl->mo->thinker.id); + Con_Message("Sv_SendPlayerFixes: Fixing mobj %i...", ddpl->mo->thinker.id); #endif // Increment counters. @@ -899,7 +899,7 @@ void Sv_SendPlayerFixes(int plrNum) Writer_WriteFloat(msgWriter, ddpl->lookDir); #ifdef _DEBUG - Con_Message("Sv_SendPlayerFixes: Sent angles (%i): angle=%x lookdir=%f\n", + Con_Message("Sv_SendPlayerFixes: Sent angles (%i): angle=%x lookdir=%f", ddpl->fixCounter.angles, ddpl->mo->angle, ddpl->lookDir); #endif } @@ -912,7 +912,7 @@ void Sv_SendPlayerFixes(int plrNum) Writer_WriteFloat(msgWriter, ddpl->mo->origin[VZ]); #ifdef _DEBUG - Con_Message("Sv_SendPlayerFixes: Sent position (%i): %f, %f, %f\n", + Con_Message("Sv_SendPlayerFixes: Sent position (%i): %f, %f, %f", ddpl->fixCounter.origin, ddpl->mo->origin[VX], ddpl->mo->origin[VY], ddpl->mo->origin[VZ]); #endif @@ -926,7 +926,7 @@ void Sv_SendPlayerFixes(int plrNum) Writer_WriteFloat(msgWriter, ddpl->mo->mom[MZ]); #ifdef _DEBUG - Con_Message("Sv_SendPlayerFixes: Sent momentum (%i): %f, %f, %f\n", + Con_Message("Sv_SendPlayerFixes: Sent momentum (%i): %f, %f, %f", ddpl->fixCounter.mom, ddpl->mo->mom[MX], ddpl->mo->mom[MY], ddpl->mo->mom[MZ]); #endif @@ -939,7 +939,7 @@ void Sv_SendPlayerFixes(int plrNum) ddpl->flags &= ~(DDPF_FIXANGLES | DDPF_FIXORIGIN | DDPF_FIXMOM); #ifdef _DEBUG - Con_Message("Sv_SendPlayerFixes: Cleared FIX flags of player %i.\n", plrNum); + Con_Message("Sv_SendPlayerFixes: Cleared FIX flags of player %i.", plrNum); #endif // Clear the smoother for this client. @@ -1125,14 +1125,14 @@ void Sv_ClientCoords(int plrNum) if(ddpl->fixCounter.angles == ddpl->fixAcked.angles && !(ddpl->flags & DDPF_FIXANGLES)) { #ifdef _DEBUG - VERBOSE2( Con_Message("Sv_ClientCoords: Setting angles for player %i: %x, %f\n", plrNum, clientAngle, clientLookDir) ); + VERBOSE2( Con_Message("Sv_ClientCoords: Setting angles for player %i: %x, %f", plrNum, clientAngle, clientLookDir) ); #endif mo->angle = clientAngle; ddpl->lookDir = clientLookDir; } #ifdef _DEBUG - VERBOSE2( Con_Message("Sv_ClientCoords: Received coords for player %i: %f, %f, %f\n", plrNum, + VERBOSE2( Con_Message("Sv_ClientCoords: Received coords for player %i: %f, %f, %f", plrNum, clientPos[VX], clientPos[VY], clientPos[VZ]) ); #endif @@ -1141,7 +1141,7 @@ void Sv_ClientCoords(int plrNum) if(Sv_CanTrustClientPos(plrNum)) { #ifdef _DEBUG - VERBOSE2( Con_Message("Sv_ClientCoords: Setting coords for player %i: %f, %f, %f\n", plrNum, + VERBOSE2( Con_Message("Sv_ClientCoords: Setting coords for player %i: %f, %f, %f", plrNum, clientPos[VX], clientPos[VY], clientPos[VZ]) ); #endif Smoother_AddPos(clients[plrNum].smoother, clientGameTime, diff --git a/doomsday/server/src/server/sv_pool.cpp b/doomsday/server/src/server/sv_pool.cpp index 4337699440..214e454ee3 100644 --- a/doomsday/server/src/server/sv_pool.cpp +++ b/doomsday/server/src/server/sv_pool.cpp @@ -707,7 +707,7 @@ boolean Sv_RegisterCompareSector(cregister_t* reg, uint number, #ifdef _DEBUG if(df & (SDF_CEILING_HEIGHT | SDF_CEILING_SPEED | SDF_CEILING_TARGET)) { - Con_Message("Sector %i: ceiling state change noted (target = %f)\n", number, s->planes[PLN_CEILING]->target); + Con_Message("Sector %i: ceiling state change noted (target = %f)", number, s->planes[PLN_CEILING]->target); } #endif @@ -2275,7 +2275,7 @@ void Sv_NewPolyDeltas(cregister_t* reg, boolean doUpdate, pool_t** targets) if(Sv_RegisterComparePoly(reg, i, &delta)) { #ifdef _DEBUG - VERBOSE( Con_Message("Sv_NewPolyDeltas: Change in %i\n", i) ); + VERBOSE( Con_Message("Sv_NewPolyDeltas: Change in %i", i) ); #endif Sv_AddDeltaToPools(&delta, targets); } diff --git a/doomsday/server/src/serversystem.cpp b/doomsday/server/src/serversystem.cpp index 09198b5e3c..5decae9d9d 100644 --- a/doomsday/server/src/serversystem.cpp +++ b/doomsday/server/src/serversystem.cpp @@ -156,15 +156,15 @@ DENG2_PIMPL(ServerSystem) { int i, first; - Con_Message("SERVER: "); if(serverSock) { - Con_Message("Listening on TCP port %i.\n", serverSock->port()); + Con_Message("SERVER: Listening on TCP port %i.", serverSock->port()); } else { - Con_Message("No server socket open.\n"); + Con_Message("SERVER: No server socket open."); } + first = true; for(i = 1; i < DDMAXPLAYERS; ++i) { @@ -177,10 +177,10 @@ DENG2_PIMPL(ServerSystem) RemoteUser *user = users[cl->nodeID]; if(first) { - Con_Message("P# Name: Nd Jo Hs Rd Gm Age:\n"); + Con_Message("P# Name: Nd Jo Hs Rd Gm Age:"); first = false; } - Con_Message("%2i %-10s %2i %c %c %c %c %f sec\n", + Con_Message("%2i %-10s %2i %c %c %c %c %f sec", i, cl->name, cl->nodeID, user->isJoined()? '*' : ' ', cl->handshake? '*' : ' ', @@ -191,21 +191,21 @@ DENG2_PIMPL(ServerSystem) } if(first) { - Con_Message("No clients connected.\n"); + Con_Message("No clients connected."); } if(shellUsers.count()) { - Con_Message("%i connected shell user%s.\n", + Con_Message("%i connected shell user%s.", shellUsers.count(), shellUsers.count() == 1? "" : "s"); } N_PrintBufferInfo(); - Con_Message("Configuration:\n"); - Con_Message(" port for hosting games (net-ip-port): %i\n", Con_GetInteger("net-ip-port")); - Con_Message(" shell password (server-password): \"%s\"\n", netPassword); + Con_Message("Configuration:"); + Con_Message(" Port for hosting games (net-ip-port): %i", Con_GetInteger("net-ip-port")); + Con_Message(" Shell password (server-password): \"%s\"", netPassword); } };