mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
implement pr_obj_msg_sendv
This commit is contained in:
parent
2590f3db4d
commit
4da662eb47
2 changed files with 18 additions and 5 deletions
|
@ -313,6 +313,10 @@ typedef union pr_type_u {
|
|||
unsigned int uinteger_var;
|
||||
} pr_type_t;
|
||||
|
||||
typedef struct pr_va_list_s {
|
||||
int count;
|
||||
pointer_t list; // pr_type_t
|
||||
} pr_va_list_t;
|
||||
|
||||
#define PROG_ID_VERSION 6
|
||||
#define PROG_VERSION 0x00fff002 // MMmmmRRR 0.fff.002 (hex)
|
||||
|
|
|
@ -289,11 +289,20 @@ pr_obj_msg_lookup_super (progs_t *pr)
|
|||
static void
|
||||
pr_obj_msg_sendv (progs_t *pr)
|
||||
{
|
||||
//pr_id_t *receiver = &P_STRUCT (pr, pr_id_t, 0);
|
||||
//pr_sel_t *op = &P_STRUCT (pr, pr_sel_t, 1);
|
||||
//arglist
|
||||
//XXX
|
||||
PR_RunError (pr, "%s, not implemented", __FUNCTION__);
|
||||
pr_id_t *receiver = &P_STRUCT (pr, pr_id_t, 0);
|
||||
pr_sel_t *op = &P_STRUCT (pr, pr_sel_t, 1);
|
||||
pr_va_list_t args = G_STRUCT (pr, pr_va_list_t, OFS_PARM2);
|
||||
func_t imp = obj_msg_lookup (pr, receiver, op);
|
||||
|
||||
if (!imp)
|
||||
PR_RunError (pr, "%s does not respond to %s",
|
||||
PR_GetString (pr, object_get_class_name (pr, receiver)),
|
||||
PR_GetString (pr, op->sel_id));
|
||||
if (args.count > 6)
|
||||
args.count = 6;
|
||||
memcpy (G_POINTER (pr, OFS_PARM2), G_POINTER (pr, args.list),
|
||||
args.count * 4);
|
||||
call_function (pr, imp);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue