mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
CON_SETCFGNAME: sets the name of the cfg during CON compile if a cfg wasn't specified on the command line
git-svn-id: https://svn.eduke32.com/eduke32@986 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
81d0ea972d
commit
63e5850a86
2 changed files with 30 additions and 0 deletions
|
@ -470,6 +470,7 @@ const char *keyw[] =
|
|||
"activatecheat", // 333
|
||||
"setgamepalette", // 334
|
||||
"setdefname", // 335
|
||||
"setcfgname", // 336
|
||||
"<null>"
|
||||
};
|
||||
|
||||
|
@ -4602,6 +4603,34 @@ repeatcase:
|
|||
}
|
||||
return 0;
|
||||
|
||||
case CON_SETCFGNAME:
|
||||
{
|
||||
scriptptr--;
|
||||
while (isaltok(*textptr) == 0)
|
||||
{
|
||||
if (*textptr == 0x0a) line_number++;
|
||||
textptr++;
|
||||
if (*textptr == 0) break;
|
||||
}
|
||||
j = 0;
|
||||
while (isaltok(*textptr))
|
||||
{
|
||||
tempbuf[j] = *(textptr++);
|
||||
j++;
|
||||
}
|
||||
tempbuf[j] = '\0';
|
||||
if (Bstrcmp(setupfilename,"duke3d.cfg") == 0) // not set to something else via -cfg
|
||||
{
|
||||
char temp[BMAX_PATH];
|
||||
Bstrcpy(temp,tempbuf);
|
||||
CONFIG_WriteSetup();
|
||||
Bstrcpy(setupfilename,temp);
|
||||
CONFIG_ReadSetup();
|
||||
}
|
||||
initprintf("Using config file '%s'.\n",setupfilename);
|
||||
}
|
||||
return 0;
|
||||
|
||||
case CON_DEFINEGAMETYPE:
|
||||
scriptptr--;
|
||||
transnum(LABEL_DEFINE);
|
||||
|
|
|
@ -846,4 +846,5 @@ enum keywords
|
|||
CON_ACTIVATECHEAT, // 333
|
||||
CON_SETGAMEPALETTE, // 334
|
||||
CON_SETDEFNAME, // 335
|
||||
CON_SETCFGNAME, // 336
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue