Add a simple indicator of progress when loading a large def (like the HRP)... print one period to the startup window per 50 passes of the main loop in defsparser()

git-svn-id: https://svn.eduke32.com/eduke32@3801 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2013-05-23 18:27:24 +00:00
parent 9afde6e21b
commit 3e9f25081d

View file

@ -196,6 +196,7 @@ static int32_t defsparser(scriptfile *script)
{
int32_t tokn;
char *cmdtokptr;
static uint32_t iter = 0;
static const tokenlist basetokens[] =
{
@ -259,6 +260,14 @@ static int32_t defsparser(scriptfile *script)
while (1)
{
if (++iter >= 50)
{
flushlogwindow = 1;
initprintf(".");
flushlogwindow = 0;
iter = 0;
}
if (quitevent) return 0;
tokn = getatoken(script,basetokens,sizeof(basetokens)/sizeof(tokenlist));
cmdtokptr = script->ltextptr;
@ -2097,6 +2106,7 @@ static int32_t defsparser(scriptfile *script)
initprintf("Unknown token.\n"); break;
}
}
return 0;
}
@ -2130,6 +2140,8 @@ int32_t loaddefinitionsfile(const char *fn)
if (!script) return -1;
initprintf("\n");
return 0;
}