data = entdata;
if (!data)
return;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
if (com_token[0] != '{')
return; // error
while (1)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
if (com_token[0] == '}')
break; // end of worldspawn
strlcpy (key, com_token, sizeof (key));
while (key[strlen(key)-1] == ' ') // remove trailing spaces
key[strlen(key)-1] = 0;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
strlcpy (value, com_token, sizeof (value));
if (!strcmp("sky", key))
for (;;)
{
int l;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break;
if (com_token[0] == '{')
continue;
for (l = 0;l < (int)sizeof(keyname) - 1 && com_token[k+l] && com_token[k+l] > ' ';l++)
keyname[l] = com_token[k+l];
keyname[l] = 0;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break;
if (developer.integer >= 100)
Con_Printf("key: %s %s\n", keyname, com_token);
}
// version
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
version = atoi(com_token);
if (version != SAVEGAME_VERSION)
{
for (i = 0;i < NUM_SPAWN_PARMS;i++)
{
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
spawn_parms[i] = atof(com_token);
}
// skill
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
// this silliness is so we can load 1.06 save files, which have float skill values
current_skill = (int)(atof(com_token) + 0.5);
Cvar_SetValue ("skill", (float)current_skill);
// mapname
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
strcpy (mapname, com_token);
// time
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
time = atof(com_token);
allowcheats = sv_cheats.integer != 0;
{
// light style
oldt = t;
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
// if this is a 64 lightstyle savegame produced by Quake, stop now
// we have to check this because darkplaces saves 256 lightstyle savegames
if (com_token[0] == '{')
for(;;)
{
oldt = t;
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
if (com_token[0] == '{')
{
t = oldt;
for (;;)
{
start = t;
- while (COM_ParseToken(&t, false))
+ while (COM_ParseTokenConsole(&t))
if (!strcmp(com_token, "}"))
break;
- if (!COM_ParseToken(&start, false))
+ if (!COM_ParseTokenConsole(&start))
{
// end of file
break;
if (Cmd_Argc() > 2)
{
message = Cmd_Args();
- COM_ParseToken(&message, false);
+ COM_ParseTokenConsole(&message);
if (byNumber)
{
message++; // skip the #
buf[sizeof(buf) - 1] = 0;
t = buf;
// version
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
version = atoi(com_token);
// description
- COM_ParseToken(&t, false);
+ COM_ParseTokenConsole(&t);
strlcpy (m_filenames[i], com_token, sizeof (m_filenames[i]));
// change _ back to space
int i, j, k;
if (!data)
return;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
if (com_token[0] != '{')
return; // error
while (1)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
if (com_token[0] == '}')
break; // end of worldspawn
strcpy(key, com_token);
while (key[strlen(key)-1] == ' ') // remove trailing spaces
key[strlen(key)-1] = 0;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
dpsnprintf(value, sizeof(value), "%s", com_token);
if (!strcmp("wad", key)) // for HalfLife maps
if (!maptext)
return;
text = maptext;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
submodel = 0;
for (;;)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break;
if (com_token[0] != '{')
return; // error
brushes = Mem_Alloc(loadmodel->mempool, maxbrushes * sizeof(mbrush_t));
for (;;)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
if (com_token[0] == '}')
break; // end of entity
}
for (;;)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
return; // error
if (com_token[0] == '}')
break; // end of brush
// FIXME: support hl .map format
for (pointnum = 0;pointnum < 3;pointnum++)
{
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
for (componentnum = 0;componentnum < 3;componentnum++)
{
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
point[pointnum][componentnum] = atof(com_token);
}
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
}
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
strlcpy(facetexture, com_token, sizeof(facetexture));
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
//scroll_s = atof(com_token);
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
//scroll_t = atof(com_token);
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
//rotate = atof(com_token);
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
//scale_s = atof(com_token);
- COM_ParseToken(&data, false);
+ COM_ParseTokenConsole(&data);
//scale_t = atof(com_token);
TriangleNormal(point[0], point[1], point[2], planenormal);
VectorNormalizeDouble(planenormal);
memcpy(loadmodel->brush.entities, mod_base + l->fileofs, l->filelen);
data = loadmodel->brush.entities;
// some Q3 maps override the lightgrid_cellsize with a worldspawn key
- if (data && COM_ParseToken(&data, false) && com_token[0] == '{')
+ if (data && COM_ParseTokenConsole(&data) && com_token[0] == '{')
{
while (1)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break; // error
if (com_token[0] == '}')
break; // end of worldspawn
strcpy(key, com_token);
while (key[strlen(key)-1] == ' ') // remove trailing spaces
key[strlen(key)-1] = 0;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break; // error
strcpy(value, com_token);
if (!strcmp("gridsize", key))
data = PRVM_G_STRING(OFS_PARM1);
// parse the opening brace
- if (!COM_ParseToken(&data, false) || com_token[0] != '{' )
+ if (!COM_ParseTokenConsole(&data) || com_token[0] != '{' )
PRVM_ERROR ("VM_parseentitydata: %s: Couldn't parse entity data:\n%s", PRVM_NAME, data );
PRVM_ED_ParseEdict (data, ent);
while (1)
{
// parse key
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
PRVM_ERROR ("PRVM_ED_ParseGlobals: EOF without closing brace");
if (com_token[0] == '}')
break;
strcpy (keyname, com_token);
// parse value
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
PRVM_ERROR ("PRVM_ED_ParseGlobals: EOF without closing brace");
if (com_token[0] == '}')
while (1)
{
// parse key
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace");
if (developer_entityparsing.integer)
Con_Printf("Key: \"%s\"", com_token);
}
// parse value
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
PRVM_ERROR ("PRVM_ED_ParseEdict: EOF without closing brace");
if (developer_entityparsing.integer)
Con_Printf(" \"%s\"\n", com_token);
while (1)
{
// parse the opening brace
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break;
if (com_token[0] != '{')
PRVM_ERROR ("PRVM_ED_LoadFromFile: %s: found %s when expecting {", PRVM_NAME, com_token);
data = r_refdef.worldmodel->brush.entities;
if (!data)
return;
- for (entnum = 0;COM_ParseToken(&data, false) && com_token[0] == '{';entnum++)
+ for (entnum = 0;COM_ParseTokenConsole(&data) && com_token[0] == '{';entnum++)
{
type = LIGHTTYPE_MINUSX;
origin[0] = origin[1] = origin[2] = 0;
islight = false;
while (1)
{
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break; // error
if (com_token[0] == '}')
break; // end of entity
strcpy(key, com_token);
while (key[strlen(key)-1] == ' ') // remove trailing spaces
key[strlen(key)-1] = 0;
- if (!COM_ParseToken(&data, false))
+ if (!COM_ParseTokenConsole(&data))
break; // error
strcpy(value, com_token);