Download
Docs menu+

set_type

Tools / Annotate · writes, dry-run by default

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.

Parameters

addressstring

Data global to type, or a function for a prototype or var.

dry_runboolean

Preview only; false applies.

fieldsarray

Struct fields, each offset:name:type (0x1c:mp:u32).

namestring

Struct, enum or typedef to define, or var's new name.

sizeinteger

Size past the last field, or an enum's width (4 or 8).

typestring

Type to apply or typedef (Player *), a prototype, or alone C declarations.

valuesarray

Enum values, each name:value (Run:1).

varstring

Function variable to name/type (a1, local_58).

Call

json
{
  "name": "set_type",
  "arguments": {}
}