- Added a range parameter to SNDINFO's $limit.

- Restored Dehacked music name replacement.


SVN r1416 (trunk)
This commit is contained in:
Christoph Oelckers 2009-02-08 11:28:30 +00:00
commit 4b064d9b5d
15 changed files with 339 additions and 215 deletions

View file

@ -313,6 +313,7 @@ static int PatchText (int);
static int PatchStrings (int);
static int PatchPars (int);
static int PatchCodePtrs (int);
static int PatchMusic (int);
static int DoInclude (int);
static const struct {
@ -335,6 +336,7 @@ static const struct {
{ "[STRINGS]", PatchStrings },
{ "[PARS]", PatchPars },
{ "[CODEPTR]", PatchCodePtrs },
{ "[MUSIC]", PatchMusic },
{ NULL, },
};
@ -1848,6 +1850,26 @@ static int PatchCodePtrs (int dummy)
return result;
}
static int PatchMusic (int dummy)
{
int result;
DPrintf ("[Music]\n");
while ((result = GetLine()) == 1)
{
const char *newname = skipwhite (Line2);
FString keystring;
keystring << "MUSIC_" << Line1;
GStrings.SetString (keystring, newname);
DPrintf ("Music %s set to:\n%s\n", keystring.GetChars(), newname);
}
return result;
}
static int PatchText (int oldSize)
{
int newSize;
@ -1941,26 +1963,6 @@ static int PatchText (int oldSize)
}
}
#if 0
// Search through music names.
if (oldSize < 7)
{ // Music names are never >6 chars
char musname[9];
level_info_t *info = LevelInfos;
mysnprintf (musname, countof(musname), "d_%s", oldStr);
while (info->level_name)
{
if (info->music && stricmp (info->music, musname) == 0)
{
good = true;
strcpy (info->music, musname);
}
info++;
}
}
#endif
if (good)
goto donewithtext;