mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Small logging improvements for addon loading
Adds back the "Loading file" message when a file is loaded Adds individual file errors for things loaded with W_InitMultipleFiles (-file param) Errors for a given file will now appear between "Loading file" and the "Added file" or "not adding file" messages, making troubleshooting easier # Conflicts: # src/w_wad.c
This commit is contained in:
parent
5227d3f8c4
commit
45a357bea0
1 changed files with 7 additions and 3 deletions
10
src/w_wad.c
10
src/w_wad.c
|
|
@ -738,7 +738,7 @@ UINT16 W_InitFile(const char *filename, boolean mainfile, boolean startup)
|
||||||
else
|
else
|
||||||
refreshdirname = NULL;
|
refreshdirname = NULL;
|
||||||
|
|
||||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", filename);
|
CONS_Printf("Loading %s\n", filename);
|
||||||
//
|
//
|
||||||
// check if limit of active wadfiles
|
// check if limit of active wadfiles
|
||||||
//
|
//
|
||||||
|
|
@ -894,6 +894,7 @@ UINT16 W_InitFile(const char *filename, boolean mainfile, boolean startup)
|
||||||
INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
||||||
{
|
{
|
||||||
INT32 rc = 1;
|
INT32 rc = 1;
|
||||||
|
INT32 overallrc = 1;
|
||||||
|
|
||||||
// will be realloced as lumps are added
|
// will be realloced as lumps are added
|
||||||
for (; *filenames; filenames++)
|
for (; *filenames; filenames++)
|
||||||
|
|
@ -902,13 +903,16 @@ INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
||||||
G_SetGameModified(true, false);
|
G_SetGameModified(true, false);
|
||||||
|
|
||||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", *filenames);
|
//CONS_Debug(DBG_SETUP, "Loading %s\n", *filenames);
|
||||||
rc &= (W_InitFile(*filenames, !addons, true) != INT16_MAX) ? 1 : 0;
|
rc = W_InitFile(*filenames, !addons, true);
|
||||||
|
if (rc == INT16_MAX)
|
||||||
|
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), *filenames);
|
||||||
|
overallrc &= (rc != INT16_MAX) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!numwadfiles)
|
if (!numwadfiles)
|
||||||
I_Error("W_InitMultipleFiles: no files found");
|
I_Error("W_InitMultipleFiles: no files found");
|
||||||
|
|
||||||
return rc;
|
return overallrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Make sure a lump number is valid.
|
/** Make sure a lump number is valid.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue