From 4ae94743968ce3928ced94ebc65a0c1ffb5c9003 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 19 Jan 2022 21:26:44 +0900 Subject: [PATCH] [ruamoko] Use pr_type_names for type sizes short and ushort are "wrong" (1 instead of 0, because qfcc currently uses int for short), but now the array will always be in sync with the enum. --- ruamoko/lib/types.r | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/ruamoko/lib/types.r b/ruamoko/lib/types.r index 0445e0510..7c27914ff 100644 --- a/ruamoko/lib/types.r +++ b/ruamoko/lib/types.r @@ -12,25 +12,15 @@ string ty_meta_name[7] = { }; //FIXME use pr_type_names.h, but need to fix unsigned, and add missing types -//#define EV_TYPE(type) sizeof(type), +#define field .int +#define func void()(void) +#define ptr void * +#define uint unsigned +#define ulong unsigned long +#define ushort unsigned short +#define EV_TYPE(type) sizeof(type), int pr_type_size[ev_type_count] = { -//#include - 1, // ev_void - 1, // ev_string - 1, // ev_float - 3, // ev_vector - 1, // ev_entity - 1, // ev_field - 1, // ev_func - 1, // ev_ptr - 4, // ev_quat - 1, // ev_integer - 1, // ev_uinteger - 0, // ev_short value in opcode - 2, // ev_double - 2, // ev_long - 2, // ev_ulong - 0, // ev_invalid not a valid/simple type +#include }; #define EV_TYPE(type) #type,