return true;
}
-qboolean CL_VM_InputEvent (qboolean down, int key)
+qboolean CL_VM_InputEvent (qboolean down, int key, int ascii)
{
qboolean r;
+ prvm_eval_t* val;
if(!cl.csqc_loaded)
return false;
CSQC_BEGIN
prog->globals.client->time = cl.time;
PRVM_G_FLOAT(OFS_PARM0) = !down; // 0 is down, 1 is up
PRVM_G_FLOAT(OFS_PARM1) = key;
+ if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.input_ascii)))
+ val->_float = ascii;
PRVM_ExecuteProgram(prog->funcoffsets.CSQC_InputEvent, "QC function CSQC_InputEvent is missing");
r = CSQC_RETURNVAL;
}
#ifdef SUPPORT_GECKO
// forward declaration of clgecko_t
-typedef struct clgecko_s clgecko_t;
+struct clgecko_s;
#endif
typedef struct prvm_stack_s
int dmg_origin; // csqc
int sb_showscores; // csqc
int drawfont; // csqc / menu
+ int input_ascii; // csqc
}
prvm_prog_globaloffsets_t;
qfile_t *openfiles[PRVM_MAX_OPENFILES];
fssearch_t *opensearches[PRVM_MAX_OPENSEARCHES];
#ifdef SUPPORT_GECKO
- clgecko_t *opengeckoinstances[PRVM_MAX_GECKOINSTANCES];
+ struct clgecko_s *opengeckoinstances[PRVM_MAX_GECKOINSTANCES];
#endif
// copies of some vars that were former read from sv
prog->globaloffsets.dmg_origin = PRVM_ED_FindGlobalOffset("dmg_origin");
prog->globaloffsets.sb_showscores = PRVM_ED_FindGlobalOffset("sb_showscores");
prog->globaloffsets.drawfont = PRVM_ED_FindGlobalOffset("drawfont");
+ prog->globaloffsets.input_ascii = PRVM_ED_FindGlobalOffset("input_ascii");
// menu qc only uses some functions, nothing else
prog->funcoffsets.m_draw = PRVM_ED_FindFunctionOffset("m_draw");