|
|
@ -248,8 +248,8 @@ typedef struct mstudiobone_s |
|
|
|
int32_t parent; // parent bone
|
|
|
|
int32_t parent; // parent bone
|
|
|
|
int32_t flags; // bone flags
|
|
|
|
int32_t flags; // bone flags
|
|
|
|
int32_t bonecontroller[6]; // bone controller index, -1 == none
|
|
|
|
int32_t bonecontroller[6]; // bone controller index, -1 == none
|
|
|
|
float value[6]; // default DoF values
|
|
|
|
vec_t value[6]; // default DoF values
|
|
|
|
float scale[6]; // scale for delta DoF values
|
|
|
|
vec_t scale[6]; // scale for delta DoF values
|
|
|
|
} mstudiobone_t; |
|
|
|
} mstudiobone_t; |
|
|
|
|
|
|
|
|
|
|
|
#define STUDIO_PROC_AXISINTERP 1 |
|
|
|
#define STUDIO_PROC_AXISINTERP 1 |
|
|
@ -268,7 +268,7 @@ typedef struct |
|
|
|
|
|
|
|
|
|
|
|
typedef struct |
|
|
|
typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
float inv_tolerance; // 1.0f / radian angle of trigger influence
|
|
|
|
vec_t inv_tolerance; // 1.0f / radian angle of trigger influence
|
|
|
|
vec4_t trigger; // angle to match
|
|
|
|
vec4_t trigger; // angle to match
|
|
|
|
vec3_t pos; // new position
|
|
|
|
vec3_t pos; // new position
|
|
|
|
vec4_t quat; // new angle
|
|
|
|
vec4_t quat; // new angle
|
|
|
@ -284,7 +284,7 @@ typedef struct |
|
|
|
// extra info for bones
|
|
|
|
// extra info for bones
|
|
|
|
typedef struct |
|
|
|
typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
float poseToBone[3][4]; // boneweighting reqiures
|
|
|
|
vec_t poseToBone[3][4]; // boneweighting reqiures
|
|
|
|
vec4_t qAlignment; |
|
|
|
vec4_t qAlignment; |
|
|
|
int32_t proctype; |
|
|
|
int32_t proctype; |
|
|
|
int32_t procindex; // procedural rule
|
|
|
|
int32_t procindex; // procedural rule
|
|
|
@ -307,52 +307,52 @@ typedef struct |
|
|
|
int32_t flags; |
|
|
|
int32_t flags; |
|
|
|
|
|
|
|
|
|
|
|
// general params
|
|
|
|
// general params
|
|
|
|
float length; // how from from bone base, along bone, is tip
|
|
|
|
vec_t length; // how from from bone base, along bone, is tip
|
|
|
|
float tipMass; |
|
|
|
vec_t tipMass; |
|
|
|
|
|
|
|
|
|
|
|
// flexible params
|
|
|
|
// flexible params
|
|
|
|
float yawStiffness; |
|
|
|
vec_t yawStiffness; |
|
|
|
float yawDamping; |
|
|
|
vec_t yawDamping; |
|
|
|
float pitchStiffness; |
|
|
|
vec_t pitchStiffness; |
|
|
|
float pitchDamping; |
|
|
|
vec_t pitchDamping; |
|
|
|
float alongStiffness; |
|
|
|
vec_t alongStiffness; |
|
|
|
float alongDamping; |
|
|
|
vec_t alongDamping; |
|
|
|
|
|
|
|
|
|
|
|
// angle constraint
|
|
|
|
// angle constraint
|
|
|
|
float angleLimit; // maximum deflection of tip in radians
|
|
|
|
vec_t angleLimit; // maximum deflection of tip in radians
|
|
|
|
|
|
|
|
|
|
|
|
// yaw constraint
|
|
|
|
// yaw constraint
|
|
|
|
float minYaw; // in radians
|
|
|
|
vec_t minYaw; // in radians
|
|
|
|
float maxYaw; // in radians
|
|
|
|
vec_t maxYaw; // in radians
|
|
|
|
float yawFriction; |
|
|
|
vec_t yawFriction; |
|
|
|
float yawBounce; |
|
|
|
vec_t yawBounce; |
|
|
|
|
|
|
|
|
|
|
|
// pitch constraint
|
|
|
|
// pitch constraint
|
|
|
|
float minPitch; // in radians
|
|
|
|
vec_t minPitch; // in radians
|
|
|
|
float maxPitch; // in radians
|
|
|
|
vec_t maxPitch; // in radians
|
|
|
|
float pitchFriction; |
|
|
|
vec_t pitchFriction; |
|
|
|
float pitchBounce; |
|
|
|
vec_t pitchBounce; |
|
|
|
|
|
|
|
|
|
|
|
// base spring
|
|
|
|
// base spring
|
|
|
|
float baseMass; |
|
|
|
vec_t baseMass; |
|
|
|
float baseStiffness; |
|
|
|
vec_t baseStiffness; |
|
|
|
float baseDamping; |
|
|
|
vec_t baseDamping; |
|
|
|
float baseMinLeft; |
|
|
|
vec_t baseMinLeft; |
|
|
|
float baseMaxLeft; |
|
|
|
vec_t baseMaxLeft; |
|
|
|
float baseLeftFriction; |
|
|
|
vec_t baseLeftFriction; |
|
|
|
float baseMinUp; |
|
|
|
vec_t baseMinUp; |
|
|
|
float baseMaxUp; |
|
|
|
vec_t baseMaxUp; |
|
|
|
float baseUpFriction; |
|
|
|
vec_t baseUpFriction; |
|
|
|
float baseMinForward; |
|
|
|
vec_t baseMinForward; |
|
|
|
float baseMaxForward; |
|
|
|
vec_t baseMaxForward; |
|
|
|
float baseForwardFriction; |
|
|
|
vec_t baseForwardFriction; |
|
|
|
|
|
|
|
|
|
|
|
// boing
|
|
|
|
// boing
|
|
|
|
float boingImpactSpeed; |
|
|
|
vec_t boingImpactSpeed; |
|
|
|
float boingImpactAngle; |
|
|
|
vec_t boingImpactAngle; |
|
|
|
float boingDampingRate; |
|
|
|
vec_t boingDampingRate; |
|
|
|
float boingFrequency; |
|
|
|
vec_t boingFrequency; |
|
|
|
float boingAmplitude; |
|
|
|
vec_t boingAmplitude; |
|
|
|
} mstudiojigglebone_t; |
|
|
|
} mstudiojigglebone_t; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct |
|
|
|
typedef struct |
|
|
@ -369,8 +369,8 @@ typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
int32_t bone; // -1 == 0
|
|
|
|
int32_t bone; // -1 == 0
|
|
|
|
int32_t type; // X, Y, Z, XR, YR, ZR, M
|
|
|
|
int32_t type; // X, Y, Z, XR, YR, ZR, M
|
|
|
|
float start; |
|
|
|
vec_t start; |
|
|
|
float end; |
|
|
|
vec_t end; |
|
|
|
int32_t rest; // byte index value at rest
|
|
|
|
int32_t rest; // byte index value at rest
|
|
|
|
int32_t index; // 0-3 user set controller, 4 mouth
|
|
|
|
int32_t index; // 0-3 user set controller, 4 mouth
|
|
|
|
} mstudiobonecontroller_t; |
|
|
|
} mstudiobonecontroller_t; |
|
|
@ -424,7 +424,7 @@ typedef struct |
|
|
|
|
|
|
|
|
|
|
|
typedef struct |
|
|
|
typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
float scale[6]; |
|
|
|
vec_t scale[6]; |
|
|
|
uint16_t offset[6]; |
|
|
|
uint16_t offset[6]; |
|
|
|
} mstudioikerror_t; |
|
|
|
} mstudioikerror_t; |
|
|
|
|
|
|
|
|
|
|
@ -439,22 +439,22 @@ typedef struct |
|
|
|
int32_t attachment; // attachment index
|
|
|
|
int32_t attachment; // attachment index
|
|
|
|
|
|
|
|
|
|
|
|
int32_t slot; // iktarget slot. Usually same as chain.
|
|
|
|
int32_t slot; // iktarget slot. Usually same as chain.
|
|
|
|
float height; |
|
|
|
vec_t height; |
|
|
|
float radius; |
|
|
|
vec_t radius; |
|
|
|
float floor; |
|
|
|
vec_t floor; |
|
|
|
vec3_t pos; |
|
|
|
vec3_t pos; |
|
|
|
vec4_t quat; |
|
|
|
vec4_t quat; |
|
|
|
|
|
|
|
|
|
|
|
int32_t ikerrorindex; // compressed IK error
|
|
|
|
int32_t ikerrorindex; // compressed IK error
|
|
|
|
|
|
|
|
|
|
|
|
int32_t iStart; |
|
|
|
int32_t iStart; |
|
|
|
float start; // beginning of influence
|
|
|
|
vec_t start; // beginning of influence
|
|
|
|
float peak; // start of full influence
|
|
|
|
vec_t peak; // start of full influence
|
|
|
|
float tail; // end of full influence
|
|
|
|
vec_t tail; // end of full influence
|
|
|
|
float end; // end of all influence
|
|
|
|
vec_t end; // end of all influence
|
|
|
|
float contact; // frame footstep makes ground concact
|
|
|
|
vec_t contact; // frame footstep makes ground concact
|
|
|
|
float drop; // how far down the foot should drop when reaching for IK
|
|
|
|
vec_t drop; // how far down the foot should drop when reaching for IK
|
|
|
|
float top; // top of the foot box
|
|
|
|
vec_t top; // top of the foot box
|
|
|
|
|
|
|
|
|
|
|
|
int32_t unused[4]; // for future expansions
|
|
|
|
int32_t unused[4]; // for future expansions
|
|
|
|
} mstudioikrule_t; |
|
|
|
} mstudioikrule_t; |
|
|
@ -462,8 +462,8 @@ typedef struct |
|
|
|
typedef struct |
|
|
|
typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
int32_t chain; |
|
|
|
int32_t chain; |
|
|
|
float flPosWeight; |
|
|
|
vec_t flPosWeight; |
|
|
|
float flLocalQWeight; |
|
|
|
vec_t flLocalQWeight; |
|
|
|
int32_t flags; |
|
|
|
int32_t flags; |
|
|
|
|
|
|
|
|
|
|
|
int32_t unused[4]; // for future expansions
|
|
|
|
int32_t unused[4]; // for future expansions
|
|
|
@ -473,9 +473,9 @@ typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
int32_t endframe; |
|
|
|
int32_t endframe; |
|
|
|
int32_t motionflags; |
|
|
|
int32_t motionflags; |
|
|
|
float v0; // velocity at start of block
|
|
|
|
vec_t v0; // velocity at start of block
|
|
|
|
float v1; // velocity at end of block
|
|
|
|
vec_t v1; // velocity at end of block
|
|
|
|
float angle; // YAW rotation at end of this blocks movement
|
|
|
|
vec_t angle; // YAW rotation at end of this blocks movement
|
|
|
|
vec3_t vector; // movement vector relative to this blocks initial angle
|
|
|
|
vec3_t vector; // movement vector relative to this blocks initial angle
|
|
|
|
vec3_t position; // relative to start of animation???
|
|
|
|
vec3_t position; // relative to start of animation???
|
|
|
|
} mstudiomovement_t; |
|
|
|
} mstudiomovement_t; |
|
|
@ -484,7 +484,7 @@ typedef struct |
|
|
|
typedef struct |
|
|
|
typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
char label[MAXSTUDIONAME]; // animation label (may be matched with sequence label)
|
|
|
|
char label[MAXSTUDIONAME]; // animation label (may be matched with sequence label)
|
|
|
|
float fps; // frames per second (match with sequence fps or be different)
|
|
|
|
vec_t fps; // frames per second (match with sequence fps or be different)
|
|
|
|
int32_t flags; // looping/non-looping flags
|
|
|
|
int32_t flags; // looping/non-looping flags
|
|
|
|
int32_t numframes; // frames per animation
|
|
|
|
int32_t numframes; // frames per animation
|
|
|
|
|
|
|
|
|
|
|
@ -504,10 +504,10 @@ typedef struct |
|
|
|
int16_t iSequence; |
|
|
|
int16_t iSequence; |
|
|
|
int16_t iPose; |
|
|
|
int16_t iPose; |
|
|
|
int32_t flags; |
|
|
|
int32_t flags; |
|
|
|
float start; // beginning of influence
|
|
|
|
vec_t start; // beginning of influence
|
|
|
|
float peak; // start of full influence
|
|
|
|
vec_t peak; // start of full influence
|
|
|
|
float tail; // end of full influence
|
|
|
|
vec_t tail; // end of full influence
|
|
|
|
float end; // end of all influence
|
|
|
|
vec_t end; // end of all influence
|
|
|
|
} mstudioautolayer_t; |
|
|
|
} mstudioautolayer_t; |
|
|
|
|
|
|
|
|
|
|
|
// sequence descriptions
|
|
|
|
// sequence descriptions
|
|
|
@ -515,7 +515,7 @@ typedef struct mstudioseqdesc_s |
|
|
|
{ |
|
|
|
{ |
|
|
|
char label[MAXSTUDIONAME]; // sequence label
|
|
|
|
char label[MAXSTUDIONAME]; // sequence label
|
|
|
|
|
|
|
|
|
|
|
|
float fps; // frames per second
|
|
|
|
vec_t fps; // frames per second
|
|
|
|
int32_t flags; // looping/non-looping flags
|
|
|
|
int32_t flags; // looping/non-looping flags
|
|
|
|
|
|
|
|
|
|
|
|
int32_t activity; |
|
|
|
int32_t activity; |
|
|
@ -543,8 +543,8 @@ typedef struct mstudioseqdesc_s |
|
|
|
// [blend][bone][X, Y, Z, XR, YR, ZR]
|
|
|
|
// [blend][bone][X, Y, Z, XR, YR, ZR]
|
|
|
|
|
|
|
|
|
|
|
|
int32_t blendtype[2]; // X, Y, Z, XR, YR, ZR (same as paramindex)
|
|
|
|
int32_t blendtype[2]; // X, Y, Z, XR, YR, ZR (same as paramindex)
|
|
|
|
float blendstart[2]; // starting value (same as paramstart)
|
|
|
|
vec_t blendstart[2]; // starting value (same as paramstart)
|
|
|
|
float blendend[2]; // ending value (same as paramend)
|
|
|
|
vec_t blendend[2]; // ending value (same as paramend)
|
|
|
|
uint8_t groupsize[2]; // 255 x 255 blends should be enough
|
|
|
|
uint8_t groupsize[2]; // 255 x 255 blends should be enough
|
|
|
|
uint8_t numautolayers; // count of autoplaying layers
|
|
|
|
uint8_t numautolayers; // count of autoplaying layers
|
|
|
|
uint8_t numiklocks; // IK-locks per sequence
|
|
|
|
uint8_t numiklocks; // IK-locks per sequence
|
|
|
@ -565,9 +565,9 @@ typedef struct |
|
|
|
{ |
|
|
|
{ |
|
|
|
char name[MAXSTUDIONAME]; |
|
|
|
char name[MAXSTUDIONAME]; |
|
|
|
int32_t flags; // ????
|
|
|
|
int32_t flags; // ????
|
|
|
|
float start; // starting value
|
|
|
|
vec_t start; // starting value
|
|
|
|
float end; // ending value
|
|
|
|
vec_t end; // ending value
|
|
|
|
float loop; // looping range, 0 for no looping, 360 for rotations, etc.
|
|
|
|
vec_t loop; // looping range, 0 for no looping, 360 for rotations, etc.
|
|
|
|
} mstudioposeparamdesc_t; |
|
|
|
} mstudioposeparamdesc_t; |
|
|
|
|
|
|
|
|
|
|
|
typedef struct mstudioanim_s |
|
|
|
typedef struct mstudioanim_s |
|
|
@ -636,7 +636,7 @@ typedef struct |
|
|
|
char name[64]; |
|
|
|
char name[64]; |
|
|
|
|
|
|
|
|
|
|
|
int32_t type; // UNUSED
|
|
|
|
int32_t type; // UNUSED
|
|
|
|
float boundingradius; // UNUSED
|
|
|
|
vec_t boundingradius; // UNUSED
|
|
|
|
|
|
|
|
|
|
|
|
int32_t nummesh; |
|
|
|
int32_t nummesh; |
|
|
|
int32_t meshindex; |
|
|
|
int32_t meshindex; |
|
|
|