metarmask / teardown

Tools for parsing and converting Teardown game saves
GNU General Public License v3.0
12 stars 3 forks source link

Updated entity structure for Teardown 1.0.0 #28

Closed TTFH closed 2 years ago

TTFH commented 2 years ago

Updated fields are marked with (NEW!) Missing fields:

struct Light {
    bool is_on;
    uint8_t type;       // type
    Transform transform;
    Rgba color;     // color = pow(this, 0.454545)
    float scale;        // scale
    float reach;        // reach
    float size;     // size
    float unshadowed;   // unshadowed
    float angle;        // angle = 2.0 * deg(acos(this))
    float penumbra;     // penumbra = 2.0 * deg(acos(angle) - acos(this))
    float fogiter;      // fogiter
    float fogscale;     // fogscale
    float area_size[2]; // size = 2.0 * this
    float capsule_size; // size.x = 2.0 * this (NEW!)
    uint8_t z_u8_13[13];
    float z2_f32;
    Sound sound;        // sound
    float glare;        // glare
};
struct Joint {
    uint32_t type;          // type
    uint32_t shape_handles[2];
    float shape_positions[2][3];
    float shape_axes[2][3];
    bool connected;
    bool collide;           // collide
    float rotstrength;      // rotstrength
    float rotspring;        // rotspring
    float ball_rot[4];
    float limits[2];        // limits (in degrees for hinge, meters for prismatic)
    float z_f32[2];
    float size;         // size
    bool sound;         // sound (NEW!)
    bool autodisable;       // autodisable (NEW!)
    uint32_t z_u32_2[2];
    Rope rope;          // Only if type = Rope
};
struct Vehicle {
    BitFlags flags;
    uint32_t body_handle;
    Transform transform;
    float velocity[3];
    float angular_velocity[3];
    float z_f32_not_health;
    Vec<uint32_t> wheel_handles;
    VehicleProperties properties;
    float camera[3];        // camera (NEW!)
    float player[3];        // player
    float exit[3];          // exit (NEW!)
    float propeller[3];     // propeller (NEW!)
    float difflock;         // difflock
    float z6_f32_eq_1;
    uint32_t z_u32;
    uint8_t z2_u8;
    float z7_f32_eq_0;
    Vec<uint32_t> refs;
    Vec<Exhaust> exhausts;      // exhaust
    Vec<Vital> vitals;      // vital
    float z2_f32;
    uint8_t z3_u8;
    float z3_f32;
};
struct Screen {
    BitFlags flags;
    Transform transform;
    float size[2];          // size
    float bulge;            // bulge
    uint32_t resolution[2];     // resolution
    string script;          // script
    bool enabled;           // enabled
    bool interactive;       // interactive
    float emissive;         // emissive
    float fxraster;         // fxraster (NEW!)
    float fxca;         // fxca
    float fxnoise;          // fxnoise
    float z_f32;
};
TTFH commented 2 years ago

Outdated