mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
two new instructions: move and movep: basicly memmove. qfcc support coming
as soon as I get it working :)
This commit is contained in:
parent
0c0e4b23de
commit
be4b8096d4
3 changed files with 14 additions and 0 deletions
|
@ -255,6 +255,9 @@ typedef enum {
|
||||||
OP_GE_P,
|
OP_GE_P,
|
||||||
OP_LT_P,
|
OP_LT_P,
|
||||||
OP_GT_P,
|
OP_GT_P,
|
||||||
|
|
||||||
|
OP_MOVE,
|
||||||
|
OP_MOVEP,
|
||||||
} pr_opcode_e;
|
} pr_opcode_e;
|
||||||
|
|
||||||
typedef struct opcode_s {
|
typedef struct opcode_s {
|
||||||
|
|
|
@ -889,6 +889,14 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
|
||||||
OPC.integer_var = OPA.integer_var != OPB.integer_var;
|
OPC.integer_var = OPA.integer_var != OPB.integer_var;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OP_MOVE:
|
||||||
|
memmove (&OPC, &OPA, st->b);
|
||||||
|
break;
|
||||||
|
case OP_MOVEP:
|
||||||
|
memmove (pr->pr_globals + OPC.integer_var,
|
||||||
|
pr->pr_globals + OPA.integer_var, OPB.uinteger_var);
|
||||||
|
break;
|
||||||
|
|
||||||
// LordHavoc: to be enabled when Progs version 7 (or whatever it will be numbered) is finalized
|
// LordHavoc: to be enabled when Progs version 7 (or whatever it will be numbered) is finalized
|
||||||
/*
|
/*
|
||||||
case OP_BOUNDCHECK:
|
case OP_BOUNDCHECK:
|
||||||
|
|
|
@ -247,6 +247,9 @@ opcode_t pr_opcodes[] = {
|
||||||
{"==", "eq.p", OP_EQ_P, false, ev_pointer, ev_pointer, ev_integer, PROG_VERSION},
|
{"==", "eq.p", OP_EQ_P, false, ev_pointer, ev_pointer, ev_integer, PROG_VERSION},
|
||||||
{"!=", "ne.p", OP_NE_P, false, ev_pointer, ev_pointer, ev_integer, PROG_VERSION},
|
{"!=", "ne.p", OP_NE_P, false, ev_pointer, ev_pointer, ev_integer, PROG_VERSION},
|
||||||
|
|
||||||
|
{"<MOVE>", "move", OP_MOVE, true, ev_struct, ev_short, ev_struct, PROG_VERSION},
|
||||||
|
{"<MOVE>", "movep", OP_MOVEP, true, ev_pointer, ev_integer, ev_pointer, PROG_VERSION},
|
||||||
|
|
||||||
// end of table
|
// end of table
|
||||||
{0},
|
{0},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue