mirror of
https://github.com/open-goal/jak-project
synced 2026-08-22 07:04:29 -04:00
add ref test for sprite and support nested bitfields in static data (#723)
This commit is contained in:
@@ -1183,6 +1183,14 @@ std::optional<std::vector<BitFieldConstantDef>> try_decompile_bitfield_from_int(
|
||||
auto name = decompile_int_enum_from_int(field.type(), ts, bitfield_value);
|
||||
def.enum_constant = fmt::format("({} {})", field.type().print(), name);
|
||||
}
|
||||
|
||||
auto nested_bitfield_type = dynamic_cast<BitFieldType*>(ts.lookup_type(field.type()));
|
||||
if (nested_bitfield_type) {
|
||||
BitFieldConstantDef::NestedField nested;
|
||||
nested.field_type = field.type();
|
||||
nested.fields = *try_decompile_bitfield_from_int(field.type(), ts, bitfield_value, true);
|
||||
def.nested_field = nested;
|
||||
}
|
||||
result.push_back(def);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user