Cheap hack to let Mapster32 read the visibility parameter from gamestartup when parsing the CONs for sound definitions.

git-svn-id: https://svn.eduke32.com/eduke32@5595 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-01-27 10:06:03 +00:00
parent 798685ee80
commit b53767000b

View file

@ -9192,6 +9192,8 @@ enum
T_RENAMEFILE,
T_GLOBALGAMEFLAGS,
T_GAMESTARTUP,
T_DUMMY,
};
@ -9723,6 +9725,7 @@ static int32_t parseconsounds(scriptfile *script)
{ "define", T_DEFINE },
{ "#define", T_DEFINE },
{ "definesound", T_DEFINESOUND },
{ "gamestartup", T_GAMESTARTUP },
};
while (1)
@ -9755,6 +9758,11 @@ static int32_t parseconsounds(scriptfile *script)
name,number,script->filename,scriptfile_getlinum(script,cmdtokptr));
break;
}
case T_GAMESTARTUP:
{
if (scriptfile_getsymbol(script, &g_visibility)) break;
break;
}
case T_DEFINESOUND:
{
char *definedname, *filename;
@ -9879,6 +9887,9 @@ static int32_t loadconsounds(const char *fn)
else
initprintf("Loaded %d sound definitions.\n", ret);
if (g_visibility != 512)
initprintf("Global visibility: %d\n", g_visibility);
scriptfile_close(script);
scriptfile_clearsymbols();
return ret;