mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +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);
|
||||
}
|
||||
|
||||
// [RH] Load sound environments
|
||||
S_ParseReverbDef ();
|
||||
|
||||
// [RH] Parse through all loaded mapinfo lumps
|
||||
Printf ("G_ParseMapInfo: Load map definitions.\n");
|
||||
G_ParseMapInfo (iwad_info->MapInfo);
|
||||
|
@ -2035,7 +2038,6 @@ void D_DoomMain (void)
|
|||
Printf ("S_InitData: Load sound definitions.\n");
|
||||
S_InitData ();
|
||||
|
||||
|
||||
Printf ("Texman.Init: Init texture manager.\n");
|
||||
TexMan.Init();
|
||||
|
||||
|
|
|
@ -1256,11 +1256,27 @@ DEFINE_MAP_OPTION(defaultenvironment, false)
|
|||
int id;
|
||||
|
||||
parse.ParseAssign();
|
||||
parse.sc.MustGetNumber();
|
||||
id = parse.sc.Number << 8;
|
||||
if (parse.CheckNumber())
|
||||
{
|
||||
id |= parse.sc.Number;
|
||||
if (parse.sc.CheckNumber())
|
||||
{ // Numeric ID XXX [, YYY]
|
||||
id = parse.sc.Number << 8;
|
||||
if (parse.CheckNumber())
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -323,7 +323,6 @@ void S_InitData ()
|
|||
LastLocalSndInfo = LastLocalSndSeq = "";
|
||||
S_ParseSndInfo ();
|
||||
S_ParseSndSeq (-1);
|
||||
S_ParseReverbDef ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue