mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 12:10:48 +00:00
bi_inputline.c:
add InputLine_SetUserData pr_resolve.c: report the correct missing symbol (self instead of time)
This commit is contained in:
parent
932ac624bd
commit
c1f5659977
2 changed files with 15 additions and 1 deletions
|
@ -104,6 +104,16 @@ bi_InputLine_Create (progs_t *pr)
|
|||
R_INT (pr) = handle - pr->pr_globals;
|
||||
}
|
||||
|
||||
static void
|
||||
bi_InputLine_SetUserData (progs_t *pr)
|
||||
{
|
||||
inputline_t *line = get_inputline (pr, P_INT (pr, 0),
|
||||
"InputLine_SetWidth");
|
||||
pr_type_t *data = P_POINTER (pr, 1);
|
||||
|
||||
line->user_data = data;
|
||||
}
|
||||
|
||||
static void
|
||||
bi_InputLine_SetWidth (progs_t *pr)
|
||||
{
|
||||
|
@ -233,6 +243,8 @@ InputLine_Progs_Init (progs_t *pr)
|
|||
|
||||
PR_Resources_Register (pr, "InputLine", res, bi_il_clear);
|
||||
PR_AddBuiltin (pr, "InputLine_Create", bi_InputLine_Create, -1);
|
||||
PR_AddBuiltin (pr, "InputLine_SetUserData",
|
||||
bi_InputLine_SetUserData, -1);
|
||||
PR_AddBuiltin (pr, "InputLine_SetWidth", bi_InputLine_SetWidth, -1);
|
||||
PR_AddBuiltin (pr, "InputLine_SetText", bi_InputLine_SetText, -1);
|
||||
PR_AddBuiltin (pr, "InputLine_GetText", bi_InputLine_GetText, -1);
|
||||
|
|
|
@ -168,8 +168,10 @@ PR_ResolveGlobals (progs_t *pr)
|
|||
goto error;
|
||||
pr->globals.time = &G_FLOAT (pr, def->ofs);
|
||||
if (!(def = PR_FindGlobal (pr, ".self")))
|
||||
if (!(def = PR_FindGlobal (pr, "self")))
|
||||
if (!(def = PR_FindGlobal (pr, "self"))) {
|
||||
sym = "self";
|
||||
goto error;
|
||||
}
|
||||
pr->globals.self = &G_INT (pr, def->ofs);
|
||||
if ((pr->fields.nextthink = ED_GetFieldIndex (pr, sym = "nextthink")) == -1)
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue