Skip to content

Commit

Permalink
Refactor: Update Con_Message usage re closing line break
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Feb 25, 2013
1 parent 76d1f9c commit dbff054
Show file tree
Hide file tree
Showing 155 changed files with 819 additions and 870 deletions.
2 changes: 1 addition & 1 deletion doomsday/client/include/m_profiler.h
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions doomsday/client/src/audio/audiodriver.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)));
}
}
}
Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/src/audio/audiodriver_music.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/audio/m_mus2midi.cpp
Expand Up @@ -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;
}
Expand Down
11 changes: 5 additions & 6 deletions doomsday/client/src/audio/s_main.cpp
Expand Up @@ -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;
}

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
12 changes: 6 additions & 6 deletions doomsday/client/src/audio/s_mus.cpp
Expand Up @@ -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);
Expand All @@ -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])));
}
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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.
Expand Down
17 changes: 8 additions & 9 deletions doomsday/client/src/audio/s_sfx.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.") );
}
}

Expand All @@ -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.
Expand Down
13 changes: 6 additions & 7 deletions doomsday/client/src/audio/s_wav.cpp
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions doomsday/client/src/audio/sys_audiod_sdlmixer.cpp
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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());
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/src/busymode.cpp
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/client/cl_frame.cpp
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions doomsday/client/src/client/cl_infine.cpp
Expand Up @@ -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
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit dbff054

Please sign in to comment.