mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 01:41:10 +00:00
[gamecode] Rename ev_quat to ev_quaternion
I much prefer the full name, though the short version is easier to type.
This commit is contained in:
parent
0748581cd6
commit
cd30408675
16 changed files with 70 additions and 70 deletions
|
@ -38,7 +38,7 @@ EV_TYPE(entity)
|
|||
EV_TYPE(field)
|
||||
EV_TYPE(func)
|
||||
EV_TYPE(ptr) // end of v6 types
|
||||
EV_TYPE(quat)
|
||||
EV_TYPE(quaternion)
|
||||
EV_TYPE(int)
|
||||
EV_TYPE(uint)
|
||||
EV_TYPE(short) // value is embedded in the opcode
|
||||
|
|
|
@ -1053,7 +1053,7 @@ value_string (pr_debug_data_t *data, qfot_type_t *type, pr_type_t *value)
|
|||
case ev_ptr:
|
||||
raw_type_view.pointer_view (type, value, data);
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
raw_type_view.quat_view (type, value, data);
|
||||
break;
|
||||
case ev_int:
|
||||
|
|
|
@ -799,7 +799,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_STOREP_Q_v6p:
|
||||
pointer = OPB(int);
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
QuatCopy (&OPA(float), &ptr->quat_var);
|
||||
|
@ -921,7 +921,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_LOADB_Q_v6p:
|
||||
pointer = OPA(int) + OPB(int);
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
QuatCopy (&ptr->quat_var, &OPC(float));
|
||||
|
@ -960,7 +960,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_LOADBI_Q_v6p:
|
||||
pointer = OPA(int) + (short) st->b;
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
QuatCopy (&ptr->quat_var, &OPC(float));
|
||||
|
@ -968,7 +968,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_LOADBI_D_v6p:
|
||||
pointer = OPA(int) + (short) st->b;
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
OPC(double) = *(double *) ptr;
|
||||
|
@ -1009,7 +1009,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_STOREB_Q_v6p:
|
||||
pointer = OPB(int) + OPC(int);
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
QuatCopy (&OPA(float), &ptr->quat_var);
|
||||
|
@ -1017,7 +1017,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_STOREB_D_v6p:
|
||||
pointer = OPB(int) + OPC(int);
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
*(double *) ptr = OPA(double);
|
||||
|
@ -1048,7 +1048,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_STOREBI_Q_v6p:
|
||||
pointer = OPB(int) + (short) st->c;
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
QuatCopy (&OPA(float), &ptr->quat_var);
|
||||
|
@ -1056,7 +1056,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
case OP_STOREBI_D_v6p:
|
||||
pointer = OPB(int) + (short) st->c;
|
||||
if (pr_boundscheck->int_val) {
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
ptr = pr->pr_globals + pointer;
|
||||
*(double *) ptr = OPA(double);
|
||||
|
@ -1152,7 +1152,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
|
||||
QuatCopy (&ptr->quat_var, &stk->quat_var);
|
||||
|
@ -1210,7 +1210,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
|
||||
QuatCopy (&ptr->quat_var, &stk->quat_var);
|
||||
|
@ -1308,7 +1308,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
|
||||
QuatCopy (&stk->quat_var, &ptr->quat_var);
|
||||
|
@ -1366,7 +1366,7 @@ pr_exec_quakec (progs_t *pr, int exitdepth)
|
|||
|
||||
if (pr_boundscheck->int_val) {
|
||||
check_stack_pointer (pr, stack, 4);
|
||||
PR_BoundsCheck (pr, pointer, ev_quat);
|
||||
PR_BoundsCheck (pr, pointer, ev_quaternion);
|
||||
}
|
||||
|
||||
QuatCopy (&stk->quat_var, &ptr->quat_var);
|
||||
|
|
|
@ -94,7 +94,7 @@ PR_UglyValueString (progs_t *pr, etype_t type, pr_type_t *val, dstring_t *line)
|
|||
case ev_vector:
|
||||
dsprintf (line, "%.9g %.9g %.9g", VectorExpand (&val->vector_var));
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
dsprintf (line, "%.9g %.9g %.9g %.9g", QuatExpand (&val->quat_var));
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -97,32 +97,32 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
PROG_ID_VERSION,
|
||||
},
|
||||
[OP_MUL_Q_v6p] = {"*", "mul.q",
|
||||
ev_quat, ev_quat, ev_quat,
|
||||
ev_quaternion, ev_quaternion, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_MUL_FQ_v6p] = {"*", "mul.fq",
|
||||
ev_float, ev_quat, ev_quat,
|
||||
ev_float, ev_quaternion, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_MUL_QF_v6p] = {"*", "mul.qf",
|
||||
ev_quat, ev_float, ev_quat,
|
||||
ev_quaternion, ev_float, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_MUL_DQ_v6p] = {"*", "mul.dq",
|
||||
ev_double, ev_quat, ev_quat,
|
||||
ev_double, ev_quaternion, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_MUL_QD_v6p] = {"*", "mul.qd",
|
||||
ev_quat, ev_double, ev_quat,
|
||||
ev_quaternion, ev_double, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_MUL_QV_v6p] = {"*", "mul.qv",
|
||||
ev_quat, ev_vector, ev_vector,
|
||||
ev_quaternion, ev_vector, ev_vector,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
|
||||
[OP_CONJ_Q_v6p] = {"~", "conj.q",
|
||||
ev_quat, ev_invalid, ev_quat,
|
||||
ev_quaternion, ev_invalid, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, %gc",
|
||||
},
|
||||
|
@ -157,7 +157,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
PROG_ID_VERSION,
|
||||
},
|
||||
[OP_ADD_Q_v6p] = {"+", "add.q",
|
||||
ev_quat, ev_quat, ev_quat,
|
||||
ev_quaternion, ev_quaternion, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_ADD_S_v6p] = {"+", "add.s",
|
||||
|
@ -178,7 +178,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
PROG_ID_VERSION,
|
||||
},
|
||||
[OP_SUB_Q_v6p] = {"-", "sub.q",
|
||||
ev_quat, ev_quat, ev_quat,
|
||||
ev_quaternion, ev_quaternion, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
|
||||
|
@ -195,7 +195,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
PROG_ID_VERSION,
|
||||
},
|
||||
[OP_EQ_Q_v6p] = {"==", "eq.q",
|
||||
ev_quat, ev_quat, ev_int,
|
||||
ev_quaternion, ev_quaternion, ev_int,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_EQ_S_v6p] = {"==", "eq.s",
|
||||
|
@ -224,7 +224,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
PROG_ID_VERSION,
|
||||
},
|
||||
[OP_NE_Q_v6p] = {"!=", "ne.q",
|
||||
ev_quat, ev_quat, ev_int,
|
||||
ev_quaternion, ev_quaternion, ev_int,
|
||||
PROG_V6P_VERSION,
|
||||
},
|
||||
[OP_NE_S_v6p] = {"!=", "ne.s",
|
||||
|
@ -305,7 +305,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga.%Gb(%Ec), %gc",
|
||||
},
|
||||
[OP_LOAD_Q_v6p] = {".", "load.q",
|
||||
ev_entity, ev_field, ev_quat,
|
||||
ev_entity, ev_field, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga.%Gb(%Ec), %gc",
|
||||
},
|
||||
|
@ -356,7 +356,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"*(%Ga + %Gb), %gc",
|
||||
},
|
||||
[OP_LOADB_Q_v6p] = {".", "loadb.q",
|
||||
ev_ptr, ev_int, ev_quat,
|
||||
ev_ptr, ev_int, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"*(%Ga + %Gb), %gc",
|
||||
},
|
||||
|
@ -407,7 +407,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"*(%Ga + %sb), %gc",
|
||||
},
|
||||
[OP_LOADBI_Q_v6p] = {".", "loadbi.q",
|
||||
ev_ptr, ev_short, ev_quat,
|
||||
ev_ptr, ev_short, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"*(%Ga + %sb), %gc",
|
||||
},
|
||||
|
@ -469,7 +469,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga, %gc",
|
||||
},
|
||||
[OP_ADDRESS_Q_v6p] = {"&", "address.q",
|
||||
ev_quat, ev_invalid, ev_ptr,
|
||||
ev_quaternion, ev_invalid, ev_ptr,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, %gc",
|
||||
},
|
||||
|
@ -562,7 +562,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga, %gb",
|
||||
},
|
||||
[OP_STORE_Q_v6p] = {"=", "store.q",
|
||||
ev_quat, ev_quat, ev_invalid,
|
||||
ev_quaternion, ev_quaternion, ev_invalid,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, %gb",
|
||||
},
|
||||
|
@ -613,7 +613,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga, *%Gb",
|
||||
},
|
||||
[OP_STOREP_Q_v6p] = {".=", "storep.q",
|
||||
ev_quat, ev_ptr, ev_invalid,
|
||||
ev_quaternion, ev_ptr, ev_invalid,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, *%Gb",
|
||||
},
|
||||
|
@ -664,7 +664,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga, *(%Gb + %Gc)",
|
||||
},
|
||||
[OP_STOREB_Q_v6p] = {".=", "storeb.q",
|
||||
ev_quat, ev_ptr, ev_int,
|
||||
ev_quaternion, ev_ptr, ev_int,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, *(%Gb + %Gc)",
|
||||
},
|
||||
|
@ -715,7 +715,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga, *(%Gb + %sc)",
|
||||
},
|
||||
[OP_STOREBI_Q_v6p] = {".=", "storebi.q",
|
||||
ev_quat, ev_ptr, ev_short,
|
||||
ev_quaternion, ev_ptr, ev_short,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, *(%Gb + %sc)",
|
||||
},
|
||||
|
@ -778,7 +778,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga, %gc",
|
||||
},
|
||||
[OP_NOT_Q_v6p] = {"!", "not.q",
|
||||
ev_quat, ev_invalid, ev_int,
|
||||
ev_quaternion, ev_invalid, ev_int,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga, %gc",
|
||||
},
|
||||
|
@ -1203,7 +1203,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%Ga",
|
||||
},
|
||||
[OP_PUSH_Q_v6p] = {"<PUSH>", "push.q",
|
||||
ev_quat, ev_invalid, ev_invalid,
|
||||
ev_quaternion, ev_invalid, ev_invalid,
|
||||
PROG_V6P_VERSION,
|
||||
"%Ga",
|
||||
},
|
||||
|
@ -1254,7 +1254,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"*(%Ga + %Gb)",
|
||||
},
|
||||
[OP_PUSHB_Q_v6p] = {"<PUSH>", "pushb.q",
|
||||
ev_ptr, ev_int, ev_quat,
|
||||
ev_ptr, ev_int, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"*(%Ga + %Gb)",
|
||||
},
|
||||
|
@ -1305,7 +1305,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"*(%Ga + %sb)",
|
||||
},
|
||||
[OP_PUSHBI_Q_v6p] = {"<PUSH>", "pushbi.q",
|
||||
ev_ptr, ev_short, ev_quat,
|
||||
ev_ptr, ev_short, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"*(%Ga + %sb)",
|
||||
},
|
||||
|
@ -1356,7 +1356,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"%ga",
|
||||
},
|
||||
[OP_POP_Q_v6p] = {"<POP>", "pop.q",
|
||||
ev_quat, ev_invalid, ev_invalid,
|
||||
ev_quaternion, ev_invalid, ev_invalid,
|
||||
PROG_V6P_VERSION,
|
||||
"%ga",
|
||||
},
|
||||
|
@ -1407,7 +1407,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"*(%Ga + %Gb)",
|
||||
},
|
||||
[OP_POPB_Q_v6p] = {"<POP>", "popb.q",
|
||||
ev_ptr, ev_int, ev_quat,
|
||||
ev_ptr, ev_int, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"*(%Ga + %Gb)",
|
||||
},
|
||||
|
@ -1458,7 +1458,7 @@ VISIBLE const v6p_opcode_t pr_v6p_opcodes[] = {
|
|||
"*(%Ga + %sb)",
|
||||
},
|
||||
[OP_POPBI_Q_v6p] = {"<POP>", "popbi.q",
|
||||
ev_ptr, ev_short, ev_quat,
|
||||
ev_ptr, ev_short, ev_quaternion,
|
||||
PROG_V6P_VERSION,
|
||||
"*(%Ga + %sb)",
|
||||
},
|
||||
|
|
|
@ -344,7 +344,7 @@ set_address (sv_def_t *def, void *address)
|
|||
break;
|
||||
case ev_float:
|
||||
case ev_vector:
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
*(float **)def->field = (float *) address;
|
||||
break;
|
||||
case ev_double:
|
||||
|
|
|
@ -377,7 +377,7 @@ set_address (sv_def_t *def, void *address)
|
|||
break;
|
||||
case ev_float:
|
||||
case ev_vector:
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
*(float **)def->field = (float *) address;
|
||||
break;
|
||||
case ev_double:
|
||||
|
|
|
@ -540,7 +540,7 @@ print_value (dstring_t *dstr, expr_t *e, int level, int id, expr_t *next)
|
|||
e->e.value->v.vector_val[1],
|
||||
e->e.value->v.vector_val[2]);
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
label = va (0, "'%g %g %g %g'",
|
||||
e->e.value->v.quaternion_val[0],
|
||||
e->e.value->v.quaternion_val[1],
|
||||
|
|
|
@ -134,7 +134,7 @@ dump_def (progs_t *pr, pr_def_t *def, int indent)
|
|||
case ev_ptr:
|
||||
comment = va (0, " %x", G_INT (pr, offset));
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
comment = va (0, " '%g %g %g %g'",
|
||||
G_QUAT (pr, offset)[0],
|
||||
G_QUAT (pr, offset)[1],
|
||||
|
|
|
@ -1079,10 +1079,10 @@ is_quaternion_val (expr_t *e)
|
|||
{
|
||||
if (e->type == ex_nil)
|
||||
return 1;
|
||||
if (e->type == ex_value && e->e.value->lltype == ev_quat)
|
||||
if (e->type == ex_value && e->e.value->lltype == ev_quaternion)
|
||||
return 1;
|
||||
if (e->type == ex_symbol && e->e.symbol->sy_type == sy_const
|
||||
&& e->e.symbol->type->type == ev_quat)
|
||||
&& e->e.symbol->type->type == ev_quaternion)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1092,14 +1092,14 @@ expr_quaternion (expr_t *e)
|
|||
{
|
||||
if (e->type == ex_nil)
|
||||
return quat_origin;
|
||||
if (e->type == ex_value && e->e.value->lltype == ev_quat)
|
||||
if (e->type == ex_value && e->e.value->lltype == ev_quaternion)
|
||||
return e->e.value->v.quaternion_val;
|
||||
if (e->type == ex_symbol && e->e.symbol->sy_type == sy_const
|
||||
&& e->e.symbol->type->type == ev_quat)
|
||||
&& e->e.symbol->type->type == ev_quaternion)
|
||||
return e->e.symbol->s.value->v.quaternion_val;
|
||||
if (e->type == ex_symbol && e->e.symbol->sy_type == sy_var
|
||||
&& e->e.symbol->s.def->constant
|
||||
&& e->e.symbol->s.def->type->type == ev_quat)
|
||||
&& e->e.symbol->s.def->type->type == ev_quaternion)
|
||||
return D_QUAT (e->e.symbol->s.def);
|
||||
internal_error (e, "not a quaternion constant");
|
||||
}
|
||||
|
@ -1459,7 +1459,7 @@ field_expr (expr_t *e1, expr_t *e2)
|
|||
e = new_address_expr (ivar->type, e1, e2);
|
||||
return unary_expr ('.', e);
|
||||
}
|
||||
} else if (t1->type == ev_vector || t1->type == ev_quat
|
||||
} else if (t1->type == ev_vector || t1->type == ev_quaternion
|
||||
|| is_struct (t1)) {
|
||||
symbol_t *field;
|
||||
|
||||
|
@ -1707,7 +1707,7 @@ unary_expr (int op, expr_t *e)
|
|||
case ev_vector:
|
||||
VectorNegate (expr_vector (e), v);
|
||||
return new_vector_expr (v);
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
QuatNegate (expr_vector (e), q);
|
||||
return new_vector_expr (q);
|
||||
case ev_long:
|
||||
|
@ -1809,7 +1809,7 @@ unary_expr (int op, expr_t *e)
|
|||
return new_int_expr (!expr_float (e));
|
||||
case ev_vector:
|
||||
return new_int_expr (!VectorIsZero (expr_vector (e)));
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
return new_int_expr (!QuatIsZero (expr_quaternion (e)));
|
||||
case ev_long:
|
||||
case ev_ulong:
|
||||
|
@ -1882,7 +1882,7 @@ unary_expr (int op, expr_t *e)
|
|||
return error (e, "invalid type for unary ~");
|
||||
case ev_float:
|
||||
return new_float_expr (~(int) expr_float (e));
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
QuatConj (expr_vector (e), q);
|
||||
return new_vector_expr (q);
|
||||
case ev_long:
|
||||
|
|
|
@ -534,7 +534,7 @@ static expr_type_t *string_x[ev_type_count] = {
|
|||
0, // ev_field
|
||||
0, // ev_func
|
||||
0, // ev_ptr
|
||||
0, // ev_quat
|
||||
0, // ev_quaternion
|
||||
0, // ev_int
|
||||
0, // ev_uint
|
||||
0, // ev_short
|
||||
|
@ -630,7 +630,7 @@ static expr_type_t *pointer_x[ev_type_count] = {
|
|||
0, // ev_field
|
||||
0, // ev_func
|
||||
pointer_pointer,
|
||||
0, // ev_quat
|
||||
0, // ev_quaternion
|
||||
pointer_int,
|
||||
pointer_uint,
|
||||
pointer_short,
|
||||
|
|
|
@ -134,7 +134,7 @@ test_expr (expr_t *e)
|
|||
return new_alias_expr (type_default, e);
|
||||
case ev_ptr:
|
||||
return new_alias_expr (type_default, e);
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
new = new_quaternion_expr (zero);
|
||||
break;
|
||||
case ev_invalid:
|
||||
|
|
|
@ -230,7 +230,7 @@ WriteProgdefs (dprograms_t *progs, const char *filename)
|
|||
case ev_vector:
|
||||
dasprintf (dstr, "\tvec3_t\t%s;\n", name);
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
dasprintf (dstr, "\tquat_t\t%s;\n", name);
|
||||
break;
|
||||
case ev_string:
|
||||
|
|
|
@ -134,7 +134,7 @@ operand_string (operand_t *op)
|
|||
op->value->v.vector_val[0],
|
||||
op->value->v.vector_val[1],
|
||||
op->value->v.vector_val[2]);
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
return va (0, "'%g %g %g %g'",
|
||||
op->value->v.quaternion_val[0],
|
||||
op->value->v.quaternion_val[1],
|
||||
|
@ -221,7 +221,7 @@ _print_operand (operand_t *op)
|
|||
printf (" %g", op->value->v.vector_val[1]);
|
||||
printf (" %g'", op->value->v.vector_val[2]);
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
printf ("'%g", op->value->v.quaternion_val[0]);
|
||||
printf (" %g", op->value->v.quaternion_val[1]);
|
||||
printf (" %g", op->value->v.quaternion_val[2]);
|
||||
|
|
|
@ -74,7 +74,7 @@ type_t type_function = { ev_func, "function", 1, ty_basic,
|
|||
{{&type_void}} };
|
||||
type_t type_pointer = { ev_ptr, "pointer", 1, ty_basic,
|
||||
{{&type_void}} };
|
||||
type_t type_quaternion = { ev_quat, "quaternion", 4 };
|
||||
type_t type_quaternion = { ev_quaternion, "quaternion", 4 };
|
||||
type_t type_int = { ev_int, "int", 1 };
|
||||
type_t type_uint = { ev_uint, "uint", 1 };
|
||||
type_t type_short = { ev_short, "short", 1 };
|
||||
|
@ -185,7 +185,7 @@ free_type (type_t *type)
|
|||
case ev_vector:
|
||||
case ev_entity:
|
||||
case ev_type_count:
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
case ev_int:
|
||||
case ev_uint:
|
||||
case ev_long:
|
||||
|
@ -227,7 +227,7 @@ copy_chain (type_t *type, type_t *append)
|
|||
case ev_vector:
|
||||
case ev_entity:
|
||||
case ev_type_count:
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
case ev_int:
|
||||
case ev_uint:
|
||||
case ev_long:
|
||||
|
@ -280,7 +280,7 @@ append_type (type_t *type, type_t *new)
|
|||
case ev_vector:
|
||||
case ev_entity:
|
||||
case ev_type_count:
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
case ev_int:
|
||||
case ev_uint:
|
||||
case ev_long:
|
||||
|
@ -659,7 +659,7 @@ print_type_str (dstring_t *str, const type_t *type)
|
|||
case ev_float:
|
||||
case ev_vector:
|
||||
case ev_entity:
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
case ev_int:
|
||||
case ev_uint:
|
||||
case ev_long:
|
||||
|
@ -819,7 +819,7 @@ encode_type (dstring_t *encoding, const type_t *type)
|
|||
dasprintf (encoding, "^");
|
||||
encode_type (encoding, type);
|
||||
return;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
dasprintf (encoding, "Q");
|
||||
return;
|
||||
case ev_int:
|
||||
|
@ -936,7 +936,7 @@ int
|
|||
is_quaternion (const type_t *type)
|
||||
{
|
||||
type = unalias_type (type);
|
||||
return type->type == ev_quat;
|
||||
return type->type == ev_quaternion;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -945,7 +945,7 @@ is_math (const type_t *type)
|
|||
type = unalias_type (type);
|
||||
etype_t t = type->type;
|
||||
|
||||
return t == ev_vector || t == ev_quat || is_scalar (type);
|
||||
return t == ev_vector || t == ev_quaternion || is_scalar (type);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1258,7 +1258,7 @@ init_types (void)
|
|||
make_structure ("@va_list", 's', va_list_struct, &type_va_list);
|
||||
|
||||
make_structure ("@quaternion", 's', quaternion_struct, &type_quaternion);
|
||||
type_quaternion.type = ev_quat;
|
||||
type_quaternion.type = ev_quaternion;
|
||||
type_quaternion.meta = ty_basic;
|
||||
{
|
||||
symbol_t *sym;
|
||||
|
|
|
@ -533,7 +533,7 @@ emit_value (ex_value_t *value, def_t *def)
|
|||
tab = vector_imm_defs;
|
||||
type = &type_vector;
|
||||
break;
|
||||
case ev_quat:
|
||||
case ev_quaternion:
|
||||
tab = quaternion_imm_defs;
|
||||
type = &type_quaternion;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue