set_type
Define structs, enums, or typedefs and apply types at addresses so decompiled fields get names; on functions it sets the prototype. Previews until dry_run=false.
Instructions
Define a struct, enum or typedef, or apply a type at an address so decompile names its fields; at a function, type sets the prototype. To infer a class use class_layout. Checked first; dry run until dry_run=false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| var | No | Function variable to name/type (`a1`, `local_58`). | |
| name | No | Struct, enum or typedef to define, or `var`'s new name. | |
| size | No | Size past the last field, or an enum's width (4 or 8). | |
| type | No | Type to apply or typedef (`Player *`), a prototype, or alone C declarations. | |
| fields | No | Struct fields, each `offset:name:type` (`0x1c:mp:u32`). | |
| values | No | Enum values, each `name:value` (`Run:1`). | |
| address | No | Data global to type, or a function for a prototype or `var`. | |
| dry_run | No | Preview only; false applies. |