27#include "../tiki/tiki_shared.h"
33#include "skeletor_animation_file_format.h"
34#include "skeletor_model_file_format.h"
35#include "skeletor_name_lists.h"
36#include "skeletor_internal.h"
38#define MAX_SKEL_BLEND_MOVEMENT_FRAMES 32
39#define MAX_SKEL_BLEND_ACTION_FRAMES 32
40#define MAX_SKEL_BLEND_FRAMES (MAX_SKEL_BLEND_MOVEMENT_FRAMES + MAX_SKEL_BLEND_ACTION_FRAMES)
54 skelAnimDataGameHeader_t *pAnimationData;
60 skelAnimDataGameHeader_t *pAnimationData;
69# include "container.h"
71class skelAnimStoreFrameList_c
74 short int numMovementFrames;
75 short int numActionFrames;
80 SkelQuat GetSlerpValue(
int globalChannelNum)
const;
81 void GetLerpValue3(
int globalChannelNum,
SkelVec3 *outVec)
const;
88 static ChannelNameTable m_boneNames;
89 static ChannelNameTable m_channelNames;
90 static skelBone_World m_worldBone;
93 SkelVec3 m_frameBounds[2];
95 skelAnimStoreFrameList_c m_frameList;
96 short int m_targetLookLeft;
97 short int m_targetLookRight;
98 short int m_targetLookUp;
99 short int m_targetLookDown;
100 short int m_targetLookCrossed;
101 short int m_targetBlink;
102 short int m_timeNextBlink;
103 short int m_headBoneIndex;
104 vec3_t m_eyeTargetPos;
105 vec3_t m_eyePrevTargetPos;
106 class skelBone_Base *m_leftFoot;
107 class skelBone_Base *m_rightFoot;
108 skelChannelList_c m_morphTargetList;
109 class skelBone_Base **m_bone;
112 skeletor_c(dtiki_t *tiki);
115 static skelAnimDataGameHeader_t *
116 ConvertSkelFileToGame(skelAnimDataFileHeader_t *pHeader,
int iBuffLength,
const char *path);
118 SaveProcessedAnim(skelAnimDataGameHeader_t *enAnim,
const char *path, skelAnimDataFileHeader_t *pHeader);
119 static skelAnimDataGameHeader_t *LoadProcessedAnim(
const char *path,
void *buffer,
int len,
const char *name);
120 static skelAnimDataGameHeader_t *LoadProcessedAnimEx(
const char *path,
void *buffer,
int len,
const char *name);
121 void PrintBoneCacheList();
122 void PrintBoneList();
123 void LoadMorphTargetNames(skelHeaderGame_t *modelHeader);
124 void GetFrame(skelAnimFrame_t *newFrame);
125 int GetMorphWeightFrame(
int *data);
126 SkelMat4 & GetBoneFrame(
int boneIndex)
const;
127 void GetFrameBounds(SkelVec3 *, SkelVec3 *);
128 float GetModelLODRadius();
129 bool IsBoneOnGround(
int boneIndex,
float threshold);
130 int GetMorphWeightFrame(
int index,
float time,
int *data);
131 qboolean LoadSKB(
const char *);
133 float GetCentroidRadius(
float *centroid);
134 void SetPose(
const frameInfo_t *frameInfo,
const int *contIndices,
const vec4_t *contValues,
float actionWeight);
135 void SetEyeTargetPos(
const float *pEyeTargetPos);
136 int GetBoneParent(
int boneIndex);
137 static class ChannelNameTable* ChannelNames();
141 SkelMat4 *BoneTransformation(
int,
int *,
float (*)[4]);
154 void ConvertToRotationName(
const char *boneName,
char *rotChannelName);
155 void ConvertToPositionName(
const char *boneName,
char *posChannelName);
156 void ConvertToFKRotationName(
const char *boneName,
char *rotChannelName);
157 void ConvertToFKPositionName(
const char *boneName,
char *rotChannelName);
161 skelHeaderGame_t *skelmodel,
162 skelAnimDataGameHeader_t *animData,
163 skelChannelList_c *boneList,
167 void TIKI_GetSkelAnimFrameInternal2(
170 skelAnimStoreFrameList_c *frameList,
175 void SkeletorGetAnimFrame2(
176 skelHeaderGame_t *skelmodel,
177 skelChannelList_c *boneList,
179 skelAnimStoreFrameList_c *frameList,
185 void SkeletorGetAnimFrame(
186 skelHeaderGame_t *skelmodel,
187 skelAnimDataGameHeader_t *animData,
188 skelChannelList_c *boneList,
195 void TIKI_GetSkelAnimFrame(dtiki_t *tiki,
skelBoneCache_t *bones,
float *radius, vec3_t *mins, vec3_t *maxes);
196 void TIKI_GetSkelAnimFrame2(
197 dtiki_t *tiki,
skelBoneCache_t *bones,
int anim,
int frame,
float *radius, vec3_t *mins, vec3_t *maxes
199 void TIKI_GetSkelAnimFrameInternal(
202 skelAnimDataGameHeader_t *animData,
213 void Skel_DPrintf(
const char *fmt, ...);
216 void Skel_Free(
void *ptr);
217 void *Skel_Alloc(
size_t size);
219# define Skel_Free(ptr) free(ptr)
220# define Skel_Alloc(size) malloc(size)
223 void Skel_FreeFile(
void *buffer);
224 int Skel_ReadFileEx(
const char *qpath,
void **buffer, qboolean quiet);
230 void SKEL_Message(
const char *fmt, ...);
231 void SKEL_Warning(
const char *fmt, ...);
232 void SKEL_Error(
const char *fmt, ...);
233 void Skel_ExtractFilePath(
const char *path,
char *dest);
234 void Skel_ExtractFileBase(
const char *path,
char *dest);
235 void Skel_ExtractFileExtension(
const char *path,
char *dest);
237 void Skel_ExtractFileName(
const char *path,
char *dest);
238 int FileLength(FILE *pFile);
244 void SkeletorLoadBoneFromBuffer(skelChannelList_c *boneList, boneData_t *boneData, skelBone_Base **bone);
245 void SkeletorLoadBonesFromBuffer(skelChannelList_c *boneList, skelHeaderGame_t *buffer, skelBone_Base **bone);
Definition container.h:85
Definition SkelMat4.h:355
Definition SkelQuat.h:274
Definition SkelVec3.h:197
Definition skeletor_animation_file_format.h:51
Definition tiki_shared.h:403