From 708a0169e86827b803e55fccd177b8f6c0925f13 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 14 Dec 2023 12:10:34 +0100 Subject: [PATCH] improve logging to console (again) (#1327) * improve logging to console (again) G_DoPlayDemo: Do not print compatibility, P_SetupLevel already does this. Instead, print the demo lump name and lump source name. G_DoLoadGame: Do not print map lump name and lump source name, P_SetupLevel already does this. Just print the slot number. I_OAL_CacheSound: Print the names of lumps failed to load with I_SND_LoadFile. P_SetupLevel: Print skill (interesting for demos and savegames), print complevel name and numerical value, condense nodes format reporting. * indentation * drop demo_version from P_SetupLevel output --- src/g_game.c | 12 ++---------- src/i_oalsound.c | 1 + src/p_setup.c | 25 ++++++++++++------------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 2341382f..4277f709 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1895,8 +1895,7 @@ static void G_DoPlayDemo(void) } // [FG] report compatibility mode - I_Printf(VB_INFO, "G_DoPlayDemo: Playing demo with %s (%d) compatibility.", - G_GetCurrentComplevelName(), demover); + I_Printf(VB_INFO, "G_DoPlayDemo: %s (%s)", basename, W_WadNameForLump(lumpnum)); } #define VERSIONSIZE 16 @@ -2333,14 +2332,7 @@ static void G_DoLoadGame(void) if (demorecording) // So this can only possibly be a -recordfrom command. G_BeginRecording();// Start the -recordfrom, since the game was loaded. - // [FG] log game loading - { - char *maplump = MAPNAME(gameepisode, gamemap); - int maplumpnum = W_CheckNumForName(maplump); - - I_Printf(VB_INFO, "G_DoLoadGame: Slot %d, %.8s (%s)", - 10*savepage+savegameslot, maplump, W_WadNameForLump(maplumpnum)); - } + I_Printf(VB_INFO, "G_DoLoadGame: Slot %02d", 10*savepage+savegameslot); M_SetQuickSaveSlot(savegameslot); } diff --git a/src/i_oalsound.c b/src/i_oalsound.c index 71ba7500..32955957 100644 --- a/src/i_oalsound.c +++ b/src/i_oalsound.c @@ -623,6 +623,7 @@ boolean I_OAL_CacheSound(sfxinfo_t *sfx) if (I_SND_LoadFile(lumpdata, &format, &wavdata, &size, &freq) == false) { + I_Printf(VB_WARNING, " I_OAL_CacheSound: %s", lumpinfo[lumpnum].name); break; } diff --git a/src/p_setup.c b/src/p_setup.c index e8196ec9..7bdb0f3d 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1669,19 +1669,18 @@ void P_SetupLevel(int episode, int map, int playermask, skill_t skill) R_PrecacheLevel(); // [FG] log level setup - { - I_Printf(VB_INFO, "P_SetupLevel: %.8s (%s), %s%s%s, %s complevel", - lumpname, W_WadNameForLump(lumpnum), - mapformat == MFMT_XNOD ? "XNOD nodes" : - mapformat == MFMT_ZNOD ? "ZNOD nodes" : - mapformat == MFMT_XGLN ? "XGLN nodes" : - mapformat == MFMT_ZGLN ? "ZGLN nodes" : - mapformat == MFMT_DEEP ? "DeepBSP nodes" : - "Doom nodes", - gen_blockmap ? " + Blockmap" : "", - pad_reject ? " + Reject" : "", - G_GetCurrentComplevelName()); - } + I_Printf(VB_INFO, "P_SetupLevel: %.8s (%s), Skill %d, %s%s%s, %s", + lumpname, W_WadNameForLump(lumpnum), + gameskill + 1, + mapformat == MFMT_XNOD ? "XNOD" : + mapformat == MFMT_ZNOD ? "ZNOD" : + mapformat == MFMT_XGLN ? "XGLN" : + mapformat == MFMT_ZGLN ? "ZGLN" : + mapformat == MFMT_DEEP ? "DeepBSP" : + "Doom", + gen_blockmap ? "+Blockmap" : "", + pad_reject ? "+Reject" : "", + G_GetCurrentComplevelName()); } //