mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-31 04:50:48 +00:00
- added multiple message levels for 'developer' CVAR so that the important stuff won't get drowned in pointless notification spam that's of no use to anyone.
- made 'developer' CVAR persist across launches and added some menu entries for it. - added checks for 'developer' to ACS's CheckInventory function.
This commit is contained in:
parent
716fbec8ee
commit
e04055dbb2
38 changed files with 157 additions and 139 deletions
|
@ -494,7 +494,7 @@ bool FCajunMaster::LoadBots ()
|
||||||
tmp = M_GetCajunPath(BOTFILENAME);
|
tmp = M_GetCajunPath(BOTFILENAME);
|
||||||
if (tmp.IsEmpty())
|
if (tmp.IsEmpty())
|
||||||
{
|
{
|
||||||
DPrintf ("No " BOTFILENAME ", so no bots\n");
|
DPrintf (DMSG_ERROR, "No " BOTFILENAME ", so no bots\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
|
|
|
@ -612,12 +612,12 @@ int Printf (const char *format, ...)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DPrintf (const char *format, ...)
|
int DPrintf (int level, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
if (developer)
|
if (developer >= level)
|
||||||
{
|
{
|
||||||
va_start (argptr, format);
|
va_start (argptr, format);
|
||||||
count = VPrintf (PRINT_HIGH, format, argptr);
|
count = VPrintf (PRINT_HIGH, format, argptr);
|
||||||
|
|
|
@ -399,7 +399,7 @@ void CheckCompatibility(MapData *map)
|
||||||
|
|
||||||
flags = BCompatMap.CheckKey(md5);
|
flags = BCompatMap.CheckKey(md5);
|
||||||
|
|
||||||
if (developer)
|
if (developer >= DMSG_NOTIFY)
|
||||||
{
|
{
|
||||||
Printf("MD5 = ");
|
Printf("MD5 = ");
|
||||||
for (size_t j = 0; j < sizeof(md5.Bytes); ++j)
|
for (size_t j = 0; j < sizeof(md5.Bytes); ++j)
|
||||||
|
|
|
@ -450,7 +450,7 @@ int FindStyle (const char *namestr)
|
||||||
{
|
{
|
||||||
if (!stricmp(StyleNames[i].Name, namestr)) return StyleNames[i].Num;
|
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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -861,7 +861,7 @@ static int PatchThing (int thingy)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPrintf ("Thing %d\n", thingy);
|
DPrintf (DMSG_SPAMMY, "Thing %d\n", thingy);
|
||||||
if (thingy > 0)
|
if (thingy > 0)
|
||||||
{
|
{
|
||||||
type = InfoNames[thingy - 1];
|
type = InfoNames[thingy - 1];
|
||||||
|
@ -1086,7 +1086,7 @@ static int PatchThing (int thingy)
|
||||||
}
|
}
|
||||||
if (i == BitNames.Size())
|
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
|
else
|
||||||
info->renderflags &= ~RF_INVISIBLE;
|
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());
|
info->flags.GetValue(), info->flags2.GetValue());
|
||||||
}
|
}
|
||||||
else if (stricmp (Line1, "ID #") == 0)
|
else if (stricmp (Line1, "ID #") == 0)
|
||||||
|
@ -1328,7 +1328,7 @@ static int PatchSound (int soundNum)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
DPrintf ("Sound %d (no longer supported)\n", soundNum);
|
//DPrintf ("Sound %d (no longer supported)\n", soundNum);
|
||||||
/*
|
/*
|
||||||
sfxinfo_t *info, dummy;
|
sfxinfo_t *info, dummy;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
|
@ -1385,7 +1385,7 @@ static int PatchFrame (int frameNum)
|
||||||
info = FindState (frameNum);
|
info = FindState (frameNum);
|
||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
DPrintf ("Frame %d\n", frameNum);
|
DPrintf (DMSG_SPAMMY, "Frame %d\n", frameNum);
|
||||||
if (frameNum == 47)
|
if (frameNum == 47)
|
||||||
{ // Use original tics for S_DSGUNFLASH1
|
{ // Use original tics for S_DSGUNFLASH1
|
||||||
tics = 5;
|
tics = 5;
|
||||||
|
@ -1487,7 +1487,7 @@ static int PatchSprite (int sprNum)
|
||||||
|
|
||||||
if ((unsigned)sprNum < OrgSprNames.Size())
|
if ((unsigned)sprNum < OrgSprNames.Size())
|
||||||
{
|
{
|
||||||
DPrintf ("Sprite %d\n", sprNum);
|
DPrintf (DMSG_SPAMMY, "Sprite %d\n", sprNum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1534,7 +1534,7 @@ static int PatchAmmo (int ammoNum)
|
||||||
|
|
||||||
if (ammoNum >= 0 && ammoNum < 4 && (unsigned)ammoNum <= AmmoNames.Size())
|
if (ammoNum >= 0 && ammoNum < 4 && (unsigned)ammoNum <= AmmoNames.Size())
|
||||||
{
|
{
|
||||||
DPrintf ("Ammo %d.\n", ammoNum);
|
DPrintf (DMSG_SPAMMY, "Ammo %d.\n", ammoNum);
|
||||||
ammoType = AmmoNames[ammoNum];
|
ammoType = AmmoNames[ammoNum];
|
||||||
if (ammoType != NULL)
|
if (ammoType != NULL)
|
||||||
{
|
{
|
||||||
|
@ -1617,7 +1617,7 @@ static int PatchWeapon (int weapNum)
|
||||||
if (type != NULL)
|
if (type != NULL)
|
||||||
{
|
{
|
||||||
info = (AWeapon *)GetDefaultByType (type);
|
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;
|
if (CodePConv[ptrNum] == indexnum) break;
|
||||||
}
|
}
|
||||||
DPrintf("Final ptrNum: %i\n", ptrNum);
|
DPrintf(DMSG_SPAMMY, "Final ptrNum: %i\n", ptrNum);
|
||||||
}
|
}
|
||||||
// End of hack.
|
// 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.
|
// Better to just use the size of the array rather than a hardcoded value.
|
||||||
if (ptrNum >= 0 && (unsigned int) ptrNum < CodePConv.Size())
|
if (ptrNum >= 0 && (unsigned int) ptrNum < CodePConv.Size())
|
||||||
{
|
{
|
||||||
DPrintf ("Pointer %d\n", ptrNum);
|
DPrintf (DMSG_SPAMMY, "Pointer %d\n", ptrNum);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1789,7 +1789,7 @@ static int PatchPointer (int ptrNum)
|
||||||
{
|
{
|
||||||
SetPointer(state, Actions[index], CodePConv[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);
|
state->StaticFindStateOwner(state)->TypeName.GetChars(), ptrNum, index, Line1, Line2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1806,7 +1806,7 @@ static int PatchCheats (int dummy)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
DPrintf ("Cheats (support removed by request)\n");
|
DPrintf (DMSG_NOTIFY, "Dehacked cheats support removed by request\n");
|
||||||
|
|
||||||
while ((result = GetLine ()) == 1)
|
while ((result = GetLine ()) == 1)
|
||||||
{
|
{
|
||||||
|
@ -1836,7 +1836,7 @@ static int PatchMisc (int dummy)
|
||||||
};
|
};
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
DPrintf ("Misc\n");
|
DPrintf (DMSG_SPAMMY, "Misc\n");
|
||||||
|
|
||||||
while ((result = GetLine()) == 1)
|
while ((result = GetLine()) == 1)
|
||||||
{
|
{
|
||||||
|
@ -2017,7 +2017,7 @@ static int PatchPars (int dummy)
|
||||||
level_info_t *info;
|
level_info_t *info;
|
||||||
int result, par;
|
int result, par;
|
||||||
|
|
||||||
DPrintf ("[Pars]\n");
|
DPrintf (DMSG_SPAMMY, "[Pars]\n");
|
||||||
|
|
||||||
while ( (result = GetLine()) ) {
|
while ( (result = GetLine()) ) {
|
||||||
// Argh! .bex doesn't follow the same rules as .deh
|
// Argh! .bex doesn't follow the same rules as .deh
|
||||||
|
@ -2058,7 +2058,7 @@ static int PatchPars (int dummy)
|
||||||
}
|
}
|
||||||
|
|
||||||
info->partime = par;
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -2067,7 +2067,7 @@ static int PatchCodePtrs (int dummy)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
DPrintf ("[CodePtr]\n");
|
DPrintf (DMSG_SPAMMY, "[CodePtr]\n");
|
||||||
|
|
||||||
while ((result = GetLine()) == 1)
|
while ((result = GetLine()) == 1)
|
||||||
{
|
{
|
||||||
|
@ -2132,7 +2132,7 @@ static int PatchMusic (int dummy)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
DPrintf ("[Music]\n");
|
DPrintf (DMSG_SPAMMY, "[Music]\n");
|
||||||
|
|
||||||
while ((result = GetLine()) == 1)
|
while ((result = GetLine()) == 1)
|
||||||
{
|
{
|
||||||
|
@ -2142,7 +2142,7 @@ static int PatchMusic (int dummy)
|
||||||
keystring << "MUSIC_" << Line1;
|
keystring << "MUSIC_" << Line1;
|
||||||
|
|
||||||
GStrings.SetString (keystring, newname);
|
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;
|
return result;
|
||||||
|
@ -2198,7 +2198,7 @@ static int PatchText (int oldSize)
|
||||||
goto donewithtext;
|
goto donewithtext;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPrintf ("Searching for text:\n%s\n", oldStr);
|
DPrintf (DMSG_SPAMMY, "Searching for text:\n%s\n", oldStr);
|
||||||
good = false;
|
good = false;
|
||||||
|
|
||||||
// Search through sprite names; they are always 4 chars
|
// Search through sprite names; they are always 4 chars
|
||||||
|
@ -2264,7 +2264,7 @@ static int PatchText (int oldSize)
|
||||||
|
|
||||||
if (!good)
|
if (!good)
|
||||||
{
|
{
|
||||||
DPrintf (" (Unmatched)\n");
|
DPrintf (DMSG_SPAMMY, " (Unmatched)\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
donewithtext:
|
donewithtext:
|
||||||
|
@ -2284,7 +2284,7 @@ static int PatchStrings (int dummy)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
DPrintf ("[Strings]\n");
|
DPrintf (DMSG_SPAMMY, "[Strings]\n");
|
||||||
|
|
||||||
while ((result = GetLine()) == 1)
|
while ((result = GetLine()) == 1)
|
||||||
{
|
{
|
||||||
|
@ -2310,7 +2310,7 @@ static int PatchStrings (int dummy)
|
||||||
const char *ll = Line1;
|
const char *ll = Line1;
|
||||||
if (!stricmp(ll, "GOTREDSKULL")) ll = "GOTREDSKUL";
|
if (!stricmp(ll, "GOTREDSKULL")) ll = "GOTREDSKUL";
|
||||||
GStrings.SetString (ll, holdstring);
|
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;
|
return result;
|
||||||
|
@ -2350,7 +2350,7 @@ static int DoInclude (int dummy)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data = Line2;
|
data = Line2;
|
||||||
DPrintf ("Including %s\n", data);
|
DPrintf (DMSG_SPAMMY, "Including %s\n", data);
|
||||||
savepatchname = PatchName;
|
savepatchname = PatchName;
|
||||||
savepatchfile = PatchFile;
|
savepatchfile = PatchFile;
|
||||||
savepatchpt = PatchPt;
|
savepatchpt = PatchPt;
|
||||||
|
@ -2384,7 +2384,7 @@ static int DoInclude (int dummy)
|
||||||
delete[] path;
|
delete[] path;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPrintf ("Done with include\n");
|
DPrintf (DMSG_SPAMMY, "Done with include\n");
|
||||||
PatchName = savepatchname;
|
PatchName = savepatchname;
|
||||||
PatchFile = savepatchfile;
|
PatchFile = savepatchfile;
|
||||||
PatchPt = savepatchpt;
|
PatchPt = savepatchpt;
|
||||||
|
@ -2536,7 +2536,7 @@ static bool DoDehPatch()
|
||||||
}
|
}
|
||||||
else
|
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;
|
dversion = 19;
|
||||||
pversion = 6;
|
pversion = 6;
|
||||||
PatchPt = PatchFile;
|
PatchPt = PatchFile;
|
||||||
|
@ -3027,7 +3027,7 @@ void FinishDehPatch ()
|
||||||
subclass->Replacement = old_replacement;
|
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.
|
// Now that all Dehacked patches have been processed, it's okay to free StateMap.
|
||||||
|
|
|
@ -231,7 +231,7 @@ static struct TicSpecial
|
||||||
|
|
||||||
specialsize = MAX(specialsize * 2, needed + 30);
|
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++)
|
for (i = 0; i < BACKUPTICS; i++)
|
||||||
streams[i] = (BYTE *)M_Realloc (streams[i], specialsize);
|
streams[i] = (BYTE *)M_Realloc (streams[i], specialsize);
|
||||||
|
|
|
@ -2134,7 +2134,7 @@ bool PArray::ReadValue(FArchive &ar, void *addr) const
|
||||||
}
|
}
|
||||||
if (i < ElementCount)
|
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);
|
count, ElementCount);
|
||||||
for (; i < ElementCount; ++i)
|
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);
|
const PSymbol *sym = Symbols.FindSymbol(FName(label, true), true);
|
||||||
if (sym == NULL)
|
if (sym == NULL)
|
||||||
{
|
{
|
||||||
DPrintf("Cannot find field %s in %s\n",
|
DPrintf(DMSG_ERROR, "Cannot find field %s in %s\n",
|
||||||
label, TypeName.GetChars());
|
label, TypeName.GetChars());
|
||||||
SkipValue(ar);
|
SkipValue(ar);
|
||||||
}
|
}
|
||||||
else if (!sym->IsKindOf(RUNTIME_CLASS(PField)))
|
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());
|
label, TypeName.GetChars());
|
||||||
SkipValue(ar);
|
SkipValue(ar);
|
||||||
}
|
}
|
||||||
|
@ -2806,7 +2806,7 @@ bool PClass::ReadValue(FArchive &ar, void *addr) const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPrintf("Unknown superclass %s of class %s\n",
|
DPrintf(DMSG_ERROR, "Unknown superclass %s of class %s\n",
|
||||||
type->TypeName.GetChars(), TypeName.GetChars());
|
type->TypeName.GetChars(), TypeName.GetChars());
|
||||||
SkipValue(ar, VAL_Struct);
|
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());
|
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;
|
notnew = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3327,7 +3327,7 @@ PClass *PClass::FindClassTentative(FName name, bool fatal)
|
||||||
return static_cast<PClass *>(found);
|
return static_cast<PClass *>(found);
|
||||||
}
|
}
|
||||||
PClass *type = static_cast<PClass *>(GetClass()->CreateNew());
|
PClass *type = static_cast<PClass *>(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->TypeName = name;
|
||||||
type->ParentClass = this;
|
type->ParentClass = this;
|
||||||
|
|
|
@ -39,7 +39,7 @@ FStringTable GStrings;
|
||||||
EGameSpeed GameSpeed = SPEED_Normal;
|
EGameSpeed GameSpeed = SPEED_Normal;
|
||||||
|
|
||||||
// Show developer messages if true.
|
// Show developer messages if true.
|
||||||
CVAR (Bool, developer, false, 0)
|
CVAR (Int, developer, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
||||||
|
|
||||||
// [RH] Feature control cvars
|
// [RH] Feature control cvars
|
||||||
CVAR (Bool, var_friction, true, CVAR_SERVERINFO);
|
CVAR (Bool, var_friction, true, CVAR_SERVERINFO);
|
||||||
|
|
|
@ -204,7 +204,7 @@ extern int bodyqueslot;
|
||||||
|
|
||||||
|
|
||||||
// ---- [RH] ----
|
// ---- [RH] ----
|
||||||
EXTERN_CVAR (Bool, developer)
|
EXTERN_CVAR (Int, developer)
|
||||||
|
|
||||||
extern bool ToggleFullscreen;
|
extern bool ToggleFullscreen;
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ int Printf (int printlevel, const char *, ...) GCCPRINTF(2,3);
|
||||||
int Printf (const char *, ...) GCCPRINTF(1,2);
|
int Printf (const char *, ...) GCCPRINTF(1,2);
|
||||||
|
|
||||||
// [RH] Same here:
|
// [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 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);
|
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_MEDIUM, // death messages
|
||||||
PRINT_HIGH, // critical messages
|
PRINT_HIGH, // critical messages
|
||||||
PRINT_CHAT, // chat 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
|
struct PalEntry
|
||||||
{
|
{
|
||||||
|
|
|
@ -354,12 +354,12 @@ void FCompressedFile::Implode ()
|
||||||
// If the data could not be compressed, store it as-is.
|
// If the data could not be compressed, store it as-is.
|
||||||
if (r != Z_OK || outlen >= len)
|
if (r != Z_OK || outlen >= len)
|
||||||
{
|
{
|
||||||
DPrintf ("cfile could not be compressed\n");
|
DPrintf (DMSG_SPAMMY, "cfile could not be compressed\n");
|
||||||
outlen = 0;
|
outlen = 0;
|
||||||
}
|
}
|
||||||
else
|
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
|
else
|
||||||
|
@ -717,7 +717,7 @@ void FArchive::Close ()
|
||||||
{
|
{
|
||||||
m_File->Close ();
|
m_File->Close ();
|
||||||
m_File = NULL;
|
m_File = NULL;
|
||||||
DPrintf ("Processed %u objects\n", ArchiveToObject.Size());
|
DPrintf (DMSG_SPAMMY, "Processed %u objects\n", ArchiveToObject.Size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -825,13 +825,13 @@ void ADecal::BeginPlay ()
|
||||||
// without effectively doing anything.
|
// without effectively doing anything.
|
||||||
if (NULL == ShootDecal(tpl, this, Sector, X(), Y(), Z(), Angles.Yaw + 180, 64., true))
|
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
|
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.
|
// This actor doesn't need to stick around anymore.
|
||||||
Destroy();
|
Destroy();
|
||||||
|
|
|
@ -322,7 +322,7 @@ void PacketGet (void)
|
||||||
// Don't show the message for disconnect notifications.
|
// Don't show the message for disconnect notifications.
|
||||||
if (c != 2 || TransmitBuffer[0] != PRE_FAKE || TransmitBuffer[1] != PRE_DISCONNECT)
|
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;
|
doomcom.remotenode = -1;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1331,12 +1331,12 @@ static int CheckInventory (AActor *activator, const char *type, bool max)
|
||||||
|
|
||||||
if (info == NULL)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (!info->IsDescendantOf(RUNTIME_CLASS(AInventory)))
|
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;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2824,7 +2824,7 @@ void FBehavior::StaticStartTypedScripts (WORD type, AActor *activator, bool alwa
|
||||||
"Disconnect",
|
"Disconnect",
|
||||||
"Return"
|
"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]);
|
type < countof(TypeNames) ? TypeNames[type] : TypeNames[SCRIPT_Lightning - 1]);
|
||||||
for (unsigned int i = 0; i < StaticModules.Size(); ++i)
|
for (unsigned int i = 0; i < StaticModules.Size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -6209,7 +6209,7 @@ int DLevelScript::RunScript ()
|
||||||
activeBehavior = savedActiveBehavior;
|
activeBehavior = savedActiveBehavior;
|
||||||
// fall through
|
// fall through
|
||||||
case PCD_TERMINATE:
|
case PCD_TERMINATE:
|
||||||
DPrintf ("%s finished\n", ScriptPresentation(script).GetChars());
|
DPrintf (DMSG_NOTIFY, "%s finished\n", ScriptPresentation(script).GetChars());
|
||||||
state = SCRIPT_PleaseRemove;
|
state = SCRIPT_PleaseRemove;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -7646,7 +7646,7 @@ scriptwait:
|
||||||
if (activationline != NULL)
|
if (activationline != NULL)
|
||||||
{
|
{
|
||||||
activationline->special = 0;
|
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;
|
break;
|
||||||
|
|
||||||
|
@ -8285,7 +8285,7 @@ scriptwait:
|
||||||
line->args[2] = STACK(3);
|
line->args[2] = STACK(3);
|
||||||
line->args[3] = STACK(2);
|
line->args[3] = STACK(2);
|
||||||
line->args[4] = STACK(1);
|
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));
|
linenum, STACK(7), specnum, arg0, STACK(4), STACK(3), STACK(2), STACK(1));
|
||||||
}
|
}
|
||||||
sp -= 7;
|
sp -= 7;
|
||||||
|
@ -9663,7 +9663,7 @@ DLevelScript::DLevelScript (AActor *who, line_t *where, int num, const ScriptPtr
|
||||||
PutLast();
|
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)
|
static void SetScriptState (int script, DLevelScript::EScriptState state)
|
||||||
|
@ -9710,12 +9710,12 @@ void P_DoDeferedScripts ()
|
||||||
|
|
||||||
case acsdefered_t::defsuspend:
|
case acsdefered_t::defsuspend:
|
||||||
SetScriptState (def->script, DLevelScript::SCRIPT_Suspended);
|
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;
|
break;
|
||||||
|
|
||||||
case acsdefered_t::defterminate:
|
case acsdefered_t::defterminate:
|
||||||
SetScriptState (def->script, DLevelScript::SCRIPT_PleaseRemove);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
delete def;
|
delete def;
|
||||||
|
@ -9751,7 +9751,7 @@ static void addDefered (level_info_t *i, acsdefered_t::EType type, int script, c
|
||||||
def->playernum = -1;
|
def->playernum = -1;
|
||||||
}
|
}
|
||||||
i->defered = def;
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool inc
|
||||||
|
|
||||||
if ((type == 1 && !isbinary) || (type == 2 && isbinary))
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ static bool LoadScriptFile(int lumpnum, FileReader *lump, int numnodes, bool inc
|
||||||
// is exactly 1516 bytes long.
|
// is exactly 1516 bytes long.
|
||||||
if (numnodes % 1516 != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
numnodes /= 1516;
|
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.
|
// And the teaser version has 1488-byte entries.
|
||||||
if (numnodes % 1488 != 0)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
numnodes /= 1488;
|
numnodes /= 1488;
|
||||||
|
|
|
@ -1013,7 +1013,7 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
||||||
subsectors, numsubsectors,
|
subsectors, numsubsectors,
|
||||||
vertexes, numvertexes);
|
vertexes, numvertexes);
|
||||||
endTime = I_FPSTime ();
|
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;
|
buildtime = endTime - startTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1026,12 +1026,12 @@ bool P_CheckNodes(MapData * map, bool rebuilt, int buildtime)
|
||||||
#endif
|
#endif
|
||||||
if (level.maptype != MAPTYPE_BUILD && gl_cachenodes && buildtime/1000.f >= gl_cachetime)
|
if (level.maptype != MAPTYPE_BUILD && gl_cachenodes && buildtime/1000.f >= gl_cachetime)
|
||||||
{
|
{
|
||||||
DPrintf("Caching nodes\n");
|
DPrintf(DMSG_NOTIFY, "Caching nodes\n");
|
||||||
CreateCachedNodes(map);
|
CreateCachedNodes(map);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPrintf("Not caching nodes (time = %f)\n", buildtime/1000.f);
|
DPrintf(DMSG_NOTIFY, "Not caching nodes (time = %f)\n", buildtime/1000.f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -361,7 +361,7 @@ bool AActor::FixMapthingPos()
|
||||||
|
|
||||||
if (distance < radius)
|
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(),
|
this->GetClass()->TypeName.GetChars(), X(), Y(),
|
||||||
ldef->Delta().X == 0 ? "vertical" : ldef->Delta().Y == 0 ? "horizontal" : "diagonal",
|
ldef->Delta().X == 0 ? "vertical" : ldef->Delta().Y == 0 ? "horizontal" : "diagonal",
|
||||||
ldef - lines, distance);
|
ldef - lines, distance);
|
||||||
|
|
|
@ -1689,7 +1689,7 @@ static void SetMapThingUserData(AActor *actor, unsigned udi)
|
||||||
|
|
||||||
if (var == NULL || (var->Flags & VARF_Native) || !var->Type->IsKindOf(RUNTIME_CLASS(PBasicType)))
|
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());
|
actor->GetClass()->TypeName.GetChars());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2477,7 +2477,7 @@ int P_DetermineTranslucency (int lumpnum)
|
||||||
if (newcolor2.r == 255) // if black on white results in white it's either
|
if (newcolor2.r == 255) // if black on white results in white it's either
|
||||||
// fully transparent or additive
|
// fully transparent or additive
|
||||||
{
|
{
|
||||||
if (developer)
|
if (developer >= DMSG_NOTIFY)
|
||||||
{
|
{
|
||||||
char lumpname[9];
|
char lumpname[9];
|
||||||
lumpname[8] = 0;
|
lumpname[8] = 0;
|
||||||
|
@ -2488,7 +2488,7 @@ int P_DetermineTranslucency (int lumpnum)
|
||||||
return -newcolor.r;
|
return -newcolor.r;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (developer)
|
if (developer >= DMSG_NOTIFY)
|
||||||
{
|
{
|
||||||
char lumpname[9];
|
char lumpname[9];
|
||||||
lumpname[8] = 0;
|
lumpname[8] = 0;
|
||||||
|
@ -3028,7 +3028,7 @@ void P_LoadBlockMap (MapData * map)
|
||||||
Args->CheckParm("-blockmap")
|
Args->CheckParm("-blockmap")
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DPrintf ("Generating BLOCKMAP\n");
|
DPrintf (DMSG_SPAMMY, "Generating BLOCKMAP\n");
|
||||||
P_CreateBlockMap ();
|
P_CreateBlockMap ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -3060,7 +3060,7 @@ void P_LoadBlockMap (MapData * map)
|
||||||
|
|
||||||
if (!P_VerifyBlockMap(count))
|
if (!P_VerifyBlockMap(count))
|
||||||
{
|
{
|
||||||
DPrintf ("Generating BLOCKMAP\n");
|
DPrintf (DMSG_SPAMMY, "Generating BLOCKMAP\n");
|
||||||
P_CreateBlockMap();
|
P_CreateBlockMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3957,7 +3957,7 @@ void P_SetupLevel (const char *lumpname, int position)
|
||||||
subsectors, numsubsectors,
|
subsectors, numsubsectors,
|
||||||
vertexes, numvertexes);
|
vertexes, numvertexes);
|
||||||
endTime = I_FPSTime ();
|
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();
|
oldvertextable = builder.GetOldVertexTable();
|
||||||
reloop = true;
|
reloop = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVe
|
||||||
line->special = 0;
|
line->special = 0;
|
||||||
}
|
}
|
||||||
// end of changed code
|
// 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));
|
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;
|
special = line->special;
|
||||||
|
|
||||||
// end of changed code
|
// 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));
|
Printf("Line special %d predicted on line %i\n", special, int(line - lines));
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ extern gamestate_t wipegamestate;
|
||||||
//
|
//
|
||||||
// P_CheckTickerPaused
|
// 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
|
// pauses sound effects and possibly music. If the ticker should not be
|
||||||
// paused, then it returns false but does not unpause anything.
|
// paused, then it returns false but does not unpause anything.
|
||||||
//
|
//
|
||||||
|
|
|
@ -147,7 +147,7 @@ extern TArray<int> linemap;
|
||||||
|
|
||||||
void UDMFParserBase::Skip()
|
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('{'))
|
if(sc.CheckToken('{'))
|
||||||
{
|
{
|
||||||
int level = 1;
|
int level = 1;
|
||||||
|
|
|
@ -2441,7 +2441,7 @@ void P_PlayerThink (player_t *player)
|
||||||
S_ChangeMusic("*");
|
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();
|
DoLerp = (int)PredictionLast.pos.X != (int)player->mo->X() || (int)PredictionLast.pos.Y != (int)player->mo->Y();
|
||||||
|
|
||||||
// Aditional Debug information
|
// 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.gametic, i,
|
||||||
(PredictionLast.pos.X), (player->mo->X()),
|
(PredictionLast.pos.X), (player->mo->X()),
|
||||||
(PredictionLast.pos.Y), (player->mo->Y()));
|
(PredictionLast.pos.Y), (player->mo->Y()));
|
||||||
|
|
|
@ -242,18 +242,18 @@ void I_SetFPSLimit(int limit)
|
||||||
}
|
}
|
||||||
if (limit == 0)
|
if (limit == 0)
|
||||||
{ // no limit
|
{ // no limit
|
||||||
DPrintf("FPS timer disabled\n");
|
DPrintf(DMSG_NOTIFY, "FPS timer disabled\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FPSLimitTimerEnabled = true;
|
FPSLimitTimerEnabled = true;
|
||||||
if(timer_create(CLOCK_REALTIME, &FPSLimitEvent, &FPSLimitTimer) == -1)
|
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} };
|
itimerspec period = { {0, 0}, {0, 0} };
|
||||||
period.it_value.tv_nsec = period.it_interval.tv_nsec = 1000000000 / limit;
|
period.it_value.tv_nsec = period.it_interval.tv_nsec = 1000000000 / limit;
|
||||||
if(timer_settime(FPSLimitTimer, 0, &period, NULL) == -1)
|
if(timer_settime(FPSLimitTimer, 0, &period, NULL) == -1)
|
||||||
Printf("Failed to set FPS limitter timer\n");
|
Printf(DMSG_WARNING, "Failed to set FPS limitter timer\n");
|
||||||
DPrintf("FPS timer set to %u ms\n", (unsigned int) period.it_interval.tv_nsec / 1000000);
|
DPrintf(DMSG_NOTIFY, "FPS timer set to %u ms\n", (unsigned int) period.it_interval.tv_nsec / 1000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -2341,7 +2341,7 @@ void R_CheckDrawSegs ()
|
||||||
firstdrawseg = drawsegs + firstofs;
|
firstdrawseg = drawsegs + firstofs;
|
||||||
ds_p = drawsegs + MaxDrawSegs;
|
ds_p = drawsegs + MaxDrawSegs;
|
||||||
MaxDrawSegs = newdrawsegs;
|
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;
|
maxopenings = maxopenings ? maxopenings*2 : 16384;
|
||||||
while ((size_t)lastopening > maxopenings);
|
while ((size_t)lastopening > maxopenings);
|
||||||
openings = (short *)M_Realloc (openings, maxopenings * sizeof(*openings));
|
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;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,7 +222,7 @@ vissprite_t *R_NewVisSprite (void)
|
||||||
lastvissprite = &vissprites[MaxVisSprites];
|
lastvissprite = &vissprites[MaxVisSprites];
|
||||||
firstvissprite = &vissprites[firstvisspritenum];
|
firstvissprite = &vissprites[firstvisspritenum];
|
||||||
vissprite_p = &vissprites[prevvisspritenum];
|
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
|
// Allocate sprites from the new pile
|
||||||
for (vissprite_t **p = vissprite_p; p < lastvissprite; ++p)
|
for (vissprite_t **p = vissprite_p; p < lastvissprite; ++p)
|
||||||
|
@ -832,13 +832,11 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// decide which texture to use for the sprite
|
// decide which texture to use for the sprite
|
||||||
#ifdef RANGECHECK
|
if ((unsigned)spritenum >= sprites.Size ())
|
||||||
if (spritenum >= (signed)sprites.Size () || spritenum < 0)
|
|
||||||
{
|
{
|
||||||
DPrintf ("R_ProjectSprite: invalid sprite number %u\n", spritenum);
|
DPrintf (DMSG_ERROR, "R_ProjectSprite: invalid sprite number %u\n", spritenum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
spritedef_t *sprdef = &sprites[spritenum];
|
spritedef_t *sprdef = &sprites[spritenum];
|
||||||
if (thing->frame >= sprdef->numframes)
|
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
|
// decide which patch to use
|
||||||
if ((unsigned)pspr->GetSprite() >= (unsigned)sprites.Size())
|
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;
|
return;
|
||||||
}
|
}
|
||||||
sprdef = &sprites[pspr->GetSprite()];
|
sprdef = &sprites[pspr->GetSprite()];
|
||||||
if (pspr->GetFrame() >= sprdef->numframes)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
sprframe = &SpriteFrames[sprdef->spriteframes + pspr->GetFrame()];
|
sprframe = &SpriteFrames[sprdef->spriteframes + pspr->GetFrame()];
|
||||||
|
|
|
@ -471,7 +471,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name
|
||||||
{
|
{
|
||||||
// We can't add this to the flats namespace but
|
// We can't add this to the flats namespace but
|
||||||
// it needs to be flagged for the texture manager.
|
// 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;
|
Lumps[i].Flags |= LUMPF_MAYBEFLAT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name
|
||||||
}
|
}
|
||||||
|
|
||||||
// we found a marked block
|
// 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++)
|
for(int j = markers[start].index + 1; j < end; j++)
|
||||||
{
|
{
|
||||||
if (Lumps[j].Namespace != ns_global)
|
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)
|
// ignore sprite lumps smaller than 8 bytes (the smallest possible)
|
||||||
// in size -- this was used by some dmadds wads
|
// in size -- this was used by some dmadds wads
|
||||||
// as an 'empty' graphics resource
|
// 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
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -182,7 +182,7 @@ int FPlayList::SetPosition (int position)
|
||||||
{
|
{
|
||||||
Position = position;
|
Position = position;
|
||||||
}
|
}
|
||||||
DPrintf ("Playlist position set to %d\n", Position);
|
DPrintf (DMSG_NOTIFY, "Playlist position set to %d\n", Position);
|
||||||
return Position;
|
return Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ int FPlayList::Advance ()
|
||||||
{
|
{
|
||||||
Position = 0;
|
Position = 0;
|
||||||
}
|
}
|
||||||
DPrintf ("Playlist advanced to song %d\n", Position);
|
DPrintf (DMSG_NOTIFY, "Playlist advanced to song %d\n", Position);
|
||||||
return Position;
|
return Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ int FPlayList::Backup ()
|
||||||
{
|
{
|
||||||
Position = Songs.Size() - 1;
|
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;
|
return Position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -552,7 +552,7 @@ void S_UnloadSound (sfxinfo_t *sfx)
|
||||||
GSnd->UnloadSound(sfx->data);
|
GSnd->UnloadSound(sfx->data);
|
||||||
sfx->data.Clear();
|
sfx->data.Clear();
|
||||||
sfx->data3d.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)
|
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;
|
sfx->link = i;
|
||||||
// This is necessary to avoid using the rolloff settings of the linked sound if its
|
// This is necessary to avoid using the rolloff settings of the linked sound if its
|
||||||
// settings are different.
|
// 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);
|
int size = Wads.LumpLength(sfx->lumpnum);
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
|
@ -1396,7 +1396,7 @@ static void S_LoadSound3D(sfxinfo_t *sfx)
|
||||||
if(sfx->data3d.isValid())
|
if(sfx->data3d.isValid())
|
||||||
return;
|
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);
|
int size = Wads.LumpLength(sfx->lumpnum);
|
||||||
if(size <= 0) return;
|
if(size <= 0) return;
|
||||||
|
|
|
@ -1044,7 +1044,7 @@ void FScriptPosition::Message (int severity, const char *message, ...) const
|
||||||
{
|
{
|
||||||
FString composed;
|
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)
|
if (severity == MSG_OPTERROR)
|
||||||
{
|
{
|
||||||
severity = strictdecorate ? MSG_ERROR : MSG_WARNING;
|
severity = strictdecorate ? MSG_ERROR : MSG_WARNING;
|
||||||
|
|
|
@ -1994,7 +1994,7 @@ FISoundChannel *FMODSoundRenderer::StartSound(SoundHandle sfx, float vol, int pi
|
||||||
return CommonChannelSetup(chan, reuse_chan);
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2142,7 +2142,7 @@ FISoundChannel *FMODSoundRenderer::StartSound3D(SoundHandle sfx, SoundListener *
|
||||||
}
|
}
|
||||||
|
|
||||||
GRolloff = NULL;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2566,7 +2566,7 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener)
|
||||||
}
|
}
|
||||||
if (env != PrevEnvironment || env->Modified)
|
if (env != PrevEnvironment || env->Modified)
|
||||||
{
|
{
|
||||||
DPrintf ("Reverb Environment %s\n", env->Name);
|
DPrintf (DMSG_NOTIFY, "Reverb Environment %s\n", env->Name);
|
||||||
const_cast<ReverbContainer*>(env)->Modified = false;
|
const_cast<ReverbContainer*>(env)->Modified = false;
|
||||||
SetSystemReverbProperties(&env->Properties);
|
SetSystemReverbProperties(&env->Properties);
|
||||||
PrevEnvironment = env;
|
PrevEnvironment = env;
|
||||||
|
@ -2791,7 +2791,7 @@ std::pair<SoundHandle,bool> FMODSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int l
|
||||||
result = Sys->createSound((char *)sfxdata, samplemode, &exinfo, &sample);
|
result = Sys->createSound((char *)sfxdata, samplemode, &exinfo, &sample);
|
||||||
if (result != FMOD_OK)
|
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);
|
return std::make_pair(retval, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2829,7 +2829,7 @@ std::pair<SoundHandle,bool> FMODSoundRenderer::LoadSound(BYTE *sfxdata, int leng
|
||||||
result = Sys->createSound((char *)sfxdata, samplemode, &exinfo, &sample);
|
result = Sys->createSound((char *)sfxdata, samplemode, &exinfo, &sample);
|
||||||
if (result != FMOD_OK)
|
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);
|
return std::make_pair(retval, true);
|
||||||
}
|
}
|
||||||
SetCustomLoopPts(sample);
|
SetCustomLoopPts(sample);
|
||||||
|
|
|
@ -417,7 +417,7 @@ short *SoundRenderer::DecodeSample(int outlen, const void *coded, int sizebytes,
|
||||||
decoder->getInfo(&srate, &chans, &type);
|
decoder->getInfo(&srate, &chans, &type);
|
||||||
if(chans != ChannelConfig_Mono || type != SampleType_Int16)
|
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;
|
delete decoder;
|
||||||
return samples;
|
return samples;
|
||||||
}
|
}
|
||||||
|
@ -553,7 +553,7 @@ std::pair<SoundHandle,bool> SoundRenderer::LoadSoundVoc(BYTE *sfxdata, int lengt
|
||||||
break;
|
break;
|
||||||
default: // Unknown block type
|
default: // Unknown block type
|
||||||
okay = false;
|
okay = false;
|
||||||
DPrintf ("Unknown VOC block type %i\n", blocktype);
|
DPrintf (DMSG_ERROR, "Unknown VOC block type %i\n", blocktype);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Move to next block
|
// Move to next block
|
||||||
|
|
|
@ -498,12 +498,12 @@ int FluidSynthMIDIDevice::LoadPatchSets(const char *patches)
|
||||||
}
|
}
|
||||||
if (FLUID_FAILED != fluid_synth_sfload(FluidSynth, path, count == 0))
|
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++;
|
count++;
|
||||||
}
|
}
|
||||||
else
|
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);
|
tok = strtok(NULL, delim);
|
||||||
}
|
}
|
||||||
|
|
|
@ -376,7 +376,7 @@ bool TimidityPPMIDIDevice::LaunchTimidity ()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DPrintf ("cmd: \x1cG%s\n", CommandLine.GetChars());
|
DPrintf (DMSG_NOTIFY, "cmd: \x1cG%s\n", CommandLine.GetChars());
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
STARTUPINFO startup = { sizeof(startup), };
|
STARTUPINFO startup = { sizeof(startup), };
|
||||||
|
|
|
@ -143,7 +143,7 @@ XMISong::XMISong (FileReader &reader, EMidiDevice type, const char *args)
|
||||||
memset(Songs, 0, sizeof(*Songs) * NumSongs);
|
memset(Songs, 0, sizeof(*Songs) * NumSongs);
|
||||||
FindXMIDforms(MusHeader, SongLen, Songs);
|
FindXMIDforms(MusHeader, SongLen, Songs);
|
||||||
CurrSong = Songs;
|
CurrSong = Songs;
|
||||||
DPrintf("XMI song count: %d\n", NumSongs);
|
DPrintf(DMSG_SPAMMY, "XMI song count: %d\n", NumSongs);
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -747,8 +747,8 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
ALCint major=0, minor=0;
|
ALCint major=0, minor=0;
|
||||||
alcGetIntegerv(Device, ALC_MAJOR_VERSION, 1, &major);
|
alcGetIntegerv(Device, ALC_MAJOR_VERSION, 1, &major);
|
||||||
alcGetIntegerv(Device, ALC_MINOR_VERSION, 1, &minor);
|
alcGetIntegerv(Device, ALC_MINOR_VERSION, 1, &minor);
|
||||||
DPrintf(" ALC Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
DPrintf(DMSG_SPAMMY, " ALC Version: " TEXTCOLOR_BLUE"%d.%d\n", major, minor);
|
||||||
DPrintf(" ALC Extensions: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS));
|
DPrintf(DMSG_SPAMMY, " ALC Extensions: " TEXTCOLOR_ORANGE"%s\n", alcGetString(Device, ALC_EXTENSIONS));
|
||||||
|
|
||||||
TArray<ALCint> attribs;
|
TArray<ALCint> attribs;
|
||||||
if(*snd_samplerate > 0)
|
if(*snd_samplerate > 0)
|
||||||
|
@ -778,10 +778,10 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
}
|
}
|
||||||
attribs.Clear();
|
attribs.Clear();
|
||||||
|
|
||||||
DPrintf(" Vendor: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR));
|
DPrintf(DMSG_SPAMMY, " Vendor: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VENDOR));
|
||||||
DPrintf(" Renderer: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER));
|
DPrintf(DMSG_SPAMMY, " Renderer: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_RENDERER));
|
||||||
DPrintf(" Version: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION));
|
DPrintf(DMSG_SPAMMY, " Version: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_VERSION));
|
||||||
DPrintf(" Extensions: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS));
|
DPrintf(DMSG_SPAMMY, " Extensions: " TEXTCOLOR_ORANGE"%s\n", alGetString(AL_EXTENSIONS));
|
||||||
|
|
||||||
ALC.EXT_EFX = !!alcIsExtensionPresent(Device, "ALC_EXT_EFX");
|
ALC.EXT_EFX = !!alcIsExtensionPresent(Device, "ALC_EXT_EFX");
|
||||||
ALC.EXT_disconnect = !!alcIsExtensionPresent(Device, "ALC_EXT_disconnect");
|
ALC.EXT_disconnect = !!alcIsExtensionPresent(Device, "ALC_EXT_disconnect");
|
||||||
|
@ -864,7 +864,7 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FreeSfx = Sources;
|
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;
|
WasInWater = false;
|
||||||
if(*snd_efx && ALC.EXT_EFX)
|
if(*snd_efx && ALC.EXT_EFX)
|
||||||
|
@ -913,10 +913,10 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
{
|
{
|
||||||
alEffecti(envReverb, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB);
|
alEffecti(envReverb, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB);
|
||||||
if(alGetError() == AL_NO_ERROR)
|
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);
|
alEffecti(envReverb, AL_EFFECT_TYPE, AL_EFFECT_REVERB);
|
||||||
if(alGetError() == AL_NO_ERROR)
|
if(alGetError() == AL_NO_ERROR)
|
||||||
DPrintf(" Standard Reverb found\n");
|
DPrintf(DMSG_SPAMMY, " Standard Reverb found\n");
|
||||||
|
|
||||||
alDeleteEffects(1, &envReverb);
|
alDeleteEffects(1, &envReverb);
|
||||||
getALError();
|
getALError();
|
||||||
|
@ -929,7 +929,7 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
||||||
alFilteri(EnvFilters[0], AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
alFilteri(EnvFilters[0], AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
||||||
alFilteri(EnvFilters[1], AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
alFilteri(EnvFilters[1], AL_FILTER_TYPE, AL_FILTER_LOWPASS);
|
||||||
if(getALError() == AL_NO_ERROR)
|
if(getALError() == AL_NO_ERROR)
|
||||||
DPrintf(" Lowpass found\n");
|
DPrintf(DMSG_SPAMMY, " Lowpass found\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alDeleteFilters(2, EnvFilters);
|
alDeleteFilters(2, EnvFilters);
|
||||||
|
@ -1194,7 +1194,7 @@ std::pair<SoundHandle,bool> OpenALSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int
|
||||||
loopend = length / (channels*bits/8);
|
loopend = length / (channels*bits/8);
|
||||||
|
|
||||||
ALint loops[2] = { loopstart, loopend };
|
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);
|
alBufferiv(buffer, AL_LOOP_POINTS_SOFT, loops);
|
||||||
getALError();
|
getALError();
|
||||||
}
|
}
|
||||||
|
@ -1202,7 +1202,7 @@ std::pair<SoundHandle,bool> OpenALSoundRenderer::LoadSoundRaw(BYTE *sfxdata, int
|
||||||
{
|
{
|
||||||
static bool warned = false;
|
static bool warned = false;
|
||||||
if(!warned)
|
if(!warned)
|
||||||
Printf("Loop points not supported!\n");
|
Printf(DMSG_WARNING, "Loop points not supported!\n");
|
||||||
warned = true;
|
warned = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1867,7 +1867,7 @@ void OpenALSoundRenderer::UpdateListener(SoundListener *listener)
|
||||||
if(env != PrevEnvironment || env->Modified)
|
if(env != PrevEnvironment || env->Modified)
|
||||||
{
|
{
|
||||||
PrevEnvironment = env;
|
PrevEnvironment = env;
|
||||||
DPrintf("Reverb Environment %s\n", env->Name);
|
DPrintf(DMSG_NOTIFY, "Reverb Environment %s\n", env->Name);
|
||||||
|
|
||||||
if(EnvSlot != 0)
|
if(EnvSlot != 0)
|
||||||
LoadReverb(env);
|
LoadReverb(env);
|
||||||
|
|
|
@ -907,11 +907,12 @@ void DFrameBuffer::DrawRateStuff ()
|
||||||
// Drawing it as a texture does and continues to show how
|
// Drawing it as a texture does and continues to show how
|
||||||
// well the PalTex shader is working.
|
// well the PalTex shader is working.
|
||||||
static FPaletteTester palette;
|
static FPaletteTester palette;
|
||||||
|
int size = screen->GetHeight() < 800 ? 16 * 7 : 16 * 7 * 2;
|
||||||
|
|
||||||
palette.SetTranslation(vid_showpalette);
|
palette.SetTranslation(vid_showpalette);
|
||||||
DrawTexture(&palette, 0, 0,
|
DrawTexture(&palette, 0, 0,
|
||||||
DTA_DestWidth, 16*7,
|
DTA_DestWidth, size,
|
||||||
DTA_DestHeight, 16*7,
|
DTA_DestHeight, size,
|
||||||
DTA_Masked, false,
|
DTA_Masked, false,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -793,7 +793,7 @@ void I_SetFPSLimit(int limit)
|
||||||
CloseHandle(FPSLimitEvent);
|
CloseHandle(FPSLimitEvent);
|
||||||
FPSLimitEvent = NULL;
|
FPSLimitEvent = NULL;
|
||||||
}
|
}
|
||||||
DPrintf("FPS timer disabled\n");
|
DPrintf(DMSG_NOTIFY, "FPS timer disabled\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -802,7 +802,7 @@ void I_SetFPSLimit(int limit)
|
||||||
FPSLimitEvent = CreateEvent(NULL, FALSE, TRUE, NULL);
|
FPSLimitEvent = CreateEvent(NULL, FALSE, TRUE, NULL);
|
||||||
if (FPSLimitEvent == NULL)
|
if (FPSLimitEvent == NULL)
|
||||||
{ // Could not create event, so cannot use timer.
|
{ // 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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -817,7 +817,7 @@ void I_SetFPSLimit(int limit)
|
||||||
Printf("Failed to create FPS limitter timer\n");
|
Printf("Failed to create FPS limitter timer\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DPrintf("FPS timer set to %u ms\n", period);
|
DPrintf(DMSG_NOTIFY, "FPS timer set to %u ms\n", period);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1957,6 +1957,7 @@ MSGMNU_TEAMMESSAGES = "Team Messages";
|
||||||
MSGMNU_CENTEREDMESSAGES = "Centered Messages";
|
MSGMNU_CENTEREDMESSAGES = "Centered Messages";
|
||||||
MSGMNU_SCREENSHOTMESSAGES = "Screenshot messages";
|
MSGMNU_SCREENSHOTMESSAGES = "Screenshot messages";
|
||||||
MSGMNU_LONGSAVEMESSAGES = "Detailed save messages";
|
MSGMNU_LONGSAVEMESSAGES = "Detailed save messages";
|
||||||
|
MSGMNU_DEVELOPER = "Developer message mode";
|
||||||
|
|
||||||
// Scoreboard Options
|
// Scoreboard Options
|
||||||
SCRBRDMNU_TITLE = "SCOREBOARD OPTIONS";
|
SCRBRDMNU_TITLE = "SCOREBOARD OPTIONS";
|
||||||
|
@ -2287,6 +2288,10 @@ OPTVAL_SINC = "Sinc";
|
||||||
OPTVAL_NOTEONOFFONLY = "Note on/off only";
|
OPTVAL_NOTEONOFFONLY = "Note on/off only";
|
||||||
OPTVAL_FULLRAMPING = "Full ramping";
|
OPTVAL_FULLRAMPING = "Full ramping";
|
||||||
OPTVAL_ALLUNACKNOWLEDGED = "All unacknowledged";
|
OPTVAL_ALLUNACKNOWLEDGED = "All unacknowledged";
|
||||||
|
OPTVAL_ERRORS = "Errors";
|
||||||
|
OPTVAL_WARNINGS = "Warnings";
|
||||||
|
OPTVAL_NOTIFICATIONS = "Notifications";
|
||||||
|
OPTVAL_EVERYTHING = "Everything";
|
||||||
// Colors
|
// Colors
|
||||||
C_BRICK = "\cabrick";
|
C_BRICK = "\cabrick";
|
||||||
C_TAN = "\cbtan";
|
C_TAN = "\cbtan";
|
||||||
|
|
|
@ -1118,6 +1118,15 @@ OptionValue MessageLevels
|
||||||
2.0, "$OPTVAL_CRITICALMESSAGES"
|
2.0, "$OPTVAL_CRITICALMESSAGES"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionValue DevMessageLevels
|
||||||
|
{
|
||||||
|
0, "$OPTVAL_OFF"
|
||||||
|
1, "$OPTVAL_ERRORS"
|
||||||
|
2, "$OPTVAL_WARNINGS",
|
||||||
|
3, "$OPTVAL_NOTIFICATIONS"
|
||||||
|
4, "$OPTVAL_EVERYTHING"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu MessageOptions
|
OptionMenu MessageOptions
|
||||||
{
|
{
|
||||||
Title "$MSGMNU_TITLE"
|
Title "$MSGMNU_TITLE"
|
||||||
|
@ -1126,6 +1135,7 @@ OptionMenu MessageOptions
|
||||||
Option "$MSGMNU_SHOWSECRETS", "cl_showsecretmessage", "OnOff"
|
Option "$MSGMNU_SHOWSECRETS", "cl_showsecretmessage", "OnOff"
|
||||||
Option "$MSGMNU_SCALETEXT", "con_scaletext", "ScaleValues"
|
Option "$MSGMNU_SCALETEXT", "con_scaletext", "ScaleValues"
|
||||||
Option "$MSGMNU_MESSAGELEVEL", "msg", "MessageLevels"
|
Option "$MSGMNU_MESSAGELEVEL", "msg", "MessageLevels"
|
||||||
|
Option "$MSGMNU_DEVELOPER", "developer", "DevMessageLevels"
|
||||||
Option "$MSGMNU_CENTERMESSAGES", "con_centernotify", "OnOff"
|
Option "$MSGMNU_CENTERMESSAGES", "con_centernotify", "OnOff"
|
||||||
StaticText " "
|
StaticText " "
|
||||||
StaticText "$MSGMNU_MESSAGECOLORS", 1
|
StaticText "$MSGMNU_MESSAGECOLORS", 1
|
||||||
|
|
Loading…
Reference in a new issue