mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 08:31:45 +00:00
- Allow defaultenvironment to take names as well as numeric IDs.
SVN r2262 (trunk)
This commit is contained in:
parent
aa86e62693
commit
69c777df4c
3 changed files with 24 additions and 7 deletions
|
@ -2027,6 +2027,9 @@ void D_DoomMain (void)
|
||||||
StartScreen->AppendStatusLine(temp);
|
StartScreen->AppendStatusLine(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [RH] Load sound environments
|
||||||
|
S_ParseReverbDef ();
|
||||||
|
|
||||||
// [RH] Parse through all loaded mapinfo lumps
|
// [RH] Parse through all loaded mapinfo lumps
|
||||||
Printf ("G_ParseMapInfo: Load map definitions.\n");
|
Printf ("G_ParseMapInfo: Load map definitions.\n");
|
||||||
G_ParseMapInfo (iwad_info->MapInfo);
|
G_ParseMapInfo (iwad_info->MapInfo);
|
||||||
|
@ -2035,7 +2038,6 @@ void D_DoomMain (void)
|
||||||
Printf ("S_InitData: Load sound definitions.\n");
|
Printf ("S_InitData: Load sound definitions.\n");
|
||||||
S_InitData ();
|
S_InitData ();
|
||||||
|
|
||||||
|
|
||||||
Printf ("Texman.Init: Init texture manager.\n");
|
Printf ("Texman.Init: Init texture manager.\n");
|
||||||
TexMan.Init();
|
TexMan.Init();
|
||||||
|
|
||||||
|
|
|
@ -1256,11 +1256,27 @@ DEFINE_MAP_OPTION(defaultenvironment, false)
|
||||||
int id;
|
int id;
|
||||||
|
|
||||||
parse.ParseAssign();
|
parse.ParseAssign();
|
||||||
parse.sc.MustGetNumber();
|
if (parse.sc.CheckNumber())
|
||||||
id = parse.sc.Number << 8;
|
{ // Numeric ID XXX [, YYY]
|
||||||
if (parse.CheckNumber())
|
id = parse.sc.Number << 8;
|
||||||
{
|
if (parse.CheckNumber())
|
||||||
id |= parse.sc.Number;
|
{
|
||||||
|
id |= parse.sc.Number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // Named environment
|
||||||
|
parse.sc.MustGetString();
|
||||||
|
ReverbContainer *reverb = S_FindEnvironment(parse.sc.String);
|
||||||
|
if (reverb == NULL)
|
||||||
|
{
|
||||||
|
parse.sc.ScriptMessage("Unknown sound environment '%s'\n", parse.sc.String);
|
||||||
|
id = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
id = reverb->ID;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
info->DefaultEnvironment = id;
|
info->DefaultEnvironment = id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,7 +323,6 @@ void S_InitData ()
|
||||||
LastLocalSndInfo = LastLocalSndSeq = "";
|
LastLocalSndInfo = LastLocalSndSeq = "";
|
||||||
S_ParseSndInfo ();
|
S_ParseSndInfo ();
|
||||||
S_ParseSndSeq (-1);
|
S_ParseSndSeq (-1);
|
||||||
S_ParseReverbDef ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue