mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
disable integers for --id. probably not thorough enough yet :/
This commit is contained in:
parent
484edfde55
commit
1e1cb06a1f
2 changed files with 14 additions and 4 deletions
|
@ -731,10 +731,14 @@ type_mismatch:
|
||||||
} else {
|
} else {
|
||||||
type = types[t1];
|
type = types[t1];
|
||||||
}
|
}
|
||||||
if ((op >= OR && op <= GT) || op == '>' || op == '<')
|
if ((op >= OR && op <= GT) || op == '>' || op == '<') {
|
||||||
|
if (options.version > PROG_ID_VERSION)
|
||||||
type = &type_integer;
|
type = &type_integer;
|
||||||
else if (op == '*' && t1 == ev_vector && t2 == ev_vector)
|
else
|
||||||
type = &type_float;
|
type = &type_float;
|
||||||
|
} else if (op == '*' && t1 == ev_vector && t2 == ev_vector) {
|
||||||
|
type = &type_float;
|
||||||
|
}
|
||||||
if (op == '=' && e1->type == ex_expr && e1->e.expr.op == '.') {
|
if (op == '=' && e1->type == ex_expr && e1->e.expr.op == '.') {
|
||||||
e1->e.expr.type = &type_pointer;
|
e1->e.expr.type = &type_pointer;
|
||||||
}
|
}
|
||||||
|
@ -803,7 +807,10 @@ unary_expr (int op, expr_t *e)
|
||||||
case ex_def:
|
case ex_def:
|
||||||
{
|
{
|
||||||
expr_t *n = new_unary_expr (op, e);
|
expr_t *n = new_unary_expr (op, e);
|
||||||
|
if (options.version > PROG_ID_VERSION)
|
||||||
n->e.expr.type = &type_integer;
|
n->e.expr.type = &type_integer;
|
||||||
|
else
|
||||||
|
n->e.expr.type = &type_float;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
case ex_integer:
|
case ex_integer:
|
||||||
|
|
|
@ -178,6 +178,9 @@ PR_Opcode_Init_Tables (void)
|
||||||
for (op = pr_opcodes; op->name; op++) {
|
for (op = pr_opcodes; op->name; op++) {
|
||||||
if (op->min_version > options.version)
|
if (op->min_version > options.version)
|
||||||
continue;
|
continue;
|
||||||
|
if (options.version == PROG_ID_VERSION
|
||||||
|
&& op->type_c == ev_integer)
|
||||||
|
op->type_c = ev_float;
|
||||||
Hash_Add (opcode_priority_table, op);
|
Hash_Add (opcode_priority_table, op);
|
||||||
Hash_Add (opcode_priority_type_table_ab, op);
|
Hash_Add (opcode_priority_type_table_ab, op);
|
||||||
Hash_Add (opcode_priority_type_table_abc, op);
|
Hash_Add (opcode_priority_type_table_abc, op);
|
||||||
|
|
Loading…
Reference in a new issue