decomp3: more engine files, get-texture macro, use print method in autogenerated inspect, fix bitfield float print (#3432)

- `fma-sphere`
- `prim-beam-h`
- `cam-start`
- `ragdoll`
- `light-trails-h`
- `light-trails`
- `menu`
- `water`
- `water-flow`
- `hud`
- `hud-classes`
- `progress`
- `progress-draw`

---

The `get-texture` macro replaces calls to `lookup-texture-by-id` and
`lookup-texture-by-id-fast`. The `defpart` macro detection was modified
to print a pair like `(texture-name tpage-name)` for the texture field
that gets turned into a `texture-id` constant. Only used in Jak 3 at the
moment, I'll probably go through the other games at a later point.
This commit is contained in:
Hat Kid
2024-03-23 14:25:11 +01:00
committed by GitHub
parent 9a9f203d8b
commit 99866cec88
120 changed files with 61355 additions and 1038 deletions
+5
View File
@@ -1530,6 +1530,11 @@ goos::Object bitfield_defs_print(const TypeSpec& type,
result.push_back(pretty_print::to_symbol(fmt::format(
":{} {}", def.field_name,
bitfield_defs_print(def.nested_field->field_type, def.nested_field->fields).print())));
} else if (def.is_float) {
float f;
memcpy(&f, &def.value, 4);
result.push_back(
pretty_print::to_symbol(fmt::format(":{} {}", def.field_name, float_to_string(f, true))));
} else {
result.push_back(
pretty_print::to_symbol(fmt::format(":{} #x{:x}", def.field_name, def.value)));