mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
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:
parent
9afde6e21b
commit
3e9f25081d
1 changed files with 12 additions and 0 deletions
|
@ -196,6 +196,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
{
|
{
|
||||||
int32_t tokn;
|
int32_t tokn;
|
||||||
char *cmdtokptr;
|
char *cmdtokptr;
|
||||||
|
static uint32_t iter = 0;
|
||||||
|
|
||||||
static const tokenlist basetokens[] =
|
static const tokenlist basetokens[] =
|
||||||
{
|
{
|
||||||
|
@ -259,6 +260,14 @@ static int32_t defsparser(scriptfile *script)
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
if (++iter >= 50)
|
||||||
|
{
|
||||||
|
flushlogwindow = 1;
|
||||||
|
initprintf(".");
|
||||||
|
flushlogwindow = 0;
|
||||||
|
iter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (quitevent) return 0;
|
if (quitevent) return 0;
|
||||||
tokn = getatoken(script,basetokens,sizeof(basetokens)/sizeof(tokenlist));
|
tokn = getatoken(script,basetokens,sizeof(basetokens)/sizeof(tokenlist));
|
||||||
cmdtokptr = script->ltextptr;
|
cmdtokptr = script->ltextptr;
|
||||||
|
@ -2097,6 +2106,7 @@ static int32_t defsparser(scriptfile *script)
|
||||||
initprintf("Unknown token.\n"); break;
|
initprintf("Unknown token.\n"); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2130,6 +2140,8 @@ int32_t loaddefinitionsfile(const char *fn)
|
||||||
|
|
||||||
if (!script) return -1;
|
if (!script) return -1;
|
||||||
|
|
||||||
|
initprintf("\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue