mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 10:11:44 -04:00
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:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user