From cd30408675af68ce06516b8a4398287694e14a67 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 18 Jan 2022 15:48:43 +0900 Subject: [PATCH] [gamecode] Rename ev_quat to ev_quaternion I much prefer the full name, though the short version is easier to type. --- include/QF/progs/pr_type_names.h | 2 +- libs/gamecode/pr_debug.c | 2 +- libs/gamecode/pr_exec.c | 24 +++++++-------- libs/gamecode/pr_parse.c | 2 +- libs/gamecode/pr_v6p_opcode.c | 52 ++++++++++++++++---------------- nq/source/sv_progs.c | 2 +- qw/source/sv_progs.c | 2 +- tools/qfcc/source/dot_expr.c | 2 +- tools/qfcc/source/dump_globals.c | 2 +- tools/qfcc/source/expr.c | 18 +++++------ tools/qfcc/source/expr_binary.c | 4 +-- tools/qfcc/source/expr_bool.c | 2 +- tools/qfcc/source/idstuff.c | 2 +- tools/qfcc/source/statements.c | 4 +-- tools/qfcc/source/type.c | 18 +++++------ tools/qfcc/source/value.c | 2 +- 16 files changed, 70 insertions(+), 70 deletions(-) diff --git a/include/QF/progs/pr_type_names.h b/include/QF/progs/pr_type_names.h index 712a3c74c..79dfaa4ff 100644 --- a/include/QF/progs/pr_type_names.h +++ b/include/QF/progs/pr_type_names.h @@ -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 diff --git a/libs/gamecode/pr_debug.c b/libs/gamecode/pr_debug.c index f06fdf39f..1f7e2a651 100644 --- a/libs/gamecode/pr_debug.c +++ b/libs/gamecode/pr_debug.c @@ -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: diff --git a/libs/gamecode/pr_exec.c b/libs/gamecode/pr_exec.c index 3b5b8c6f3..65615b7fe 100644 --- a/libs/gamecode/pr_exec.c +++ b/libs/gamecode/pr_exec.c @@ -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); diff --git a/libs/gamecode/pr_parse.c b/libs/gamecode/pr_parse.c index 33ab39d3c..5f360c054 100644 --- a/libs/gamecode/pr_parse.c +++ b/libs/gamecode/pr_parse.c @@ -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: diff --git a/libs/gamecode/pr_v6p_opcode.c b/libs/gamecode/pr_v6p_opcode.c index 934a6ed69..6b8988474 100644 --- a/libs/gamecode/pr_v6p_opcode.c +++ b/libs/gamecode/pr_v6p_opcode.c @@ -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.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] = {"", "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] = {"", "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.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] = {"", "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] = {"", "popbi.q", - ev_ptr, ev_short, ev_quat, + ev_ptr, ev_short, ev_quaternion, PROG_V6P_VERSION, "*(%Ga + %sb)", }, diff --git a/nq/source/sv_progs.c b/nq/source/sv_progs.c index 69dd7254c..6da6199f2 100644 --- a/nq/source/sv_progs.c +++ b/nq/source/sv_progs.c @@ -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: diff --git a/qw/source/sv_progs.c b/qw/source/sv_progs.c index dee8842bd..d0636718c 100644 --- a/qw/source/sv_progs.c +++ b/qw/source/sv_progs.c @@ -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: diff --git a/tools/qfcc/source/dot_expr.c b/tools/qfcc/source/dot_expr.c index 19081fd48..84d0acc3f 100644 --- a/tools/qfcc/source/dot_expr.c +++ b/tools/qfcc/source/dot_expr.c @@ -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], diff --git a/tools/qfcc/source/dump_globals.c b/tools/qfcc/source/dump_globals.c index 2f39850e1..69cc1e61a 100644 --- a/tools/qfcc/source/dump_globals.c +++ b/tools/qfcc/source/dump_globals.c @@ -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], diff --git a/tools/qfcc/source/expr.c b/tools/qfcc/source/expr.c index 61e42c552..19af1437f 100644 --- a/tools/qfcc/source/expr.c +++ b/tools/qfcc/source/expr.c @@ -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: diff --git a/tools/qfcc/source/expr_binary.c b/tools/qfcc/source/expr_binary.c index 7610b4542..dfd02b5c8 100644 --- a/tools/qfcc/source/expr_binary.c +++ b/tools/qfcc/source/expr_binary.c @@ -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, diff --git a/tools/qfcc/source/expr_bool.c b/tools/qfcc/source/expr_bool.c index 52b4de683..5055d38d5 100644 --- a/tools/qfcc/source/expr_bool.c +++ b/tools/qfcc/source/expr_bool.c @@ -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: diff --git a/tools/qfcc/source/idstuff.c b/tools/qfcc/source/idstuff.c index f78658247..9fb7f5003 100644 --- a/tools/qfcc/source/idstuff.c +++ b/tools/qfcc/source/idstuff.c @@ -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: diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index a0aa7997f..8e6b01232 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -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]); diff --git a/tools/qfcc/source/type.c b/tools/qfcc/source/type.c index de6709c9d..c29c910bc 100644 --- a/tools/qfcc/source/type.c +++ b/tools/qfcc/source/type.c @@ -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; diff --git a/tools/qfcc/source/value.c b/tools/qfcc/source/value.c index 73b3b47ab..7cdc55782 100644 --- a/tools/qfcc/source/value.c +++ b/tools/qfcc/source/value.c @@ -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;