mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 20:41:20 +00:00
Use Sys_Error instead of PR_Error in ED_ConvertToPlist.
ED_ConvertToPlist is now independent of the progs engine as its only use for the progs_t * param was for PR_Error.
This commit is contained in:
parent
7d2e938d37
commit
675db274a6
3 changed files with 8 additions and 8 deletions
|
@ -247,7 +247,7 @@ struct plitem_s *ED_EntityDict (progs_t *pr, edict_t *ed);
|
|||
struct plitem_s *ED_GlobalsDict (progs_t *pr);
|
||||
void ED_InitGlobals (progs_t *pr, struct plitem_s *globals);
|
||||
void ED_InitEntity (progs_t *pr, struct plitem_s *entity, edict_t *ent);
|
||||
struct plitem_s *ED_ConvertToPlist (progs_t *pr, struct script_s *script);
|
||||
struct plitem_s *ED_ConvertToPlist (struct script_s *script);
|
||||
struct plitem_s *ED_Parse (progs_t *pr, const char *data);
|
||||
void ED_LoadFromFile (progs_t *pr, const char *data);
|
||||
void ED_EntityParseFunction (progs_t *pr);
|
||||
|
|
|
@ -299,7 +299,7 @@ ED_ParseEpair (progs_t *pr, pr_type_t *base, ddef_t *key, const char *s)
|
|||
*/
|
||||
|
||||
VISIBLE plitem_t *
|
||||
ED_ConvertToPlist (progs_t *pr, script_t *script)
|
||||
ED_ConvertToPlist (script_t *script)
|
||||
{
|
||||
plitem_t *plist = PL_NewArray ();
|
||||
plitem_t *ent;
|
||||
|
@ -311,11 +311,11 @@ ED_ConvertToPlist (progs_t *pr, script_t *script)
|
|||
while (Script_GetToken (script, 1)) {
|
||||
token = script->token->str;
|
||||
if (!strequal (token, "{"))
|
||||
PR_Error (pr, "ED_ConvertToPlist: EOF without closing brace");
|
||||
Sys_Error ("ED_ConvertToPlist: EOF without closing brace");
|
||||
ent = PL_NewDictionary ();
|
||||
while (1) {
|
||||
if (!Script_GetToken (script, 1))
|
||||
PR_Error (pr, "ED_ConvertToPlist: EOF without closing brace");
|
||||
Sys_Error ("ED_ConvertToPlist: EOF without closing brace");
|
||||
token = script->token->str;
|
||||
if (strequal (token, "}"))
|
||||
break;
|
||||
|
@ -329,11 +329,11 @@ ED_ConvertToPlist (progs_t *pr, script_t *script)
|
|||
key = PL_NewString (token);
|
||||
}
|
||||
if (!Script_TokenAvailable (script, 0))
|
||||
PR_Error (pr, "ED_ConvertToPlist: EOL without value");
|
||||
Sys_Error ("ED_ConvertToPlist: EOL without value");
|
||||
Script_GetToken (script, 0);
|
||||
token = script->token->str;
|
||||
if (strequal (token, "}"))
|
||||
PR_Error (pr, "ED_ConvertToPlist: closing brace without data");
|
||||
Sys_Error ("ED_ConvertToPlist: closing brace without data");
|
||||
if (anglehack)
|
||||
value = PL_NewString (va ("0 %s 0", token));
|
||||
else
|
||||
|
@ -501,7 +501,7 @@ ED_Parse (progs_t *pr, const char *data)
|
|||
} else {
|
||||
// oldstyle entity data
|
||||
Script_UngetToken (script);
|
||||
entity_list = ED_ConvertToPlist (pr, script);
|
||||
entity_list = ED_ConvertToPlist (script);
|
||||
}
|
||||
}
|
||||
Script_Delete (script);
|
||||
|
|
|
@ -499,7 +499,7 @@ convert_to_game_dict (script_t *script)
|
|||
PL_D_AddObject (game, "lightstyles", item);
|
||||
|
||||
// load the edicts out of the savegame file
|
||||
list = ED_ConvertToPlist (&sv_pr_state, script);
|
||||
list = ED_ConvertToPlist (script);
|
||||
item = PL_RemoveObjectAtIndex (list, 0);
|
||||
PL_D_AddObject (game, "globals", item);
|
||||
PL_D_AddObject (game, "entities", list);
|
||||
|
|
Loading…
Reference in a new issue