mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
ir_value_set_field
This commit is contained in:
parent
48d330a1e9
commit
1559dedfd9
2 changed files with 10 additions and 0 deletions
9
ir.c
9
ir.c
|
@ -646,6 +646,15 @@ bool ir_value_set_vector(ir_value *self, vector v)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ir_value_set_field(ir_value *self, ir_value *fld)
|
||||
{
|
||||
if (self->vtype != TYPE_FIELD)
|
||||
return false;
|
||||
self->constval.vpointer = fld;
|
||||
self->isconst = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ir_value_set_string(ir_value *self, const char *str)
|
||||
{
|
||||
if (self->vtype != TYPE_STRING)
|
||||
|
|
1
ir.h
1
ir.h
|
@ -95,6 +95,7 @@ bool GMQCC_WARN ir_value_set_int(ir_value*, int i);
|
|||
#endif
|
||||
bool GMQCC_WARN ir_value_set_string(ir_value*, const char *s);
|
||||
bool GMQCC_WARN ir_value_set_vector(ir_value*, vector v);
|
||||
bool GMQCC_WARN ir_value_set_field(ir_value*, ir_value *fld);
|
||||
/*bool ir_value_set_pointer_v(ir_value*, ir_value* p); */
|
||||
/*bool ir_value_set_pointer_i(ir_value*, int i); */
|
||||
|
||||
|
|
Loading…
Reference in a new issue