diff --git a/ruamoko/include/types.h b/ruamoko/include/types.h index c2f157e76..19ec0c736 100644 --- a/ruamoko/include/types.h +++ b/ruamoko/include/types.h @@ -92,5 +92,6 @@ typedef struct qfot_type_encodings_s { @extern string ty_meta_name[7]; @extern string pr_type_name[ev_type_count]; +@extern int pr_type_size[ev_type_count]; #endif diff --git a/ruamoko/lib/types.r b/ruamoko/lib/types.r index aa1f65a02..45f51c70e 100644 --- a/ruamoko/lib/types.r +++ b/ruamoko/lib/types.r @@ -11,6 +11,23 @@ string ty_meta_name[7] = { "alias", }; +int pr_type_size[ev_type_count] = { + 1, // ev_void + 1, // ev_string + 1, // ev_float + 3, // ev_vector + 1, // ev_entity + 1, // ev_field + 1, // ev_func + 1, // ev_pointer + 4, // ev_quat + 1, // ev_integer + 1, // ev_uinteger + 0, // ev_short value in opcode + 2, // ev_double + 0, // ev_invalid not a valid/simple type +}; + string pr_type_name[ev_type_count] = { "void", "string", @@ -24,6 +41,6 @@ string pr_type_name[ev_type_count] = { "integer", "uinteger", "short", - "double" + "double", "invalid", };