diff --git a/src/b_game.cpp b/src/b_game.cpp index 9681aa7a80..9d6419787e 100644 --- a/src/b_game.cpp +++ b/src/b_game.cpp @@ -494,7 +494,7 @@ bool FCajunMaster::LoadBots () tmp = M_GetCajunPath(BOTFILENAME); if (tmp.IsEmpty()) { - DPrintf ("No " BOTFILENAME ", so no bots\n"); + DPrintf (DMSG_ERROR, "No " BOTFILENAME ", so no bots\n"); return false; } try diff --git a/src/c_console.cpp b/src/c_console.cpp index 9a9274aa16..850a29455d 100644 --- a/src/c_console.cpp +++ b/src/c_console.cpp @@ -612,12 +612,12 @@ int Printf (const char *format, ...) return count; } -int DPrintf (const char *format, ...) +int DPrintf (int level, const char *format, ...) { va_list argptr; int count; - if (developer) + if (developer >= level) { va_start (argptr, format); count = VPrintf (PRINT_HIGH, format, argptr); diff --git a/src/compatibility.cpp b/src/compatibility.cpp index 5bb51129a4..24897ac270 100644 --- a/src/compatibility.cpp +++ b/src/compatibility.cpp @@ -399,7 +399,7 @@ void CheckCompatibility(MapData *map) flags = BCompatMap.CheckKey(md5); - if (developer) + if (developer >= DMSG_NOTIFY) { Printf("MD5 = "); for (size_t j = 0; j < sizeof(md5.Bytes); ++j) diff --git a/src/d_dehacked.cpp b/src/d_dehacked.cpp index 29a087facd..4beb5c25a5 100644 --- a/src/d_dehacked.cpp +++ b/src/d_dehacked.cpp @@ -450,7 +450,7 @@ int FindStyle (const char *namestr) { if (!stricmp(StyleNames[i].Name, namestr)) return StyleNames[i].Num; } - DPrintf("Unknown render style %s\n", namestr); + DPrintf(DMSG_ERROR, "Unknown render style %s\n", namestr); return -1; } @@ -861,7 +861,7 @@ static int PatchThing (int thingy) } else { - DPrintf ("Thing %d\n", thingy); + DPrintf (DMSG_SPAMMY, "Thing %d\n", thingy); if (thingy > 0) { type = InfoNames[thingy - 1]; @@ -1086,7 +1086,7 @@ static int PatchThing (int thingy) } if (i == BitNames.Size()) { - DPrintf("Unknown bit mnemonic %s\n", strval); + DPrintf(DMSG_ERROR, "Unknown bit mnemonic %s\n", strval); } } } @@ -1242,7 +1242,7 @@ static int PatchThing (int thingy) else info->renderflags &= ~RF_INVISIBLE; } - DPrintf ("Bits: %d,%d (0x%08x,0x%08x)\n", info->flags.GetValue(), info->flags2.GetValue(), + DPrintf (DMSG_SPAMMY, "Bits: %d,%d (0x%08x,0x%08x)\n", info->flags.GetValue(), info->flags2.GetValue(), info->flags.GetValue(), info->flags2.GetValue()); } else if (stricmp (Line1, "ID #") == 0) @@ -1328,7 +1328,7 @@ static int PatchSound (int soundNum) { int result; - DPrintf ("Sound %d (no longer supported)\n", soundNum); + //DPrintf ("Sound %d (no longer supported)\n", soundNum); /* sfxinfo_t *info, dummy; int offset = 0; @@ -1385,7 +1385,7 @@ static int PatchFrame (int frameNum) info = FindState (frameNum); if (info) { - DPrintf ("Frame %d\n", frameNum); + DPrintf (DMSG_SPAMMY, "Frame %d\n", frameNum); if (frameNum == 47) { // Use original tics for S_DSGUNFLASH1 tics = 5; @@ -1487,7 +1487,7 @@ static int PatchSprite (int sprNum) if ((unsigned)sprNum < OrgSprNames.Size()) { - DPrintf ("Sprite %d\n", sprNum); + DPrintf (DMSG_SPAMMY, "Sprite %d\n", sprNum); } else { @@ -1534,7 +1534,7 @@ static int PatchAmmo (int ammoNum) if (ammoNum >= 0 && ammoNum < 4 && (unsigned)ammoNum <= AmmoNames.Size()) { - DPrintf ("Ammo %d.\n", ammoNum); + DPrintf (DMSG_SPAMMY, "Ammo %d.\n", ammoNum); ammoType = AmmoNames[ammoNum]; if (ammoType != NULL) { @@ -1617,7 +1617,7 @@ static int PatchWeapon (int weapNum) if (type != NULL) { info = (AWeapon *)GetDefaultByType (type); - DPrintf ("Weapon %d\n", weapNum); + DPrintf (DMSG_SPAMMY, "Weapon %d\n", weapNum); } } @@ -1757,7 +1757,7 @@ static int PatchPointer (int ptrNum) { if (CodePConv[ptrNum] == indexnum) break; } - DPrintf("Final ptrNum: %i\n", ptrNum); + DPrintf(DMSG_SPAMMY, "Final ptrNum: %i\n", ptrNum); } // End of hack. @@ -1765,7 +1765,7 @@ static int PatchPointer (int ptrNum) // Better to just use the size of the array rather than a hardcoded value. if (ptrNum >= 0 && (unsigned int) ptrNum < CodePConv.Size()) { - DPrintf ("Pointer %d\n", ptrNum); + DPrintf (DMSG_SPAMMY, "Pointer %d\n", ptrNum); } else { @@ -1789,7 +1789,7 @@ static int PatchPointer (int ptrNum) { SetPointer(state, Actions[index], CodePConv[ptrNum]); } - DPrintf("%s has a hacked state for pointer num %i with index %i\nLine1=%s, Line2=%s\n", + DPrintf(DMSG_SPAMMY, "%s has a hacked state for pointer num %i with index %i\nLine1=%s, Line2=%s\n", state->StaticFindStateOwner(state)->TypeName.GetChars(), ptrNum, index, Line1, Line2); } else @@ -1806,7 +1806,7 @@ static int PatchCheats (int dummy) { int result; - DPrintf ("Cheats (support removed by request)\n"); + DPrintf (DMSG_NOTIFY, "Dehacked cheats support removed by request\n"); while ((result = GetLine ()) == 1) { @@ -1836,7 +1836,7 @@ static int PatchMisc (int dummy) }; int result; - DPrintf ("Misc\n"); + DPrintf (DMSG_SPAMMY, "Misc\n"); while ((result = GetLine()) == 1) { @@ -2017,7 +2017,7 @@ static int PatchPars (int dummy) level_info_t *info; int result, par; - DPrintf ("[Pars]\n"); + DPrintf (DMSG_SPAMMY, "[Pars]\n"); while ( (result = GetLine()) ) { // Argh! .bex doesn't follow the same rules as .deh @@ -2058,7 +2058,7 @@ static int PatchPars (int dummy) } info->partime = par; - DPrintf ("Par for %s changed to %d\n", mapname, par); + DPrintf (DMSG_SPAMMY, "Par for %s changed to %d\n", mapname, par); } return result; } @@ -2067,7 +2067,7 @@ static int PatchCodePtrs (int dummy) { int result; - DPrintf ("[CodePtr]\n"); + DPrintf (DMSG_SPAMMY, "[CodePtr]\n"); while ((result = GetLine()) == 1) { @@ -2132,7 +2132,7 @@ static int PatchMusic (int dummy) { int result; - DPrintf ("[Music]\n"); + DPrintf (DMSG_SPAMMY, "[Music]\n"); while ((result = GetLine()) == 1) { @@ -2142,7 +2142,7 @@ static int PatchMusic (int dummy) keystring << "MUSIC_" << Line1; GStrings.SetString (keystring, newname); - DPrintf ("Music %s set to:\n%s\n", keystring.GetChars(), newname); + DPrintf (DMSG_SPAMMY, "Music %s set to:\n%s\n", keystring.GetChars(), newname); } return result; @@ -2198,7 +2198,7 @@ static int PatchText (int oldSize) goto donewithtext; } - DPrintf ("Searching for text:\n%s\n", oldStr); + DPrintf (DMSG_SPAMMY, "Searching for text:\n%s\n", oldStr); good = false; // Search through sprite names; they are always 4 chars @@ -2264,7 +2264,7 @@ static int PatchText (int oldSize) if (!good) { - DPrintf (" (Unmatched)\n"); + DPrintf (DMSG_SPAMMY, " (Unmatched)\n"); } donewithtext: @@ -2284,7 +2284,7 @@ static int PatchStrings (int dummy) { int result; - DPrintf ("[Strings]\n"); + DPrintf (DMSG_SPAMMY, "[Strings]\n"); while ((result = GetLine()) == 1) { @@ -2310,7 +2310,7 @@ static int PatchStrings (int dummy) const char *ll = Line1; if (!stricmp(ll, "GOTREDSKULL")) ll = "GOTREDSKUL"; GStrings.SetString (ll, holdstring); - DPrintf ("%s set to:\n%s\n", Line1, holdstring.GetChars()); + DPrintf (DMSG_SPAMMY, "%s set to:\n%s\n", Line1, holdstring.GetChars()); } return result; @@ -2350,7 +2350,7 @@ static int DoInclude (int dummy) else { data = Line2; - DPrintf ("Including %s\n", data); + DPrintf (DMSG_SPAMMY, "Including %s\n", data); savepatchname = PatchName; savepatchfile = PatchFile; savepatchpt = PatchPt; @@ -2384,7 +2384,7 @@ static int DoInclude (int dummy) delete[] path; } - DPrintf ("Done with include\n"); + DPrintf (DMSG_SPAMMY, "Done with include\n"); PatchName = savepatchname; PatchFile = savepatchfile; PatchPt = savepatchpt; @@ -2536,7 +2536,7 @@ static bool DoDehPatch() } else { - DPrintf ("Patch does not have DeHackEd signature. Assuming .bex\n"); + DPrintf (DMSG_WARNING, "Patch does not have DeHackEd signature. Assuming .bex\n"); dversion = 19; pversion = 6; PatchPt = PatchFile; @@ -3027,7 +3027,7 @@ void FinishDehPatch () subclass->Replacement = old_replacement; } - DPrintf ("%s replaces %s\n", subclass->TypeName.GetChars(), type->TypeName.GetChars()); + DPrintf (DMSG_NOTIFY, "%s replaces %s\n", subclass->TypeName.GetChars(), type->TypeName.GetChars()); } // Now that all Dehacked patches have been processed, it's okay to free StateMap. diff --git a/src/d_net.cpp b/src/d_net.cpp index eadd47d965..2611338679 100644 --- a/src/d_net.cpp +++ b/src/d_net.cpp @@ -231,7 +231,7 @@ static struct TicSpecial specialsize = MAX(specialsize * 2, needed + 30); - DPrintf ("Expanding special size to %zu\n", specialsize); + DPrintf (DMSG_NOTIFY, "Expanding special size to %zu\n", specialsize); for (i = 0; i < BACKUPTICS; i++) streams[i] = (BYTE *)M_Realloc (streams[i], specialsize); diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index a7f07247f2..7a593c5fe3 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -2134,7 +2134,7 @@ bool PArray::ReadValue(FArchive &ar, void *addr) const } if (i < ElementCount) { - DPrintf("Array on disk (%u) is bigger than in memory (%u)\n", + DPrintf(DMSG_WARNING, "Array on disk (%u) is bigger than in memory (%u)\n", count, ElementCount); for (; i < ElementCount; ++i) { @@ -2501,13 +2501,13 @@ bool PStruct::ReadFields(FArchive &ar, void *addr) const const PSymbol *sym = Symbols.FindSymbol(FName(label, true), true); if (sym == NULL) { - DPrintf("Cannot find field %s in %s\n", + DPrintf(DMSG_ERROR, "Cannot find field %s in %s\n", label, TypeName.GetChars()); SkipValue(ar); } else if (!sym->IsKindOf(RUNTIME_CLASS(PField))) { - DPrintf("Symbol %s in %s is not a field\n", + DPrintf(DMSG_ERROR, "Symbol %s in %s is not a field\n", label, TypeName.GetChars()); SkipValue(ar); } @@ -2806,7 +2806,7 @@ bool PClass::ReadValue(FArchive &ar, void *addr) const } else { - DPrintf("Unknown superclass %s of class %s\n", + DPrintf(DMSG_ERROR, "Unknown superclass %s of class %s\n", type->TypeName.GetChars(), TypeName.GetChars()); SkipValue(ar, VAL_Struct); } @@ -3243,7 +3243,7 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size) { I_Error("%s must inherit from %s but doesn't.", name.GetChars(), type->ParentClass->TypeName.GetChars()); } - DPrintf("Defining placeholder class %s\n", name.GetChars()); + DPrintf(DMSG_SPAMMY, "Defining placeholder class %s\n", name.GetChars()); notnew = true; } else @@ -3327,7 +3327,7 @@ PClass *PClass::FindClassTentative(FName name, bool fatal) return static_cast(found); } PClass *type = static_cast(GetClass()->CreateNew()); - DPrintf("Creating placeholder class %s : %s\n", name.GetChars(), TypeName.GetChars()); + DPrintf(DMSG_SPAMMY, "Creating placeholder class %s : %s\n", name.GetChars(), TypeName.GetChars()); type->TypeName = name; type->ParentClass = this; diff --git a/src/doomstat.cpp b/src/doomstat.cpp index d693aae1b9..87ca50a168 100644 --- a/src/doomstat.cpp +++ b/src/doomstat.cpp @@ -39,7 +39,7 @@ FStringTable GStrings; EGameSpeed GameSpeed = SPEED_Normal; // Show developer messages if true. -CVAR (Bool, developer, false, 0) +CVAR (Int, developer, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // [RH] Feature control cvars CVAR (Bool, var_friction, true, CVAR_SERVERINFO); diff --git a/src/doomstat.h b/src/doomstat.h index cfdca5e5a3..bbb323c7e3 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -204,7 +204,7 @@ extern int bodyqueslot; // ---- [RH] ---- -EXTERN_CVAR (Bool, developer) +EXTERN_CVAR (Int, developer) extern bool ToggleFullscreen; diff --git a/src/doomtype.h b/src/doomtype.h index 39c59751d3..34f750313b 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -147,7 +147,7 @@ int Printf (int printlevel, const char *, ...) GCCPRINTF(2,3); int Printf (const char *, ...) GCCPRINTF(1,2); // [RH] Same here: -int DPrintf (const char *, ...) GCCPRINTF(1,2); +int DPrintf (int level, const char *, ...) GCCPRINTF(2,3); extern "C" int mysnprintf(char *buffer, size_t count, const char *format, ...) GCCPRINTF(3,4); extern "C" int myvsnprintf(char *buffer, size_t count, const char *format, va_list argptr) GCCFORMAT(3); @@ -160,15 +160,19 @@ enum PRINT_MEDIUM, // death messages PRINT_HIGH, // critical messages PRINT_CHAT, // chat messages - PRINT_TEAMCHAT // chat messages from a teammate + PRINT_TEAMCHAT, // chat messages from a teammate + PRINT_LOG, // only to logfile + PRINT_BOLD = 200 // What Printf_Bold used +}; + +enum +{ + DMSG_OFF, // no developer messages. + DMSG_ERROR, // general notification messages + DMSG_WARNING, // warnings + DMSG_NOTIFY, // general notification messages + DMSG_SPAMMY, // for those who want to see everything, regardless of its usefulness. }; -#define PRINT_LOW 0 // pickup messages -#define PRINT_MEDIUM 1 // death messages -#define PRINT_HIGH 2 // critical messages -#define PRINT_CHAT 3 // chat messages -#define PRINT_TEAMCHAT 4 // chat messages from a teammate -#define PRINT_LOG 5 // only to logfile -#define PRINT_BOLD 200 // What Printf_Bold used struct PalEntry { diff --git a/src/farchive.cpp b/src/farchive.cpp index 317abe702f..de3e248a47 100644 --- a/src/farchive.cpp +++ b/src/farchive.cpp @@ -354,12 +354,12 @@ void FCompressedFile::Implode () // If the data could not be compressed, store it as-is. if (r != Z_OK || outlen >= len) { - DPrintf ("cfile could not be compressed\n"); + DPrintf (DMSG_SPAMMY, "cfile could not be compressed\n"); outlen = 0; } else { - DPrintf ("cfile shrank from %lu to %lu bytes\n", len, outlen); + DPrintf (DMSG_SPAMMY, "cfile shrank from %lu to %lu bytes\n", len, outlen); } } else @@ -717,7 +717,7 @@ void FArchive::Close () { m_File->Close (); m_File = NULL; - DPrintf ("Processed %u objects\n", ArchiveToObject.Size()); + DPrintf (DMSG_SPAMMY, "Processed %u objects\n", ArchiveToObject.Size()); } } diff --git a/src/g_shared/a_decals.cpp b/src/g_shared/a_decals.cpp index c37c1065a5..94e92e7258 100644 --- a/src/g_shared/a_decals.cpp +++ b/src/g_shared/a_decals.cpp @@ -825,13 +825,13 @@ void ADecal::BeginPlay () // without effectively doing anything. if (NULL == ShootDecal(tpl, this, Sector, X(), Y(), Z(), Angles.Yaw + 180, 64., true)) { - DPrintf ("Could not find a wall to stick decal to at (%f,%f)\n", X(), Y()); + DPrintf (DMSG_WARNING, "Could not find a wall to stick decal to at (%f,%f)\n", X(), Y()); } } } else { - DPrintf ("Decal actor at (%f,%f) does not have a good template\n", X(), Y()); + DPrintf (DMSG_ERROR, "Decal actor at (%f,%f) does not have a good template\n", X(), Y()); } // This actor doesn't need to stick around anymore. Destroy(); diff --git a/src/i_net.cpp b/src/i_net.cpp index 5957846d2a..e03f50a6ba 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -322,7 +322,7 @@ void PacketGet (void) // Don't show the message for disconnect notifications. if (c != 2 || TransmitBuffer[0] != PRE_FAKE || TransmitBuffer[1] != PRE_DISCONNECT) { - DPrintf("Dropped packet: Unknown host (%s:%d)\n", inet_ntoa(fromaddress.sin_addr), fromaddress.sin_port); + DPrintf(DMSG_WARNING, "Dropped packet: Unknown host (%s:%d)\n", inet_ntoa(fromaddress.sin_addr), fromaddress.sin_port); } doomcom.remotenode = -1; return; diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 0762b3e294..5f08f01526 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -1331,12 +1331,12 @@ static int CheckInventory (AActor *activator, const char *type, bool max) if (info == NULL) { - Printf ("ACS: I don't know what '%s' is.\n", type); + DPrintf (DMSG_ERROR, "ACS: '%s': Unknown actor class.\n", type); return 0; } else if (!info->IsDescendantOf(RUNTIME_CLASS(AInventory))) { - Printf ("ACS: '%s' is not an inventory item.\n", type); + DPrintf(DMSG_ERROR, "ACS: '%s' is not an inventory item.\n", type); return 0; } @@ -2237,7 +2237,7 @@ bool FBehavior::Init(int lumpnum, FileReader * fr, int len) } } - DPrintf ("Loaded %d scripts, %d functions\n", NumScripts, NumFunctions); + DPrintf (DMSG_NOTIFY, "Loaded %d scripts, %d functions\n", NumScripts, NumFunctions); return true; } @@ -2824,7 +2824,7 @@ void FBehavior::StaticStartTypedScripts (WORD type, AActor *activator, bool alwa "Disconnect", "Return" }; - DPrintf("Starting all scripts of type %d (%s)\n", type, + DPrintf(DMSG_NOTIFY, "Starting all scripts of type %d (%s)\n", type, type < countof(TypeNames) ? TypeNames[type] : TypeNames[SCRIPT_Lightning - 1]); for (unsigned int i = 0; i < StaticModules.Size(); ++i) { @@ -6209,7 +6209,7 @@ int DLevelScript::RunScript () activeBehavior = savedActiveBehavior; // fall through case PCD_TERMINATE: - DPrintf ("%s finished\n", ScriptPresentation(script).GetChars()); + DPrintf (DMSG_NOTIFY, "%s finished\n", ScriptPresentation(script).GetChars()); state = SCRIPT_PleaseRemove; break; @@ -7646,7 +7646,7 @@ scriptwait: if (activationline != NULL) { activationline->special = 0; - DPrintf("Cleared line special on line %d\n", (int)(activationline - lines)); + DPrintf(DMSG_SPAMMY, "Cleared line special on line %d\n", (int)(activationline - lines)); } break; @@ -8285,7 +8285,7 @@ scriptwait: line->args[2] = STACK(3); line->args[3] = STACK(2); line->args[4] = STACK(1); - DPrintf("Set special on line %d (id %d) to %d(%d,%d,%d,%d,%d)\n", + DPrintf(DMSG_SPAMMY, "Set special on line %d (id %d) to %d(%d,%d,%d,%d,%d)\n", linenum, STACK(7), specnum, arg0, STACK(4), STACK(3), STACK(2), STACK(1)); } sp -= 7; @@ -9663,7 +9663,7 @@ DLevelScript::DLevelScript (AActor *who, line_t *where, int num, const ScriptPtr PutLast(); } - DPrintf("%s started.\n", ScriptPresentation(num).GetChars()); + DPrintf(DMSG_SPAMMY, "%s started.\n", ScriptPresentation(num).GetChars()); } static void SetScriptState (int script, DLevelScript::EScriptState state) @@ -9710,12 +9710,12 @@ void P_DoDeferedScripts () case acsdefered_t::defsuspend: SetScriptState (def->script, DLevelScript::SCRIPT_Suspended); - DPrintf ("Deferred suspend of %s\n", ScriptPresentation(def->script).GetChars()); + DPrintf (DMSG_SPAMMY, "Deferred suspend of %s\n", ScriptPresentation(def->script).GetChars()); break; case acsdefered_t::defterminate: SetScriptState (def->script, DLevelScript::SCRIPT_PleaseRemove); - DPrintf ("Deferred terminate of %s\n", ScriptPresentation(def->script).GetChars()); + DPrintf (DMSG_SPAMMY, "Deferred terminate of %s\n", ScriptPresentation(def->script).GetChars()); break; } delete def; @@ -9751,7 +9751,7 @@ static void addDefered (level_info_t *i, acsdefered_t::EType type, int script, c def->playernum = -1; } i->defered = def; - DPrintf ("%s on map %s deferred\n", ScriptPresentation(script).GetChars(), i->MapName.GetChars()); + DPrintf (DMSG_SPAMMY, "%s on map %s deferred\n", ScriptPresentation(script).GetChars(), i->MapName.GetChars()); } } diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 64fe2cbab2..5456033688 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -253,7 +253,7 @@ static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool inc if ((type == 1 && !isbinary) || (type == 2 && isbinary)) { - DPrintf("Incorrect data format for %s.", Wads.GetLumpFullName(lumpnum)); + DPrintf(DMSG_ERROR, "Incorrect data format for %s.", Wads.GetLumpFullName(lumpnum)); return false; } @@ -273,7 +273,7 @@ static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool inc // is exactly 1516 bytes long. if (numnodes % 1516 != 0) { - DPrintf("Incorrect data format for %s.", Wads.GetLumpFullName(lumpnum)); + DPrintf(DMSG_ERROR, "Incorrect data format for %s.", Wads.GetLumpFullName(lumpnum)); return false; } numnodes /= 1516; @@ -283,7 +283,7 @@ static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool inc // And the teaser version has 1488-byte entries. if (numnodes % 1488 != 0) { - DPrintf("Incorrect data format for %s.", Wads.GetLumpFullName(lumpnum)); + DPrintf(DMSG_ERROR, "Incorrect data format for %s.", Wads.GetLumpFullName(lumpnum)); return false; } numnodes /= 1488; diff --git a/src/p_glnodes.cpp b/src/p_glnodes.cpp index 0fe4cd9c0b..39c8f8e0dc 100644 --- a/src/p_glnodes.cpp +++ b/src/p_glnodes.cpp @@ -1013,7 +1013,7 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime) subsectors, numsubsectors, vertexes, numvertexes); endTime = I_FPSTime (); - DPrintf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs); + DPrintf (DMSG_NOTIFY, "BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs); buildtime = endTime - startTime; } } @@ -1026,12 +1026,12 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime) #endif if (level.maptype != MAPTYPE_BUILD && gl_cachenodes && buildtime/1000.f >= gl_cachetime) { - DPrintf("Caching nodes\n"); + DPrintf(DMSG_NOTIFY, "Caching nodes\n"); CreateCachedNodes(map); } else { - DPrintf("Not caching nodes (time = %f)\n", buildtime/1000.f); + DPrintf(DMSG_NOTIFY, "Not caching nodes (time = %f)\n", buildtime/1000.f); } } diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 5fa8aa2f29..a3d4d0e9eb 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -361,7 +361,7 @@ bool AActor::FixMapthingPos() if (distance < radius) { - DPrintf("%s at (%f,%f) lies on %s line %td, distance = %f\n", + DPrintf(DMSG_NOTIFY, "%s at (%f,%f) lies on %s line %td, distance = %f\n", this->GetClass()->TypeName.GetChars(), X(), Y(), ldef->Delta().X == 0 ? "vertical" : ldef->Delta().Y == 0 ? "horizontal" : "diagonal", ldef - lines, distance); diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 92636fb0cd..d8d95d2776 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1689,7 +1689,7 @@ static void SetMapThingUserData(AActor *actor, unsigned udi) if (var == NULL || (var->Flags & VARF_Native) || !var->Type->IsKindOf(RUNTIME_CLASS(PBasicType))) { - DPrintf("%s is not a user variable in class %s\n", varname.GetChars(), + DPrintf(DMSG_WARNING, "%s is not a user variable in class %s\n", varname.GetChars(), actor->GetClass()->TypeName.GetChars()); } else @@ -2477,7 +2477,7 @@ int P_DetermineTranslucency (int lumpnum) if (newcolor2.r == 255) // if black on white results in white it's either // fully transparent or additive { - if (developer) + if (developer >= DMSG_NOTIFY) { char lumpname[9]; lumpname[8] = 0; @@ -2488,7 +2488,7 @@ int P_DetermineTranslucency (int lumpnum) return -newcolor.r; } - if (developer) + if (developer >= DMSG_NOTIFY) { char lumpname[9]; lumpname[8] = 0; @@ -3028,7 +3028,7 @@ void P_LoadBlockMap (MapData * map) Args->CheckParm("-blockmap") ) { - DPrintf ("Generating BLOCKMAP\n"); + DPrintf (DMSG_SPAMMY, "Generating BLOCKMAP\n"); P_CreateBlockMap (); } else @@ -3060,7 +3060,7 @@ void P_LoadBlockMap (MapData * map) if (!P_VerifyBlockMap(count)) { - DPrintf ("Generating BLOCKMAP\n"); + DPrintf (DMSG_SPAMMY, "Generating BLOCKMAP\n"); P_CreateBlockMap(); } @@ -3957,7 +3957,7 @@ void P_SetupLevel (const char *lumpname, int position) subsectors, numsubsectors, vertexes, numvertexes); endTime = I_FPSTime (); - DPrintf ("BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs); + DPrintf (DMSG_NOTIFY, "BSP generation took %.3f sec (%d segs)\n", (endTime - startTime) * 0.001, numsegs); oldvertextable = builder.GetOldVertexTable(); reloop = true; } diff --git a/src/p_spec.cpp b/src/p_spec.cpp index 67bb4de73c..4c3bdb488e 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -186,7 +186,7 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVe line->special = 0; } // end of changed code - if (developer && buttonSuccess) + if (developer >= DMSG_SPAMMY && buttonSuccess) { Printf ("Line special %d activated on line %i\n", special, int(line - lines)); } @@ -358,7 +358,7 @@ bool P_PredictLine(line_t *line, AActor *mo, int side, int activationType) special = line->special; // end of changed code - if (developer && buttonSuccess) + if (developer >= DMSG_SPAMMY && buttonSuccess) { Printf("Line special %d predicted on line %i\n", special, int(line - lines)); } diff --git a/src/p_tick.cpp b/src/p_tick.cpp index 978c2c7ef6..332b7af81c 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -42,7 +42,7 @@ extern gamestate_t wipegamestate; // // P_CheckTickerPaused // -// Returns true if the ticker should be paused. In that cause, it also +// Returns true if the ticker should be paused. In that case, it also // pauses sound effects and possibly music. If the ticker should not be // paused, then it returns false but does not unpause anything. // diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 86116f8811..0b054247eb 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -147,7 +147,7 @@ extern TArray linemap; void UDMFParserBase::Skip() { - if (developer) sc.ScriptMessage("Ignoring unknown key \"%s\".", sc.String); + if (developer >= DMSG_WARNING) sc.ScriptMessage("Ignoring unknown UDMF key \"%s\".", sc.String); if(sc.CheckToken('{')) { int level = 1; diff --git a/src/p_user.cpp b/src/p_user.cpp index e4b6ec6bd9..b602432b33 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -2441,7 +2441,7 @@ void P_PlayerThink (player_t *player) S_ChangeMusic("*"); } } - DPrintf("MUSINFO change for player %d to %d\n", (int)(player - players), player->MUSINFOactor->args[0]); + DPrintf(DMSG_NOTIFY, "MUSINFO change for player %d to %d\n", (int)(player - players), player->MUSINFOactor->args[0]); } } @@ -2828,9 +2828,9 @@ void P_PredictPlayer (player_t *player) DoLerp = (int)PredictionLast.pos.X != (int)player->mo->X() || (int)PredictionLast.pos.Y != (int)player->mo->Y(); // Aditional Debug information - if (developer && DoLerp) + if (developer >= DMSG_NOTIFY && DoLerp) { - DPrintf("Lerp! Ltic (%d) && Ptic (%d) | Lx (%f) && Px (%f) | Ly (%f) && Py (%f)\n", + DPrintf(DMSG_NOTIFY, "Lerp! Ltic (%d) && Ptic (%d) | Lx (%f) && Px (%f) | Ly (%f) && Py (%f)\n", PredictionLast.gametic, i, (PredictionLast.pos.X), (player->mo->X()), (PredictionLast.pos.Y), (player->mo->Y())); diff --git a/src/posix/sdl/hardware.cpp b/src/posix/sdl/hardware.cpp index 6142eb1d8e..8bae3f900c 100644 --- a/src/posix/sdl/hardware.cpp +++ b/src/posix/sdl/hardware.cpp @@ -242,18 +242,18 @@ void I_SetFPSLimit(int limit) } if (limit == 0) { // no limit - DPrintf("FPS timer disabled\n"); + DPrintf(DMSG_NOTIFY, "FPS timer disabled\n"); } else { FPSLimitTimerEnabled = true; if(timer_create(CLOCK_REALTIME, &FPSLimitEvent, &FPSLimitTimer) == -1) - Printf("Failed to create FPS limitter event\n"); + Printf(DMSG_WARNING, "Failed to create FPS limitter event\n"); itimerspec period = { {0, 0}, {0, 0} }; period.it_value.tv_nsec = period.it_interval.tv_nsec = 1000000000 / limit; if(timer_settime(FPSLimitTimer, 0, &period, NULL) == -1) - Printf("Failed to set FPS limitter timer\n"); - DPrintf("FPS timer set to %u ms\n", (unsigned int) period.it_interval.tv_nsec / 1000000); + Printf(DMSG_WARNING, "Failed to set FPS limitter timer\n"); + DPrintf(DMSG_NOTIFY, "FPS timer set to %u ms\n", (unsigned int) period.it_interval.tv_nsec / 1000000); } } #else diff --git a/src/r_segs.cpp b/src/r_segs.cpp index 4eb3cb440c..edb1949b62 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -2341,7 +2341,7 @@ void R_CheckDrawSegs () firstdrawseg = drawsegs + firstofs; ds_p = drawsegs + MaxDrawSegs; MaxDrawSegs = newdrawsegs; - DPrintf ("MaxDrawSegs increased to %zu\n", MaxDrawSegs); + DPrintf (DMSG_NOTIFY, "MaxDrawSegs increased to %zu\n", MaxDrawSegs); } } @@ -2360,7 +2360,7 @@ ptrdiff_t R_NewOpening (ptrdiff_t len) maxopenings = maxopenings ? maxopenings*2 : 16384; while ((size_t)lastopening > maxopenings); openings = (short *)M_Realloc (openings, maxopenings * sizeof(*openings)); - DPrintf ("MaxOpenings increased to %zu\n", maxopenings); + DPrintf (DMSG_NOTIFY, "MaxOpenings increased to %zu\n", maxopenings); } return res; } diff --git a/src/r_things.cpp b/src/r_things.cpp index aad8fb501e..28b52129b2 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -222,7 +222,7 @@ vissprite_t *R_NewVisSprite (void) lastvissprite = &vissprites[MaxVisSprites]; firstvissprite = &vissprites[firstvisspritenum]; vissprite_p = &vissprites[prevvisspritenum]; - DPrintf ("MaxVisSprites increased to %d\n", MaxVisSprites); + DPrintf (DMSG_NOTIFY, "MaxVisSprites increased to %d\n", MaxVisSprites); // Allocate sprites from the new pile for (vissprite_t **p = vissprite_p; p < lastvissprite; ++p) @@ -832,13 +832,11 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor else { // decide which texture to use for the sprite -#ifdef RANGECHECK - if (spritenum >= (signed)sprites.Size () || spritenum < 0) + if ((unsigned)spritenum >= sprites.Size ()) { - DPrintf ("R_ProjectSprite: invalid sprite number %u\n", spritenum); + DPrintf (DMSG_ERROR, "R_ProjectSprite: invalid sprite number %u\n", spritenum); return; } -#endif spritedef_t *sprdef = &sprites[spritenum]; if (thing->frame >= sprdef->numframes) { @@ -1312,13 +1310,13 @@ void R_DrawPSprite(DPSprite *pspr, AActor *owner, float bobx, float boby, double // decide which patch to use if ((unsigned)pspr->GetSprite() >= (unsigned)sprites.Size()) { - DPrintf("R_DrawPSprite: invalid sprite number %i\n", pspr->GetSprite()); + DPrintf(DMSG_ERROR, "R_DrawPSprite: invalid sprite number %i\n", pspr->GetSprite()); return; } sprdef = &sprites[pspr->GetSprite()]; if (pspr->GetFrame() >= sprdef->numframes) { - DPrintf("R_DrawPSprite: invalid sprite frame %i : %i\n", pspr->GetSprite(), pspr->GetFrame()); + DPrintf(DMSG_ERROR, "R_DrawPSprite: invalid sprite frame %i : %i\n", pspr->GetSprite(), pspr->GetFrame()); return; } sprframe = &SpriteFrames[sprdef->spriteframes + pspr->GetFrame()]; diff --git a/src/resourcefiles/file_wad.cpp b/src/resourcefiles/file_wad.cpp index 0732d4c115..5965a5c8a6 100644 --- a/src/resourcefiles/file_wad.cpp +++ b/src/resourcefiles/file_wad.cpp @@ -471,7 +471,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name { // We can't add this to the flats namespace but // it needs to be flagged for the texture manager. - DPrintf("Marking %s as potential flat\n", Lumps[i].Name); + DPrintf(DMSG_NOTIFY, "Marking %s as potential flat\n", Lumps[i].Name); Lumps[i].Flags |= LUMPF_MAYBEFLAT; } } @@ -517,7 +517,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name } // we found a marked block - DPrintf("Found %s block at (%d-%d)\n", startmarker, markers[start].index, end); + DPrintf(DMSG_NOTIFY, "Found %s block at (%d-%d)\n", startmarker, markers[start].index, end); for(int j = markers[start].index + 1; j < end; j++) { if (Lumps[j].Namespace != ns_global) @@ -534,7 +534,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name // ignore sprite lumps smaller than 8 bytes (the smallest possible) // in size -- this was used by some dmadds wads // as an 'empty' graphics resource - DPrintf(" Skipped empty sprite %s (lump %d)\n", Lumps[j].Name, j); + DPrintf(DMSG_WARNING, " Skipped empty sprite %s (lump %d)\n", Lumps[j].Name, j); } else { diff --git a/src/s_playlist.cpp b/src/s_playlist.cpp index ec775e275f..e1b0fd5b61 100644 --- a/src/s_playlist.cpp +++ b/src/s_playlist.cpp @@ -182,7 +182,7 @@ int FPlayList::SetPosition (int position) { Position = position; } - DPrintf ("Playlist position set to %d\n", Position); + DPrintf (DMSG_NOTIFY, "Playlist position set to %d\n", Position); return Position; } @@ -197,7 +197,7 @@ int FPlayList::Advance () { Position = 0; } - DPrintf ("Playlist advanced to song %d\n", Position); + DPrintf (DMSG_NOTIFY, "Playlist advanced to song %d\n", Position); return Position; } @@ -207,7 +207,7 @@ int FPlayList::Backup () { Position = Songs.Size() - 1; } - DPrintf ("Playlist backed up to song %d\n", Position); + DPrintf (DMSG_NOTIFY, "Playlist backed up to song %d\n", Position); return Position; } diff --git a/src/s_sound.cpp b/src/s_sound.cpp index 321cbce1b8..2149f7814d 100644 --- a/src/s_sound.cpp +++ b/src/s_sound.cpp @@ -552,7 +552,7 @@ void S_UnloadSound (sfxinfo_t *sfx) GSnd->UnloadSound(sfx->data); sfx->data.Clear(); sfx->data3d.Clear(); - DPrintf("Unloaded sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); + DPrintf(DMSG_NOTIFY, "Unloaded sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); } } @@ -1327,7 +1327,7 @@ sfxinfo_t *S_LoadSound(sfxinfo_t *sfx) { if (S_sfx[i].data.isValid() && S_sfx[i].link == sfxinfo_t::NO_LINK && S_sfx[i].lumpnum == sfx->lumpnum) { - DPrintf ("Linked %s to %s (%d)\n", sfx->name.GetChars(), S_sfx[i].name.GetChars(), i); + DPrintf (DMSG_NOTIFY, "Linked %s to %s (%d)\n", sfx->name.GetChars(), S_sfx[i].name.GetChars(), i); sfx->link = i; // This is necessary to avoid using the rolloff settings of the linked sound if its // settings are different. @@ -1336,7 +1336,7 @@ sfxinfo_t *S_LoadSound(sfxinfo_t *sfx) } } - DPrintf("Loading sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); + DPrintf(DMSG_NOTIFY, "Loading sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); int size = Wads.LumpLength(sfx->lumpnum); if (size > 0) @@ -1396,7 +1396,7 @@ static void S_LoadSound3D(sfxinfo_t *sfx) if(sfx->data3d.isValid()) return; - DPrintf("Loading monoized sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); + DPrintf(DMSG_NOTIFY, "Loading monoized sound \"%s\" (%td)\n", sfx->name.GetChars(), sfx - &S_sfx[0]); int size = Wads.LumpLength(sfx->lumpnum); if(size <= 0) return; diff --git a/src/sc_man.cpp b/src/sc_man.cpp index da106927e3..3f5530ff36 100644 --- a/src/sc_man.cpp +++ b/src/sc_man.cpp @@ -1044,7 +1044,7 @@ void FScriptPosition::Message (int severity, const char *message, ...) const { FString composed; - if ((severity == MSG_DEBUG || severity == MSG_DEBUGLOG) && !developer) return; + if ((severity == MSG_DEBUG || severity == MSG_DEBUGLOG) && developer < DMSG_NOTIFY) return; if (severity == MSG_OPTERROR) { severity = strictdecorate ? MSG_ERROR : MSG_WARNING; diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 465aade9b6..2db5a98a10 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -1994,7 +1994,7 @@ FISoundChannel *FMODSoundRenderer::StartSound(SoundHandle sfx, float vol, int pi return CommonChannelSetup(chan, reuse_chan); } - //DPrintf ("Sound %s failed to play: %d\n", sfx->name.GetChars(), result); + //DPrintf (DMSG_WARNING, "Sound %s failed to play: %d\n", sfx->name.GetChars(), result); return NULL; } @@ -2142,7 +2142,7 @@ FISoundChannel *FMODSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener * } GRolloff = NULL; - //DPrintf ("Sound %s failed to play: %d\n", sfx->name.GetChars(), result); + //DPrintf (DMSG_WARNING, "Sound %s failed to play: %d\n", sfx->name.GetChars(), result); return 0; } @@ -2566,7 +2566,7 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener) } if (env != PrevEnvironment || env->Modified) { - DPrintf ("Reverb Environment %s\n", env->Name); + DPrintf (DMSG_NOTIFY, "Reverb Environment %s\n", env->Name); const_cast(env)->Modified = false; SetSystemReverbProperties(&env->Properties); PrevEnvironment = env; @@ -2791,7 +2791,7 @@ std::pair FMODSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int l result = Sys->createSound((char *)sfxdata, samplemode, &exinfo, &sample); if (result != FMOD_OK) { - DPrintf("Failed to allocate sample: Error %d\n", result); + DPrintf(DMSG_ERROR, "Failed to allocate sample: Error %d\n", result); return std::make_pair(retval, true); } @@ -2829,7 +2829,7 @@ std::pair FMODSoundRenderer::LoadSound(BYTE *sfxdata, int leng result = Sys->createSound((char *)sfxdata, samplemode, &exinfo, &sample); if (result != FMOD_OK) { - DPrintf("Failed to allocate sample: Error %d\n", result); + DPrintf(DMSG_ERROR, "Failed to allocate sample: Error %d\n", result); return std::make_pair(retval, true); } SetCustomLoopPts(sample); diff --git a/src/sound/i_sound.cpp b/src/sound/i_sound.cpp index f19e080c34..67f46b266f 100644 --- a/src/sound/i_sound.cpp +++ b/src/sound/i_sound.cpp @@ -417,7 +417,7 @@ short *SoundRenderer::DecodeSample(int outlen, const void *coded, int sizebytes, decoder->getInfo(&srate, &chans, &type); if(chans != ChannelConfig_Mono || type != SampleType_Int16) { - DPrintf("Sample is not 16-bit mono\n"); + DPrintf(DMSG_WARNING, "Sample is not 16-bit mono\n"); delete decoder; return samples; } @@ -553,7 +553,7 @@ std::pair SoundRenderer::LoadSoundVoc(BYTE *sfxdata, int lengt break; default: // Unknown block type okay = false; - DPrintf ("Unknown VOC block type %i\n", blocktype); + DPrintf (DMSG_ERROR, "Unknown VOC block type %i\n", blocktype); break; } // Move to next block diff --git a/src/sound/music_fluidsynth_mididevice.cpp b/src/sound/music_fluidsynth_mididevice.cpp index 0427ca438f..b3f7b7d458 100644 --- a/src/sound/music_fluidsynth_mididevice.cpp +++ b/src/sound/music_fluidsynth_mididevice.cpp @@ -498,12 +498,12 @@ int FluidSynthMIDIDevice::LoadPatchSets(const char *patches) } if (FLUID_FAILED != fluid_synth_sfload(FluidSynth, path, count == 0)) { - DPrintf("Loaded patch set %s.\n", tok); + DPrintf(DMSG_NOTIFY, "Loaded patch set %s.\n", tok); count++; } else { - DPrintf("Failed to load patch set %s.\n", tok); + DPrintf(DMSG_ERROR, "Failed to load patch set %s.\n", tok); } tok = strtok(NULL, delim); } diff --git a/src/sound/music_midi_timidity.cpp b/src/sound/music_midi_timidity.cpp index 30468839d4..ee9d322a40 100644 --- a/src/sound/music_midi_timidity.cpp +++ b/src/sound/music_midi_timidity.cpp @@ -376,7 +376,7 @@ bool TimidityPPMIDIDevice::LaunchTimidity () return false; } - DPrintf ("cmd: \x1cG%s\n", CommandLine.GetChars()); + DPrintf (DMSG_NOTIFY, "cmd: \x1cG%s\n", CommandLine.GetChars()); #ifdef _WIN32 STARTUPINFO startup = { sizeof(startup), }; diff --git a/src/sound/music_xmi_midiout.cpp b/src/sound/music_xmi_midiout.cpp index 50b95a7762..a9cbcd2c60 100644 --- a/src/sound/music_xmi_midiout.cpp +++ b/src/sound/music_xmi_midiout.cpp @@ -143,7 +143,7 @@ XMISong::XMISong (FileReader &reader, EMidiDevice type, const char *args) memset(Songs, 0, sizeof(*Songs) * NumSongs); FindXMIDforms(MusHeader, SongLen, Songs); CurrSong = Songs; - DPrintf("XMI song count: %d\n", NumSongs); + DPrintf(DMSG_SPAMMY, "XMI song count: %d\n", NumSongs); } //========================================================================== diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 6dd204c866..21370d082e 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -747,8 +747,8 @@ OpenALSoundRenderer::OpenALSoundRenderer() ALCint major=0, minor=0; alcGetIntegerv(Device, ALC_MAJOR_VERSION, 1, &major); alcGetIntegerv(Device, ALC_MINOR_VERSION, 1, &minor); - DPrintf(" ALC Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor); - DPrintf(" ALC Extensions: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS)); + DPrintf(DMSG_SPAMMY, " ALC Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor); + DPrintf(DMSG_SPAMMY, " ALC Extensions: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS)); TArray attribs; if(*snd_samplerate > 0) @@ -778,10 +778,10 @@ OpenALSoundRenderer::OpenALSoundRenderer() } attribs.Clear(); - DPrintf(" Vendor: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR)); - DPrintf(" Renderer: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER)); - DPrintf(" Version: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION)); - DPrintf(" Extensions: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS)); + DPrintf(DMSG_SPAMMY, " Vendor: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR)); + DPrintf(DMSG_SPAMMY, " Renderer: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER)); + DPrintf(DMSG_SPAMMY, " Version: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION)); + DPrintf(DMSG_SPAMMY, " Extensions: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS)); ALC.EXT_EFX = !!alcIsExtensionPresent(Device, "ALC_EXT_EFX"); ALC.EXT_disconnect = !!alcIsExtensionPresent(Device, "ALC_EXT_disconnect"); @@ -864,7 +864,7 @@ OpenALSoundRenderer::OpenALSoundRenderer() return; } FreeSfx = Sources; - DPrintf(" Allocated " TEXTCOLOR_BLUE"%u" TEXTCOLOR_NORMAL" sources\n", Sources.Size()); + DPrintf(DMSG_NOTIFY, " Allocated " TEXTCOLOR_BLUE"%u" TEXTCOLOR_NORMAL" sources\n", Sources.Size()); WasInWater = false; if(*snd_efx && ALC.EXT_EFX) @@ -913,10 +913,10 @@ OpenALSoundRenderer::OpenALSoundRenderer() { alEffecti(envReverb, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB); if(alGetError() == AL_NO_ERROR) - DPrintf(" EAX Reverb found\n"); + DPrintf(DMSG_SPAMMY, " EAX Reverb found\n"); alEffecti(envReverb, AL_EFFECT_TYPE, AL_EFFECT_REVERB); if(alGetError() == AL_NO_ERROR) - DPrintf(" Standard Reverb found\n"); + DPrintf(DMSG_SPAMMY, " Standard Reverb found\n"); alDeleteEffects(1, &envReverb); getALError(); @@ -929,7 +929,7 @@ OpenALSoundRenderer::OpenALSoundRenderer() alFilteri(EnvFilters[0], AL_FILTER_TYPE, AL_FILTER_LOWPASS); alFilteri(EnvFilters[1], AL_FILTER_TYPE, AL_FILTER_LOWPASS); if(getALError() == AL_NO_ERROR) - DPrintf(" Lowpass found\n"); + DPrintf(DMSG_SPAMMY, " Lowpass found\n"); else { alDeleteFilters(2, EnvFilters); @@ -1194,7 +1194,7 @@ std::pair OpenALSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int loopend = length / (channels*bits/8); ALint loops[2] = { loopstart, loopend }; - DPrintf("Setting loop points %d -> %d\n", loops[0], loops[1]); + DPrintf(DMSG_NOTIFY, "Setting loop points %d -> %d\n", loops[0], loops[1]); alBufferiv(buffer, AL_LOOP_POINTS_SOFT, loops); getALError(); } @@ -1202,7 +1202,7 @@ std::pair OpenALSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int { static bool warned = false; if(!warned) - Printf("Loop points not supported!\n"); + Printf(DMSG_WARNING, "Loop points not supported!\n"); warned = true; } @@ -1867,7 +1867,7 @@ void OpenALSoundRenderer::UpdateListener(SoundListener *listener) if(env != PrevEnvironment || env->Modified) { PrevEnvironment = env; - DPrintf("Reverb Environment %s\n", env->Name); + DPrintf(DMSG_NOTIFY, "Reverb Environment %s\n", env->Name); if(EnvSlot != 0) LoadReverb(env); diff --git a/src/v_video.cpp b/src/v_video.cpp index 01a73950b2..0ee065bbe9 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -907,11 +907,12 @@ void DFrameBuffer::DrawRateStuff () // Drawing it as a texture does and continues to show how // well the PalTex shader is working. static FPaletteTester palette; + int size = screen->GetHeight() < 800 ? 16 * 7 : 16 * 7 * 2; palette.SetTranslation(vid_showpalette); DrawTexture(&palette, 0, 0, - DTA_DestWidth, 16*7, - DTA_DestHeight, 16*7, + DTA_DestWidth, size, + DTA_DestHeight, size, DTA_Masked, false, TAG_DONE); } diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp index 29bb905fbe..8eb2349ec2 100644 --- a/src/win32/win32video.cpp +++ b/src/win32/win32video.cpp @@ -793,7 +793,7 @@ void I_SetFPSLimit(int limit) CloseHandle(FPSLimitEvent); FPSLimitEvent = NULL; } - DPrintf("FPS timer disabled\n"); + DPrintf(DMSG_NOTIFY, "FPS timer disabled\n"); } else { @@ -802,7 +802,7 @@ void I_SetFPSLimit(int limit) FPSLimitEvent = CreateEvent(NULL, FALSE, TRUE, NULL); if (FPSLimitEvent == NULL) { // Could not create event, so cannot use timer. - Printf("Failed to create FPS limitter event\n"); + Printf(DMSG_WARNING, "Failed to create FPS limitter event\n"); return; } } @@ -817,7 +817,7 @@ void I_SetFPSLimit(int limit) Printf("Failed to create FPS limitter timer\n"); return; } - DPrintf("FPS timer set to %u ms\n", period); + DPrintf(DMSG_NOTIFY, "FPS timer set to %u ms\n", period); } } diff --git a/wadsrc/static/language.enu b/wadsrc/static/language.enu index d80c048b7e..ed224cb575 100644 --- a/wadsrc/static/language.enu +++ b/wadsrc/static/language.enu @@ -1957,6 +1957,7 @@ MSGMNU_TEAMMESSAGES = "Team Messages"; MSGMNU_CENTEREDMESSAGES = "Centered Messages"; MSGMNU_SCREENSHOTMESSAGES = "Screenshot messages"; MSGMNU_LONGSAVEMESSAGES = "Detailed save messages"; +MSGMNU_DEVELOPER = "Developer message mode"; // Scoreboard Options SCRBRDMNU_TITLE = "SCOREBOARD OPTIONS"; @@ -2287,6 +2288,10 @@ OPTVAL_SINC = "Sinc"; OPTVAL_NOTEONOFFONLY = "Note on/off only"; OPTVAL_FULLRAMPING = "Full ramping"; OPTVAL_ALLUNACKNOWLEDGED = "All unacknowledged"; +OPTVAL_ERRORS = "Errors"; +OPTVAL_WARNINGS = "Warnings"; +OPTVAL_NOTIFICATIONS = "Notifications"; +OPTVAL_EVERYTHING = "Everything"; // Colors C_BRICK = "\cabrick"; C_TAN = "\cbtan"; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 077dc06087..203576e5d4 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -1118,6 +1118,15 @@ OptionValue MessageLevels 2.0, "$OPTVAL_CRITICALMESSAGES" } +OptionValue DevMessageLevels +{ + 0, "$OPTVAL_OFF" + 1, "$OPTVAL_ERRORS" + 2, "$OPTVAL_WARNINGS", + 3, "$OPTVAL_NOTIFICATIONS" + 4, "$OPTVAL_EVERYTHING" +} + OptionMenu MessageOptions { Title "$MSGMNU_TITLE" @@ -1126,6 +1135,7 @@ OptionMenu MessageOptions Option "$MSGMNU_SHOWSECRETS", "cl_showsecretmessage", "OnOff" Option "$MSGMNU_SCALETEXT", "con_scaletext", "ScaleValues" Option "$MSGMNU_MESSAGELEVEL", "msg", "MessageLevels" + Option "$MSGMNU_DEVELOPER", "developer", "DevMessageLevels" Option "$MSGMNU_CENTERMESSAGES", "con_centernotify", "OnOff" StaticText " " StaticText "$MSGMNU_MESSAGECOLORS", 1