mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
Renamed vector to _vector to avoid name clashes on Altivec systems.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1623 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
d17ca9286b
commit
b3b3a7a83a
8 changed files with 350 additions and 350 deletions
|
@ -59,46 +59,46 @@ reeval:
|
|||
OPC->_float = OPA->_float + OPB->_float;
|
||||
break;
|
||||
case OP_ADD_V:
|
||||
OPC->vector[0] = OPA->vector[0] + OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] + OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] + OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] + OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] + OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] + OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_SUB_F:
|
||||
OPC->_float = OPA->_float - OPB->_float;
|
||||
break;
|
||||
case OP_SUB_V:
|
||||
OPC->vector[0] = OPA->vector[0] - OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] - OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] - OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] - OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] - OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] - OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_MUL_F:
|
||||
OPC->_float = OPA->_float * OPB->_float;
|
||||
break;
|
||||
case OP_MUL_V:
|
||||
OPC->_float = OPA->vector[0]*OPB->vector[0]
|
||||
+ OPA->vector[1]*OPB->vector[1]
|
||||
+ OPA->vector[2]*OPB->vector[2];
|
||||
OPC->_float = OPA->_vector[0]*OPB->_vector[0]
|
||||
+ OPA->_vector[1]*OPB->_vector[1]
|
||||
+ OPA->_vector[2]*OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_FV:
|
||||
OPC->vector[0] = OPA->_float * OPB->vector[0];
|
||||
OPC->vector[1] = OPA->_float * OPB->vector[1];
|
||||
OPC->vector[2] = OPA->_float * OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_float * OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_float * OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_float * OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_VF:
|
||||
OPC->vector[0] = OPB->_float * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_F:
|
||||
OPC->_float = OPA->_float / OPB->_float;
|
||||
break;
|
||||
case OP_DIV_VF:
|
||||
OPC->vector[0] = OPB->_float / OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float / OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float / OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float / OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float / OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float / OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_BITAND:
|
||||
|
@ -173,7 +173,7 @@ reeval:
|
|||
OPC->_float = (float)(!OPA->_float);
|
||||
break;
|
||||
case OP_NOT_V:
|
||||
OPC->_float = (float)(!OPA->vector[0] && !OPA->vector[1] && !OPA->vector[2]);
|
||||
OPC->_float = (float)(!OPA->_vector[0] && !OPA->_vector[1] && !OPA->_vector[2]);
|
||||
break;
|
||||
case OP_NOT_S:
|
||||
OPC->_float = (float)(!(OPA->string) || !*(OPA->string+progfuncs->stringtable));
|
||||
|
@ -197,9 +197,9 @@ reeval:
|
|||
|
||||
|
||||
case OP_EQ_V:
|
||||
OPC->_float = (float)((OPA->vector[0] == OPB->vector[0]) &&
|
||||
(OPA->vector[1] == OPB->vector[1]) &&
|
||||
(OPA->vector[2] == OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] == OPB->_vector[0]) &&
|
||||
(OPA->_vector[1] == OPB->_vector[1]) &&
|
||||
(OPA->_vector[2] == OPB->_vector[2]));
|
||||
break;
|
||||
case OP_EQ_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -233,9 +233,9 @@ reeval:
|
|||
OPC->_float = (float)(OPA->_float != OPB->_float);
|
||||
break;
|
||||
case OP_NE_V:
|
||||
OPC->_float = (float)((OPA->vector[0] != OPB->vector[0]) ||
|
||||
(OPA->vector[1] != OPB->vector[1]) ||
|
||||
(OPA->vector[2] != OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] != OPB->_vector[0]) ||
|
||||
(OPA->_vector[1] != OPB->_vector[1]) ||
|
||||
(OPA->_vector[2] != OPB->_vector[2]));
|
||||
break;
|
||||
case OP_NE_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -282,9 +282,9 @@ reeval:
|
|||
OPB->_int = OPA->_int;
|
||||
break;
|
||||
case OP_STORE_V:
|
||||
OPB->vector[0] = OPA->vector[0];
|
||||
OPB->vector[1] = OPA->vector[1];
|
||||
OPB->vector[2] = OPA->vector[2];
|
||||
OPB->_vector[0] = OPA->_vector[0];
|
||||
OPB->_vector[1] = OPA->_vector[1];
|
||||
OPB->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
//store a value to a pointer
|
||||
|
@ -310,9 +310,9 @@ reeval:
|
|||
break;
|
||||
case OP_STOREP_V:
|
||||
ptr = QCPOINTER(OPB);
|
||||
ptr->vector[0] = OPA->vector[0];
|
||||
ptr->vector[1] = OPA->vector[1];
|
||||
ptr->vector[2] = OPA->vector[2];
|
||||
ptr->_vector[0] = OPA->_vector[0];
|
||||
ptr->_vector[1] = OPA->_vector[1];
|
||||
ptr->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_STOREP_C: //store character in a string
|
||||
|
@ -324,9 +324,9 @@ reeval:
|
|||
OPB->_float *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTORE_V: // v *= f
|
||||
OPB->vector[0] *= OPA->_float;
|
||||
OPB->vector[1] *= OPA->_float;
|
||||
OPB->vector[2] *= OPA->_float;
|
||||
OPB->_vector[0] *= OPA->_float;
|
||||
OPB->_vector[1] *= OPA->_float;
|
||||
OPB->_vector[2] *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTOREP_F: // e.f *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -334,9 +334,9 @@ reeval:
|
|||
break;
|
||||
case OP_MULSTOREP_V: // e.v *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[1] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[2] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[0] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[1] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[2] *= OPA->_float);
|
||||
break;
|
||||
|
||||
case OP_DIVSTORE_F: // f /= f
|
||||
|
@ -351,9 +351,9 @@ reeval:
|
|||
OPB->_float += OPA->_float;
|
||||
break;
|
||||
case OP_ADDSTORE_V: // v += v
|
||||
OPB->vector[0] += OPA->vector[0];
|
||||
OPB->vector[1] += OPA->vector[1];
|
||||
OPB->vector[2] += OPA->vector[2];
|
||||
OPB->_vector[0] += OPA->_vector[0];
|
||||
OPB->_vector[1] += OPA->_vector[1];
|
||||
OPB->_vector[2] += OPA->_vector[2];
|
||||
break;
|
||||
case OP_ADDSTOREP_F: // e.f += f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -361,18 +361,18 @@ reeval:
|
|||
break;
|
||||
case OP_ADDSTOREP_V: // e.v += v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] += OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] += OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] += OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] += OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] += OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] += OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
case OP_SUBSTORE_F: // f -= f
|
||||
OPB->_float -= OPA->_float;
|
||||
break;
|
||||
case OP_SUBSTORE_V: // v -= v
|
||||
OPB->vector[0] -= OPA->vector[0];
|
||||
OPB->vector[1] -= OPA->vector[1];
|
||||
OPB->vector[2] -= OPA->vector[2];
|
||||
OPB->_vector[0] -= OPA->_vector[0];
|
||||
OPB->_vector[1] -= OPA->_vector[1];
|
||||
OPB->_vector[2] -= OPA->_vector[2];
|
||||
break;
|
||||
case OP_SUBSTOREP_F: // e.f -= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -380,9 +380,9 @@ reeval:
|
|||
break;
|
||||
case OP_SUBSTOREP_V: // e.v -= v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] -= OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] -= OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] -= OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] -= OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] -= OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] -= OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
|
||||
|
@ -434,9 +434,9 @@ reeval:
|
|||
NUM_FOR_EDICT(ed); // make sure it's in range
|
||||
#endif
|
||||
ptr = (eval_t *)(((int *)edvars(ed)) + OPB->_int + progfuncs->fieldadjust);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
//==================
|
||||
|
@ -477,13 +477,13 @@ reeval:
|
|||
case OP_CALL4H:
|
||||
case OP_CALL3H:
|
||||
case OP_CALL2H:
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->vector[2];
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->_vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->_vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->_vector[2];
|
||||
case OP_CALL1H:
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->vector[2];
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->_vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->_vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->_vector[2];
|
||||
|
||||
case OP_CALL8:
|
||||
case OP_CALL7:
|
||||
|
@ -691,9 +691,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADA_V:
|
||||
ptr = (eval_t *)(&OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
|
||||
|
@ -720,9 +720,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADP_V:
|
||||
ptr = QCPOINTERM(OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_POWER_I:
|
||||
|
@ -756,9 +756,9 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
t = (eval_t *)&pr_globals[(uofs)st->a
|
||||
+((int)OPB->_float)*3];
|
||||
OPC->vector[0] = t->vector[0];
|
||||
OPC->vector[1] = t->vector[1];
|
||||
OPC->vector[2] = t->vector[2];
|
||||
OPC->_vector[0] = t->_vector[0];
|
||||
OPC->_vector[1] = t->_vector[1];
|
||||
OPC->_vector[2] = t->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_CSTATE:
|
||||
|
@ -813,22 +813,22 @@ if (pr_typecurrent != 0)
|
|||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff);
|
||||
break;
|
||||
case OP_RANDV1:
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[2];
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[2];
|
||||
break;
|
||||
case OP_RANDV2:
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
if(OPA->vector[i] < OPB->vector[i])
|
||||
if(OPA->_vector[i] < OPB->_vector[i])
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->vector[i]-OPA->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->_vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->_vector[i]-OPA->_vector[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->vector[i]-OPB->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->_vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->_vector[i]-OPB->_vector[i]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -877,7 +877,7 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
break;
|
||||
case OP_SWITCH_V:
|
||||
if (swtch->vector[0] == OPA->vector[0] && swtch->vector[1] == OPA->vector[1] && swtch->vector[2] == OPA->vector[2])
|
||||
if (swtch->_vector[0] == OPA->_vector[0] && swtch->_vector[1] == OPA->_vector[1] && swtch->_vector[2] == OPA->_vector[2])
|
||||
{
|
||||
RUNAWAYCHECK();
|
||||
st += (sofs)st->b-1; // -1 to offset the s++
|
||||
|
@ -932,14 +932,14 @@ if (pr_typecurrent != 0)
|
|||
break;
|
||||
|
||||
case OP_MUL_VI:
|
||||
OPC->vector[0] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[1] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[2] = OPA->vector[0] * OPB->_int;
|
||||
OPC->_vector[0] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[1] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[2] = OPA->_vector[0] * OPB->_int;
|
||||
break;
|
||||
case OP_MUL_IV:
|
||||
OPC->vector[0] = OPB->_int * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_int * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_int * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_int * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_int * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_int * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_IF:
|
||||
|
|
|
@ -59,46 +59,46 @@ reeval:
|
|||
OPC->_float = OPA->_float + OPB->_float;
|
||||
break;
|
||||
case OP_ADD_V:
|
||||
OPC->vector[0] = OPA->vector[0] + OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] + OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] + OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] + OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] + OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] + OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_SUB_F:
|
||||
OPC->_float = OPA->_float - OPB->_float;
|
||||
break;
|
||||
case OP_SUB_V:
|
||||
OPC->vector[0] = OPA->vector[0] - OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] - OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] - OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] - OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] - OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] - OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_MUL_F:
|
||||
OPC->_float = OPA->_float * OPB->_float;
|
||||
break;
|
||||
case OP_MUL_V:
|
||||
OPC->_float = OPA->vector[0]*OPB->vector[0]
|
||||
+ OPA->vector[1]*OPB->vector[1]
|
||||
+ OPA->vector[2]*OPB->vector[2];
|
||||
OPC->_float = OPA->_vector[0]*OPB->_vector[0]
|
||||
+ OPA->_vector[1]*OPB->_vector[1]
|
||||
+ OPA->_vector[2]*OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_FV:
|
||||
OPC->vector[0] = OPA->_float * OPB->vector[0];
|
||||
OPC->vector[1] = OPA->_float * OPB->vector[1];
|
||||
OPC->vector[2] = OPA->_float * OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_float * OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_float * OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_float * OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_VF:
|
||||
OPC->vector[0] = OPB->_float * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_F:
|
||||
OPC->_float = OPA->_float / OPB->_float;
|
||||
break;
|
||||
case OP_DIV_VF:
|
||||
OPC->vector[0] = OPB->_float / OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float / OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float / OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float / OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float / OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float / OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_BITAND:
|
||||
|
@ -173,7 +173,7 @@ reeval:
|
|||
OPC->_float = (float)(!OPA->_float);
|
||||
break;
|
||||
case OP_NOT_V:
|
||||
OPC->_float = (float)(!OPA->vector[0] && !OPA->vector[1] && !OPA->vector[2]);
|
||||
OPC->_float = (float)(!OPA->_vector[0] && !OPA->_vector[1] && !OPA->_vector[2]);
|
||||
break;
|
||||
case OP_NOT_S:
|
||||
OPC->_float = (float)(!(OPA->string) || !*(OPA->string+progfuncs->stringtable));
|
||||
|
@ -197,9 +197,9 @@ reeval:
|
|||
|
||||
|
||||
case OP_EQ_V:
|
||||
OPC->_float = (float)((OPA->vector[0] == OPB->vector[0]) &&
|
||||
(OPA->vector[1] == OPB->vector[1]) &&
|
||||
(OPA->vector[2] == OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] == OPB->_vector[0]) &&
|
||||
(OPA->_vector[1] == OPB->_vector[1]) &&
|
||||
(OPA->_vector[2] == OPB->_vector[2]));
|
||||
break;
|
||||
case OP_EQ_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -233,9 +233,9 @@ reeval:
|
|||
OPC->_float = (float)(OPA->_float != OPB->_float);
|
||||
break;
|
||||
case OP_NE_V:
|
||||
OPC->_float = (float)((OPA->vector[0] != OPB->vector[0]) ||
|
||||
(OPA->vector[1] != OPB->vector[1]) ||
|
||||
(OPA->vector[2] != OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] != OPB->_vector[0]) ||
|
||||
(OPA->_vector[1] != OPB->_vector[1]) ||
|
||||
(OPA->_vector[2] != OPB->_vector[2]));
|
||||
break;
|
||||
case OP_NE_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -282,9 +282,9 @@ reeval:
|
|||
OPB->_int = OPA->_int;
|
||||
break;
|
||||
case OP_STORE_V:
|
||||
OPB->vector[0] = OPA->vector[0];
|
||||
OPB->vector[1] = OPA->vector[1];
|
||||
OPB->vector[2] = OPA->vector[2];
|
||||
OPB->_vector[0] = OPA->_vector[0];
|
||||
OPB->_vector[1] = OPA->_vector[1];
|
||||
OPB->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
//store a value to a pointer
|
||||
|
@ -310,9 +310,9 @@ reeval:
|
|||
break;
|
||||
case OP_STOREP_V:
|
||||
ptr = QCPOINTER(OPB);
|
||||
ptr->vector[0] = OPA->vector[0];
|
||||
ptr->vector[1] = OPA->vector[1];
|
||||
ptr->vector[2] = OPA->vector[2];
|
||||
ptr->_vector[0] = OPA->_vector[0];
|
||||
ptr->_vector[1] = OPA->_vector[1];
|
||||
ptr->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_STOREP_C: //store character in a string
|
||||
|
@ -324,9 +324,9 @@ reeval:
|
|||
OPB->_float *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTORE_V: // v *= f
|
||||
OPB->vector[0] *= OPA->_float;
|
||||
OPB->vector[1] *= OPA->_float;
|
||||
OPB->vector[2] *= OPA->_float;
|
||||
OPB->_vector[0] *= OPA->_float;
|
||||
OPB->_vector[1] *= OPA->_float;
|
||||
OPB->_vector[2] *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTOREP_F: // e.f *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -334,9 +334,9 @@ reeval:
|
|||
break;
|
||||
case OP_MULSTOREP_V: // e.v *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[1] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[2] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[0] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[1] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[2] *= OPA->_float);
|
||||
break;
|
||||
|
||||
case OP_DIVSTORE_F: // f /= f
|
||||
|
@ -351,9 +351,9 @@ reeval:
|
|||
OPB->_float += OPA->_float;
|
||||
break;
|
||||
case OP_ADDSTORE_V: // v += v
|
||||
OPB->vector[0] += OPA->vector[0];
|
||||
OPB->vector[1] += OPA->vector[1];
|
||||
OPB->vector[2] += OPA->vector[2];
|
||||
OPB->_vector[0] += OPA->_vector[0];
|
||||
OPB->_vector[1] += OPA->_vector[1];
|
||||
OPB->_vector[2] += OPA->_vector[2];
|
||||
break;
|
||||
case OP_ADDSTOREP_F: // e.f += f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -361,18 +361,18 @@ reeval:
|
|||
break;
|
||||
case OP_ADDSTOREP_V: // e.v += v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] += OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] += OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] += OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] += OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] += OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] += OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
case OP_SUBSTORE_F: // f -= f
|
||||
OPB->_float -= OPA->_float;
|
||||
break;
|
||||
case OP_SUBSTORE_V: // v -= v
|
||||
OPB->vector[0] -= OPA->vector[0];
|
||||
OPB->vector[1] -= OPA->vector[1];
|
||||
OPB->vector[2] -= OPA->vector[2];
|
||||
OPB->_vector[0] -= OPA->_vector[0];
|
||||
OPB->_vector[1] -= OPA->_vector[1];
|
||||
OPB->_vector[2] -= OPA->_vector[2];
|
||||
break;
|
||||
case OP_SUBSTOREP_F: // e.f -= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -380,9 +380,9 @@ reeval:
|
|||
break;
|
||||
case OP_SUBSTOREP_V: // e.v -= v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] -= OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] -= OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] -= OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] -= OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] -= OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] -= OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
|
||||
|
@ -427,9 +427,9 @@ reeval:
|
|||
NUM_FOR_EDICT(ed); // make sure it's in range
|
||||
#endif
|
||||
ptr = (eval_t *)(((int *)edvars(ed)) + OPB->_int + progfuncs->fieldadjust);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
//==================
|
||||
|
@ -470,13 +470,13 @@ reeval:
|
|||
case OP_CALL4H:
|
||||
case OP_CALL3H:
|
||||
case OP_CALL2H:
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->vector[2];
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->_vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->_vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->_vector[2];
|
||||
case OP_CALL1H:
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->vector[2];
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->_vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->_vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->_vector[2];
|
||||
|
||||
case OP_CALL8:
|
||||
case OP_CALL7:
|
||||
|
@ -684,9 +684,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADA_V:
|
||||
ptr = (eval_t *)(&OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
|
||||
|
@ -713,9 +713,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADP_V:
|
||||
ptr = QCPOINTERM(OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_POWER_I:
|
||||
|
@ -749,9 +749,9 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
t = (eval_t *)&pr_globals[(uofs)st->a
|
||||
+((int)OPB->_float)*3];
|
||||
OPC->vector[0] = t->vector[0];
|
||||
OPC->vector[1] = t->vector[1];
|
||||
OPC->vector[2] = t->vector[2];
|
||||
OPC->_vector[0] = t->_vector[0];
|
||||
OPC->_vector[1] = t->_vector[1];
|
||||
OPC->_vector[2] = t->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_CSTATE:
|
||||
|
@ -806,22 +806,22 @@ if (pr_typecurrent != 0)
|
|||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff);
|
||||
break;
|
||||
case OP_RANDV1:
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[2];
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[2];
|
||||
break;
|
||||
case OP_RANDV2:
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
if(OPA->vector[i] < OPB->vector[i])
|
||||
if(OPA->_vector[i] < OPB->_vector[i])
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->vector[i]-OPA->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->_vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->_vector[i]-OPA->_vector[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->vector[i]-OPB->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->_vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->_vector[i]-OPB->_vector[i]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -870,7 +870,7 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
break;
|
||||
case OP_SWITCH_V:
|
||||
if (swtch->vector[0] == OPA->vector[0] && swtch->vector[1] == OPA->vector[1] && swtch->vector[2] == OPA->vector[2])
|
||||
if (swtch->_vector[0] == OPA->_vector[0] && swtch->_vector[1] == OPA->_vector[1] && swtch->_vector[2] == OPA->_vector[2])
|
||||
{
|
||||
RUNAWAYCHECK();
|
||||
st += (sofs)st->b-1; // -1 to offset the s++
|
||||
|
@ -925,14 +925,14 @@ if (pr_typecurrent != 0)
|
|||
break;
|
||||
|
||||
case OP_MUL_VI:
|
||||
OPC->vector[0] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[1] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[2] = OPA->vector[0] * OPB->_int;
|
||||
OPC->_vector[0] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[1] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[2] = OPA->_vector[0] * OPB->_int;
|
||||
break;
|
||||
case OP_MUL_IV:
|
||||
OPC->vector[0] = OPB->_int * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_int * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_int * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_int * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_int * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_int * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_IF:
|
||||
|
|
|
@ -59,46 +59,46 @@ reeval:
|
|||
OPC->_float = OPA->_float + OPB->_float;
|
||||
break;
|
||||
case OP_ADD_V:
|
||||
OPC->vector[0] = OPA->vector[0] + OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] + OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] + OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] + OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] + OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] + OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_SUB_F:
|
||||
OPC->_float = OPA->_float - OPB->_float;
|
||||
break;
|
||||
case OP_SUB_V:
|
||||
OPC->vector[0] = OPA->vector[0] - OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] - OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] - OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] - OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] - OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] - OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_MUL_F:
|
||||
OPC->_float = OPA->_float * OPB->_float;
|
||||
break;
|
||||
case OP_MUL_V:
|
||||
OPC->_float = OPA->vector[0]*OPB->vector[0]
|
||||
+ OPA->vector[1]*OPB->vector[1]
|
||||
+ OPA->vector[2]*OPB->vector[2];
|
||||
OPC->_float = OPA->_vector[0]*OPB->_vector[0]
|
||||
+ OPA->_vector[1]*OPB->_vector[1]
|
||||
+ OPA->_vector[2]*OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_FV:
|
||||
OPC->vector[0] = OPA->_float * OPB->vector[0];
|
||||
OPC->vector[1] = OPA->_float * OPB->vector[1];
|
||||
OPC->vector[2] = OPA->_float * OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_float * OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_float * OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_float * OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_VF:
|
||||
OPC->vector[0] = OPB->_float * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_F:
|
||||
OPC->_float = OPA->_float / OPB->_float;
|
||||
break;
|
||||
case OP_DIV_VF:
|
||||
OPC->vector[0] = OPB->_float / OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float / OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float / OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float / OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float / OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float / OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_BITAND:
|
||||
|
@ -173,7 +173,7 @@ reeval:
|
|||
OPC->_float = (float)(!OPA->_float);
|
||||
break;
|
||||
case OP_NOT_V:
|
||||
OPC->_float = (float)(!OPA->vector[0] && !OPA->vector[1] && !OPA->vector[2]);
|
||||
OPC->_float = (float)(!OPA->_vector[0] && !OPA->_vector[1] && !OPA->_vector[2]);
|
||||
break;
|
||||
case OP_NOT_S:
|
||||
OPC->_float = (float)(!(OPA->string) || !*(OPA->string+progfuncs->stringtable));
|
||||
|
@ -197,9 +197,9 @@ reeval:
|
|||
|
||||
|
||||
case OP_EQ_V:
|
||||
OPC->_float = (float)((OPA->vector[0] == OPB->vector[0]) &&
|
||||
(OPA->vector[1] == OPB->vector[1]) &&
|
||||
(OPA->vector[2] == OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] == OPB->_vector[0]) &&
|
||||
(OPA->_vector[1] == OPB->_vector[1]) &&
|
||||
(OPA->_vector[2] == OPB->_vector[2]));
|
||||
break;
|
||||
case OP_EQ_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -233,9 +233,9 @@ reeval:
|
|||
OPC->_float = (float)(OPA->_float != OPB->_float);
|
||||
break;
|
||||
case OP_NE_V:
|
||||
OPC->_float = (float)((OPA->vector[0] != OPB->vector[0]) ||
|
||||
(OPA->vector[1] != OPB->vector[1]) ||
|
||||
(OPA->vector[2] != OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] != OPB->_vector[0]) ||
|
||||
(OPA->_vector[1] != OPB->_vector[1]) ||
|
||||
(OPA->_vector[2] != OPB->_vector[2]));
|
||||
break;
|
||||
case OP_NE_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -282,9 +282,9 @@ reeval:
|
|||
OPB->_int = OPA->_int;
|
||||
break;
|
||||
case OP_STORE_V:
|
||||
OPB->vector[0] = OPA->vector[0];
|
||||
OPB->vector[1] = OPA->vector[1];
|
||||
OPB->vector[2] = OPA->vector[2];
|
||||
OPB->_vector[0] = OPA->_vector[0];
|
||||
OPB->_vector[1] = OPA->_vector[1];
|
||||
OPB->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
//store a value to a pointer
|
||||
|
@ -310,9 +310,9 @@ reeval:
|
|||
break;
|
||||
case OP_STOREP_V:
|
||||
ptr = QCPOINTER(OPB);
|
||||
ptr->vector[0] = OPA->vector[0];
|
||||
ptr->vector[1] = OPA->vector[1];
|
||||
ptr->vector[2] = OPA->vector[2];
|
||||
ptr->_vector[0] = OPA->_vector[0];
|
||||
ptr->_vector[1] = OPA->_vector[1];
|
||||
ptr->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_STOREP_C: //store character in a string
|
||||
|
@ -324,9 +324,9 @@ reeval:
|
|||
OPB->_float *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTORE_V: // v *= f
|
||||
OPB->vector[0] *= OPA->_float;
|
||||
OPB->vector[1] *= OPA->_float;
|
||||
OPB->vector[2] *= OPA->_float;
|
||||
OPB->_vector[0] *= OPA->_float;
|
||||
OPB->_vector[1] *= OPA->_float;
|
||||
OPB->_vector[2] *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTOREP_F: // e.f *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -334,9 +334,9 @@ reeval:
|
|||
break;
|
||||
case OP_MULSTOREP_V: // e.v *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[1] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[2] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[0] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[1] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[2] *= OPA->_float);
|
||||
break;
|
||||
|
||||
case OP_DIVSTORE_F: // f /= f
|
||||
|
@ -351,9 +351,9 @@ reeval:
|
|||
OPB->_float += OPA->_float;
|
||||
break;
|
||||
case OP_ADDSTORE_V: // v += v
|
||||
OPB->vector[0] += OPA->vector[0];
|
||||
OPB->vector[1] += OPA->vector[1];
|
||||
OPB->vector[2] += OPA->vector[2];
|
||||
OPB->_vector[0] += OPA->_vector[0];
|
||||
OPB->_vector[1] += OPA->_vector[1];
|
||||
OPB->_vector[2] += OPA->_vector[2];
|
||||
break;
|
||||
case OP_ADDSTOREP_F: // e.f += f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -361,18 +361,18 @@ reeval:
|
|||
break;
|
||||
case OP_ADDSTOREP_V: // e.v += v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] += OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] += OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] += OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] += OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] += OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] += OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
case OP_SUBSTORE_F: // f -= f
|
||||
OPB->_float -= OPA->_float;
|
||||
break;
|
||||
case OP_SUBSTORE_V: // v -= v
|
||||
OPB->vector[0] -= OPA->vector[0];
|
||||
OPB->vector[1] -= OPA->vector[1];
|
||||
OPB->vector[2] -= OPA->vector[2];
|
||||
OPB->_vector[0] -= OPA->_vector[0];
|
||||
OPB->_vector[1] -= OPA->_vector[1];
|
||||
OPB->_vector[2] -= OPA->_vector[2];
|
||||
break;
|
||||
case OP_SUBSTOREP_F: // e.f -= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -380,9 +380,9 @@ reeval:
|
|||
break;
|
||||
case OP_SUBSTOREP_V: // e.v -= v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] -= OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] -= OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] -= OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] -= OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] -= OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] -= OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
|
||||
|
@ -427,9 +427,9 @@ reeval:
|
|||
NUM_FOR_EDICT(ed); // make sure it's in range
|
||||
#endif
|
||||
ptr = (eval_t *)(((int *)edvars(ed)) + OPB->_int + progfuncs->fieldadjust);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
//==================
|
||||
|
@ -470,13 +470,13 @@ reeval:
|
|||
case OP_CALL4H:
|
||||
case OP_CALL3H:
|
||||
case OP_CALL2H:
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->vector[2];
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->_vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->_vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->_vector[2];
|
||||
case OP_CALL1H:
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->vector[2];
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->_vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->_vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->_vector[2];
|
||||
|
||||
case OP_CALL8:
|
||||
case OP_CALL7:
|
||||
|
@ -684,9 +684,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADA_V:
|
||||
ptr = (eval_t *)(&OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
|
||||
|
@ -713,9 +713,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADP_V:
|
||||
ptr = QCPOINTERM(OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_POWER_I:
|
||||
|
@ -749,9 +749,9 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
t = (eval_t *)&pr_globals[(uofs)st->a
|
||||
+((int)OPB->_float)*3];
|
||||
OPC->vector[0] = t->vector[0];
|
||||
OPC->vector[1] = t->vector[1];
|
||||
OPC->vector[2] = t->vector[2];
|
||||
OPC->_vector[0] = t->_vector[0];
|
||||
OPC->_vector[1] = t->_vector[1];
|
||||
OPC->_vector[2] = t->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_CSTATE:
|
||||
|
@ -806,22 +806,22 @@ if (pr_typecurrent != 0)
|
|||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff);
|
||||
break;
|
||||
case OP_RANDV1:
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[2];
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[2];
|
||||
break;
|
||||
case OP_RANDV2:
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
if(OPA->vector[i] < OPB->vector[i])
|
||||
if(OPA->_vector[i] < OPB->_vector[i])
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->vector[i]-OPA->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->_vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->_vector[i]-OPA->_vector[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->vector[i]-OPB->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->_vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->_vector[i]-OPB->_vector[i]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -870,7 +870,7 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
break;
|
||||
case OP_SWITCH_V:
|
||||
if (swtch->vector[0] == OPA->vector[0] && swtch->vector[1] == OPA->vector[1] && swtch->vector[2] == OPA->vector[2])
|
||||
if (swtch->_vector[0] == OPA->_vector[0] && swtch->_vector[1] == OPA->_vector[1] && swtch->_vector[2] == OPA->_vector[2])
|
||||
{
|
||||
RUNAWAYCHECK();
|
||||
st += (sofs)st->b-1; // -1 to offset the s++
|
||||
|
@ -925,14 +925,14 @@ if (pr_typecurrent != 0)
|
|||
break;
|
||||
|
||||
case OP_MUL_VI:
|
||||
OPC->vector[0] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[1] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[2] = OPA->vector[0] * OPB->_int;
|
||||
OPC->_vector[0] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[1] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[2] = OPA->_vector[0] * OPB->_int;
|
||||
break;
|
||||
case OP_MUL_IV:
|
||||
OPC->vector[0] = OPB->_int * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_int * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_int * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_int * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_int * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_int * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_IF:
|
||||
|
|
|
@ -59,46 +59,46 @@ reeval:
|
|||
OPC->_float = OPA->_float + OPB->_float;
|
||||
break;
|
||||
case OP_ADD_V:
|
||||
OPC->vector[0] = OPA->vector[0] + OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] + OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] + OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] + OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] + OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] + OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_SUB_F:
|
||||
OPC->_float = OPA->_float - OPB->_float;
|
||||
break;
|
||||
case OP_SUB_V:
|
||||
OPC->vector[0] = OPA->vector[0] - OPB->vector[0];
|
||||
OPC->vector[1] = OPA->vector[1] - OPB->vector[1];
|
||||
OPC->vector[2] = OPA->vector[2] - OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_vector[0] - OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_vector[1] - OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_vector[2] - OPB->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_MUL_F:
|
||||
OPC->_float = OPA->_float * OPB->_float;
|
||||
break;
|
||||
case OP_MUL_V:
|
||||
OPC->_float = OPA->vector[0]*OPB->vector[0]
|
||||
+ OPA->vector[1]*OPB->vector[1]
|
||||
+ OPA->vector[2]*OPB->vector[2];
|
||||
OPC->_float = OPA->_vector[0]*OPB->_vector[0]
|
||||
+ OPA->_vector[1]*OPB->_vector[1]
|
||||
+ OPA->_vector[2]*OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_FV:
|
||||
OPC->vector[0] = OPA->_float * OPB->vector[0];
|
||||
OPC->vector[1] = OPA->_float * OPB->vector[1];
|
||||
OPC->vector[2] = OPA->_float * OPB->vector[2];
|
||||
OPC->_vector[0] = OPA->_float * OPB->_vector[0];
|
||||
OPC->_vector[1] = OPA->_float * OPB->_vector[1];
|
||||
OPC->_vector[2] = OPA->_float * OPB->_vector[2];
|
||||
break;
|
||||
case OP_MUL_VF:
|
||||
OPC->vector[0] = OPB->_float * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_F:
|
||||
OPC->_float = OPA->_float / OPB->_float;
|
||||
break;
|
||||
case OP_DIV_VF:
|
||||
OPC->vector[0] = OPB->_float / OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_float / OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_float / OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_float / OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_float / OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_float / OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_BITAND:
|
||||
|
@ -173,7 +173,7 @@ reeval:
|
|||
OPC->_float = (float)(!OPA->_float);
|
||||
break;
|
||||
case OP_NOT_V:
|
||||
OPC->_float = (float)(!OPA->vector[0] && !OPA->vector[1] && !OPA->vector[2]);
|
||||
OPC->_float = (float)(!OPA->_vector[0] && !OPA->_vector[1] && !OPA->_vector[2]);
|
||||
break;
|
||||
case OP_NOT_S:
|
||||
OPC->_float = (float)(!(OPA->string) || !*(OPA->string+progfuncs->stringtable));
|
||||
|
@ -197,9 +197,9 @@ reeval:
|
|||
|
||||
|
||||
case OP_EQ_V:
|
||||
OPC->_float = (float)((OPA->vector[0] == OPB->vector[0]) &&
|
||||
(OPA->vector[1] == OPB->vector[1]) &&
|
||||
(OPA->vector[2] == OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] == OPB->_vector[0]) &&
|
||||
(OPA->_vector[1] == OPB->_vector[1]) &&
|
||||
(OPA->_vector[2] == OPB->_vector[2]));
|
||||
break;
|
||||
case OP_EQ_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -233,9 +233,9 @@ reeval:
|
|||
OPC->_float = (float)(OPA->_float != OPB->_float);
|
||||
break;
|
||||
case OP_NE_V:
|
||||
OPC->_float = (float)((OPA->vector[0] != OPB->vector[0]) ||
|
||||
(OPA->vector[1] != OPB->vector[1]) ||
|
||||
(OPA->vector[2] != OPB->vector[2]));
|
||||
OPC->_float = (float)((OPA->_vector[0] != OPB->_vector[0]) ||
|
||||
(OPA->_vector[1] != OPB->_vector[1]) ||
|
||||
(OPA->_vector[2] != OPB->_vector[2]));
|
||||
break;
|
||||
case OP_NE_S:
|
||||
if (OPA->string==OPB->string)
|
||||
|
@ -282,9 +282,9 @@ reeval:
|
|||
OPB->_int = OPA->_int;
|
||||
break;
|
||||
case OP_STORE_V:
|
||||
OPB->vector[0] = OPA->vector[0];
|
||||
OPB->vector[1] = OPA->vector[1];
|
||||
OPB->vector[2] = OPA->vector[2];
|
||||
OPB->_vector[0] = OPA->_vector[0];
|
||||
OPB->_vector[1] = OPA->_vector[1];
|
||||
OPB->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
//store a value to a pointer
|
||||
|
@ -310,9 +310,9 @@ reeval:
|
|||
break;
|
||||
case OP_STOREP_V:
|
||||
ptr = QCPOINTER(OPB);
|
||||
ptr->vector[0] = OPA->vector[0];
|
||||
ptr->vector[1] = OPA->vector[1];
|
||||
ptr->vector[2] = OPA->vector[2];
|
||||
ptr->_vector[0] = OPA->_vector[0];
|
||||
ptr->_vector[1] = OPA->_vector[1];
|
||||
ptr->_vector[2] = OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_STOREP_C: //store character in a string
|
||||
|
@ -324,9 +324,9 @@ reeval:
|
|||
OPB->_float *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTORE_V: // v *= f
|
||||
OPB->vector[0] *= OPA->_float;
|
||||
OPB->vector[1] *= OPA->_float;
|
||||
OPB->vector[2] *= OPA->_float;
|
||||
OPB->_vector[0] *= OPA->_float;
|
||||
OPB->_vector[1] *= OPA->_float;
|
||||
OPB->_vector[2] *= OPA->_float;
|
||||
break;
|
||||
case OP_MULSTOREP_F: // e.f *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -334,9 +334,9 @@ reeval:
|
|||
break;
|
||||
case OP_MULSTOREP_V: // e.v *= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[1] *= OPA->_float);
|
||||
OPC->vector[0] = (ptr->vector[2] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[0] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[1] *= OPA->_float);
|
||||
OPC->_vector[0] = (ptr->_vector[2] *= OPA->_float);
|
||||
break;
|
||||
|
||||
case OP_DIVSTORE_F: // f /= f
|
||||
|
@ -351,9 +351,9 @@ reeval:
|
|||
OPB->_float += OPA->_float;
|
||||
break;
|
||||
case OP_ADDSTORE_V: // v += v
|
||||
OPB->vector[0] += OPA->vector[0];
|
||||
OPB->vector[1] += OPA->vector[1];
|
||||
OPB->vector[2] += OPA->vector[2];
|
||||
OPB->_vector[0] += OPA->_vector[0];
|
||||
OPB->_vector[1] += OPA->_vector[1];
|
||||
OPB->_vector[2] += OPA->_vector[2];
|
||||
break;
|
||||
case OP_ADDSTOREP_F: // e.f += f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -361,18 +361,18 @@ reeval:
|
|||
break;
|
||||
case OP_ADDSTOREP_V: // e.v += v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] += OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] += OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] += OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] += OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] += OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] += OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
case OP_SUBSTORE_F: // f -= f
|
||||
OPB->_float -= OPA->_float;
|
||||
break;
|
||||
case OP_SUBSTORE_V: // v -= v
|
||||
OPB->vector[0] -= OPA->vector[0];
|
||||
OPB->vector[1] -= OPA->vector[1];
|
||||
OPB->vector[2] -= OPA->vector[2];
|
||||
OPB->_vector[0] -= OPA->_vector[0];
|
||||
OPB->_vector[1] -= OPA->_vector[1];
|
||||
OPB->_vector[2] -= OPA->_vector[2];
|
||||
break;
|
||||
case OP_SUBSTOREP_F: // e.f -= f
|
||||
ptr = QCPOINTER(OPB);
|
||||
|
@ -380,9 +380,9 @@ reeval:
|
|||
break;
|
||||
case OP_SUBSTOREP_V: // e.v -= v
|
||||
ptr = QCPOINTER(OPB);
|
||||
OPC->vector[0] = (ptr->vector[0] -= OPA->vector[0]);
|
||||
OPC->vector[1] = (ptr->vector[1] -= OPA->vector[1]);
|
||||
OPC->vector[2] = (ptr->vector[2] -= OPA->vector[2]);
|
||||
OPC->_vector[0] = (ptr->_vector[0] -= OPA->_vector[0]);
|
||||
OPC->_vector[1] = (ptr->_vector[1] -= OPA->_vector[1]);
|
||||
OPC->_vector[2] = (ptr->_vector[2] -= OPA->_vector[2]);
|
||||
break;
|
||||
|
||||
|
||||
|
@ -427,9 +427,9 @@ reeval:
|
|||
NUM_FOR_EDICT(ed); // make sure it's in range
|
||||
#endif
|
||||
ptr = (eval_t *)(((int *)edvars(ed)) + OPB->_int + progfuncs->fieldadjust);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
//==================
|
||||
|
@ -470,13 +470,13 @@ reeval:
|
|||
case OP_CALL4H:
|
||||
case OP_CALL3H:
|
||||
case OP_CALL2H:
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->vector[2];
|
||||
G_VECTOR(OFS_PARM1)[0] = OPC->_vector[0];
|
||||
G_VECTOR(OFS_PARM1)[1] = OPC->_vector[1];
|
||||
G_VECTOR(OFS_PARM1)[2] = OPC->_vector[2];
|
||||
case OP_CALL1H:
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->vector[2];
|
||||
G_VECTOR(OFS_PARM0)[0] = OPB->_vector[0];
|
||||
G_VECTOR(OFS_PARM0)[1] = OPB->_vector[1];
|
||||
G_VECTOR(OFS_PARM0)[2] = OPB->_vector[2];
|
||||
|
||||
case OP_CALL8:
|
||||
case OP_CALL7:
|
||||
|
@ -684,9 +684,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADA_V:
|
||||
ptr = (eval_t *)(&OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
|
||||
|
@ -713,9 +713,9 @@ if (pr_typecurrent != 0)
|
|||
|
||||
case OP_LOADP_V:
|
||||
ptr = QCPOINTERM(OPA->_int + OPB->_int);
|
||||
OPC->vector[0] = ptr->vector[0];
|
||||
OPC->vector[1] = ptr->vector[1];
|
||||
OPC->vector[2] = ptr->vector[2];
|
||||
OPC->_vector[0] = ptr->_vector[0];
|
||||
OPC->_vector[1] = ptr->_vector[1];
|
||||
OPC->_vector[2] = ptr->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_POWER_I:
|
||||
|
@ -749,9 +749,9 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
t = (eval_t *)&pr_globals[(uofs)st->a
|
||||
+((int)OPB->_float)*3];
|
||||
OPC->vector[0] = t->vector[0];
|
||||
OPC->vector[1] = t->vector[1];
|
||||
OPC->vector[2] = t->vector[2];
|
||||
OPC->_vector[0] = t->_vector[0];
|
||||
OPC->_vector[1] = t->_vector[1];
|
||||
OPC->_vector[2] = t->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_CSTATE:
|
||||
|
@ -806,22 +806,22 @@ if (pr_typecurrent != 0)
|
|||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff);
|
||||
break;
|
||||
case OP_RANDV1:
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->vector[2];
|
||||
G_FLOAT(OFS_RETURN+0) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[0];
|
||||
G_FLOAT(OFS_RETURN+1) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[1];
|
||||
G_FLOAT(OFS_RETURN+2) = (rand()&0x7fff)/((float)0x7fff)*OPA->_vector[2];
|
||||
break;
|
||||
case OP_RANDV2:
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
if(OPA->vector[i] < OPB->vector[i])
|
||||
if(OPA->_vector[i] < OPB->_vector[i])
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->vector[i]-OPA->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPA->_vector[i]+((rand()&0x7fff)/((float)0x7fff)
|
||||
*(OPB->_vector[i]-OPA->_vector[i]));
|
||||
}
|
||||
else
|
||||
{
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->vector[i]-OPB->vector[i]));
|
||||
G_FLOAT(OFS_RETURN+i) = OPB->_vector[i]+(rand()*(1.0f/RAND_MAX)
|
||||
*(OPA->_vector[i]-OPB->_vector[i]));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -870,7 +870,7 @@ if (pr_typecurrent != 0)
|
|||
}
|
||||
break;
|
||||
case OP_SWITCH_V:
|
||||
if (swtch->vector[0] == OPA->vector[0] && swtch->vector[1] == OPA->vector[1] && swtch->vector[2] == OPA->vector[2])
|
||||
if (swtch->_vector[0] == OPA->_vector[0] && swtch->_vector[1] == OPA->_vector[1] && swtch->_vector[2] == OPA->_vector[2])
|
||||
{
|
||||
RUNAWAYCHECK();
|
||||
st += (sofs)st->b-1; // -1 to offset the s++
|
||||
|
@ -925,14 +925,14 @@ if (pr_typecurrent != 0)
|
|||
break;
|
||||
|
||||
case OP_MUL_VI:
|
||||
OPC->vector[0] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[1] = OPA->vector[0] * OPB->_int;
|
||||
OPC->vector[2] = OPA->vector[0] * OPB->_int;
|
||||
OPC->_vector[0] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[1] = OPA->_vector[0] * OPB->_int;
|
||||
OPC->_vector[2] = OPA->_vector[0] * OPB->_int;
|
||||
break;
|
||||
case OP_MUL_IV:
|
||||
OPC->vector[0] = OPB->_int * OPA->vector[0];
|
||||
OPC->vector[1] = OPB->_int * OPA->vector[1];
|
||||
OPC->vector[2] = OPB->_int * OPA->vector[2];
|
||||
OPC->_vector[0] = OPB->_int * OPA->_vector[0];
|
||||
OPC->_vector[1] = OPB->_int * OPA->_vector[1];
|
||||
OPC->_vector[2] = OPB->_int * OPA->_vector[2];
|
||||
break;
|
||||
|
||||
case OP_DIV_IF:
|
||||
|
|
|
@ -535,7 +535,7 @@ char *PR_ValueString (progfuncs_t *progfuncs, etype_t type, eval_t *val)
|
|||
sprintf (line, "%i", val->_int);
|
||||
break;
|
||||
case ev_vector:
|
||||
sprintf (line, "'%5.1f %5.1f %5.1f'", val->vector[0], val->vector[1], val->vector[2]);
|
||||
sprintf (line, "'%5.1f %5.1f %5.1f'", val->_vector[0], val->_vector[1], val->_vector[2]);
|
||||
break;
|
||||
case ev_pointer:
|
||||
sprintf (line, "pointer");
|
||||
|
@ -638,10 +638,10 @@ char *PR_UglyValueString (progfuncs_t *progfuncs, etype_t type, eval_t *val)
|
|||
sprintf (line, "%i", val->_int);
|
||||
break;
|
||||
case ev_vector:
|
||||
if (val->vector[0] == (int)val->vector[0] && val->vector[1] == (int)val->vector[1] && val->vector[2] == (int)val->vector[2])
|
||||
sprintf (line, "%i %i %i", (int)val->vector[0], (int)val->vector[1], (int)val->vector[2]);
|
||||
if (val->_vector[0] == (int)val->_vector[0] && val->_vector[1] == (int)val->_vector[1] && val->_vector[2] == (int)val->_vector[2])
|
||||
sprintf (line, "%i %i %i", (int)val->_vector[0], (int)val->_vector[1], (int)val->_vector[2]);
|
||||
else
|
||||
sprintf (line, "%f %f %f", val->vector[0], val->vector[1], val->vector[2]);
|
||||
sprintf (line, "%f %f %f", val->_vector[0], val->_vector[1], val->_vector[2]);
|
||||
break;
|
||||
default:
|
||||
sprintf (line, "bad type %i", type);
|
||||
|
@ -700,10 +700,10 @@ char *PR_UglyOldValueString (progfuncs_t *progfuncs, etype_t type, eval_t *val)
|
|||
sprintf (line, "%i", val->_int);
|
||||
break;
|
||||
case ev_vector:
|
||||
if (val->vector[0] == (int)val->vector[0] && val->vector[1] == (int)val->vector[1] && val->vector[2] == (int)val->vector[2])
|
||||
sprintf (line, "%i %i %i", (int)val->vector[0], (int)val->vector[1], (int)val->vector[2]);
|
||||
if (val->_vector[0] == (int)val->_vector[0] && val->_vector[1] == (int)val->_vector[1] && val->_vector[2] == (int)val->_vector[2])
|
||||
sprintf (line, "%i %i %i", (int)val->_vector[0], (int)val->_vector[1], (int)val->_vector[2]);
|
||||
else
|
||||
sprintf (line, "%f %f %f", val->vector[0], val->vector[1], val->vector[2]);
|
||||
sprintf (line, "%f %f %f", val->_vector[0], val->_vector[1], val->_vector[2]);
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -186,7 +186,7 @@ typedef union eval_s
|
|||
{
|
||||
string_t string;
|
||||
float _float;
|
||||
float vector[3];
|
||||
float _vector[3];
|
||||
func_t function;
|
||||
int _int;
|
||||
int edict;
|
||||
|
|
|
@ -581,8 +581,8 @@ void WriteAsmStatements(progfuncs_t *progfuncs, progstate_t *progs, int num, int
|
|||
writes(f, "\tlocal %s %s;\r\n", "entity", progfuncs->stringtable+def->s_name);
|
||||
break;
|
||||
case ev_vector:
|
||||
if (v->vector[0] || v->vector[1] || v->vector[2])
|
||||
writes(f, "\tlocal vector %s = '%f %f %f';\r\n", progfuncs->stringtable+def->s_name, v->vector[0], v->vector[1], v->vector[2]);
|
||||
if (v->_vector[0] || v->_vector[1] || v->_vector[2])
|
||||
writes(f, "\tlocal vector %s = '%f %f %f';\r\n", progfuncs->stringtable+def->s_name, v->_vector[0], v->_vector[1], v->_vector[2]);
|
||||
else
|
||||
writes(f, "\tlocal %s %s;\r\n", "vector", progfuncs->stringtable+def->s_name);
|
||||
ofs+=2; //skip floats;
|
||||
|
@ -697,8 +697,8 @@ void WriteAsmStatements(progfuncs_t *progfuncs, progstate_t *progs, int num, int
|
|||
writes(f, "\tlocal %s %s;\r\n", "entity", progfuncs->stringtable+def->s_name);
|
||||
break;
|
||||
case ev_vector:
|
||||
if (v->vector[0] || v->vector[1] || v->vector[2])
|
||||
writes(f, "\tlocal vector %s = '%f %f %f';\r\n", def->s_name, v->vector[0], v->vector[1], v->vector[2]);
|
||||
if (v->_vector[0] || v->_vector[1] || v->_vector[2])
|
||||
writes(f, "\tlocal vector %s = '%f %f %f';\r\n", def->s_name, v->_vector[0], v->_vector[1], v->_vector[2]);
|
||||
else
|
||||
writes(f, "\tlocal %s %s;\r\n", "vector",progfuncs->stringtable+def->s_name);
|
||||
ofs+=2; //skip floats;
|
||||
|
@ -901,8 +901,8 @@ pbool Decompile(progfuncs_t *progfuncs, char *fname)
|
|||
writes(f, "float %s;\r\n", progfuncs->stringtable+pr_globaldefs16[i].s_name);
|
||||
break;
|
||||
case ev_vector:
|
||||
if (v->vector[0] || v->vector[1] || v->vector[2])
|
||||
writes(f, "vector %s = '%f %f %f';\r\n", progfuncs->stringtable+pr_globaldefs16[i].s_name, v->vector[0], v->vector[1], v->vector[2]);
|
||||
if (v->_vector[0] || v->_vector[1] || v->_vector[2])
|
||||
writes(f, "vector %s = '%f %f %f';\r\n", progfuncs->stringtable+pr_globaldefs16[i].s_name, v->_vector[0], v->_vector[1], v->_vector[2]);
|
||||
else
|
||||
writes(f, "vector %s;\r\n", progfuncs->stringtable+pr_globaldefs16[i].s_name);
|
||||
i+=3;//skip the floats
|
||||
|
|
|
@ -4756,23 +4756,23 @@ void SVNQ_ReadClientMove (usercmd_t *move)
|
|||
cursor_entitynumber = svprogfuncs->GetEdictFieldValue(svprogfuncs, host_client->edict, "cursor_entitynumber", NULL);
|
||||
|
||||
f = MSG_ReadShort() * (1.0f / 32767.0f);
|
||||
if (cursor_screen) cursor_screen->vector[0] = f;
|
||||
if (cursor_screen) cursor_screen->_vector[0] = f;
|
||||
f = MSG_ReadShort() * (1.0f / 32767.0f);
|
||||
if (cursor_screen) cursor_screen->vector[1] = f;
|
||||
if (cursor_screen) cursor_screen->_vector[1] = f;
|
||||
|
||||
f = MSG_ReadFloat();
|
||||
if (cursor_start) cursor_start->vector[0] = f;
|
||||
if (cursor_start) cursor_start->_vector[0] = f;
|
||||
f = MSG_ReadFloat();
|
||||
if (cursor_start) cursor_start->vector[1] = f;
|
||||
if (cursor_start) cursor_start->_vector[1] = f;
|
||||
f = MSG_ReadFloat();
|
||||
if (cursor_start) cursor_start->vector[2] = f;
|
||||
if (cursor_start) cursor_start->_vector[2] = f;
|
||||
|
||||
f = MSG_ReadFloat();
|
||||
if (cursor_impact) cursor_impact->vector[0] = f;
|
||||
if (cursor_impact) cursor_impact->_vector[0] = f;
|
||||
f = MSG_ReadFloat();
|
||||
if (cursor_impact) cursor_impact->vector[1] = f;
|
||||
if (cursor_impact) cursor_impact->_vector[1] = f;
|
||||
f = MSG_ReadFloat();
|
||||
if (cursor_impact) cursor_impact->vector[2] = f;
|
||||
if (cursor_impact) cursor_impact->_vector[2] = f;
|
||||
|
||||
entnum = (unsigned short)MSG_ReadShort();
|
||||
if (entnum >= sv.max_edicts)
|
||||
|
|
Loading…
Reference in a new issue