[gamecode] Add ev_ushort and partial support

Really, only just enough to get everything compiling (which does include
vkgen running correctly).
This commit is contained in:
Bill Currie 2022-01-18 22:08:37 +09:00
parent 6df79b2b06
commit 068c04ece6
11 changed files with 41 additions and 1 deletions

View file

@ -149,6 +149,8 @@ static void pr_debug_long_view (qfot_type_t *type, pr_type_t *value,
void *_data);
static void pr_debug_ulong_view (qfot_type_t *type, pr_type_t *value,
void *_data);
static void pr_debug_ushort_view (qfot_type_t *type, pr_type_t *value,
void *_data);
static void pr_debug_struct_view (qfot_type_t *type, pr_type_t *value,
void *_data);
static void pr_debug_union_view (qfot_type_t *type, pr_type_t *value,
@ -176,6 +178,7 @@ static type_view_t raw_type_view = {
pr_debug_double_view,
pr_debug_long_view,
pr_debug_ulong_view,
pr_debug_ushort_view,
pr_debug_struct_view,
pr_debug_union_view,
pr_debug_enum_view,
@ -1074,6 +1077,9 @@ value_string (pr_debug_data_t *data, qfot_type_t *type, pr_type_t *value)
case ev_ulong:
raw_type_view.ulong_view (type, value, data);
break;
case ev_ushort:
raw_type_view.ushort_view (type, value, data);
break;
case ev_invalid:
case ev_type_count:
dstring_appendstr (data->dstr, "<?""?>");
@ -1395,6 +1401,15 @@ pr_debug_ulong_view (qfot_type_t *type, pr_type_t *value, void *_data)
dasprintf (dstr, "%" PRIu64, *(uint64_t *)value);
}
static void
pr_debug_ushort_view (qfot_type_t *type, pr_type_t *value, void *_data)
{
__auto_type data = (pr_debug_data_t *) _data;
dstring_t *dstr = data->dstr;
dasprintf (dstr, "%04x", (pr_ushort_t)value->int_var);
}
static void
pr_dump_struct (qfot_type_t *type, pr_type_t *value, void *_data,
const char *struct_type)