mirror of
https://github.com/aap/librw.git
synced 2026-04-19 21:13:13 +01:00
got animation, hanim and skinning basically working
This commit is contained in:
@@ -641,102 +641,4 @@ struct TexDictionary : PluginBase<TexDictionary>
|
||||
|
||||
extern TexDictionary *currentTexDictionary;
|
||||
|
||||
struct Animation;
|
||||
|
||||
struct AnimInterpolatorInfo
|
||||
{
|
||||
int32 id;
|
||||
int32 keyFrameSize;
|
||||
int32 customDataSize;
|
||||
void (*streamRead)(Stream *stream, Animation *anim);
|
||||
void (*streamWrite)(Stream *stream, Animation *anim);
|
||||
uint32 (*streamGetSize)(Animation *anim);
|
||||
};
|
||||
|
||||
void registerAnimInterpolatorInfo(AnimInterpolatorInfo *interpInfo);
|
||||
AnimInterpolatorInfo *findAnimInterpolatorInfo(int32 id);
|
||||
|
||||
struct Animation
|
||||
{
|
||||
AnimInterpolatorInfo *interpInfo;
|
||||
int32 numFrames;
|
||||
int32 flags;
|
||||
float duration;
|
||||
void *keyframes;
|
||||
void *customData;
|
||||
|
||||
static Animation *create(AnimInterpolatorInfo*, int32 numFrames, int32 flags, float duration);
|
||||
void destroy(void);
|
||||
static Animation *streamRead(Stream *stream);
|
||||
static Animation *streamReadLegacy(Stream *stream);
|
||||
bool streamWrite(Stream *stream);
|
||||
bool streamWriteLegacy(Stream *stream);
|
||||
uint32 streamGetSize(void);
|
||||
};
|
||||
|
||||
struct AnimInterpolator
|
||||
{
|
||||
// only a stub right now
|
||||
Animation *anim;
|
||||
|
||||
AnimInterpolator(Animation *anim);
|
||||
};
|
||||
|
||||
struct UVAnimKeyFrame
|
||||
{
|
||||
UVAnimKeyFrame *prev;
|
||||
float time;
|
||||
float uv[6];
|
||||
};
|
||||
|
||||
struct UVAnimDictionary;
|
||||
|
||||
// RW does it differently...maybe we should implement RtDict
|
||||
// and make it more general?
|
||||
|
||||
struct UVAnimCustomData
|
||||
{
|
||||
char name[32];
|
||||
int32 nodeToUVChannel[8];
|
||||
int32 refCount;
|
||||
|
||||
void destroy(Animation *anim);
|
||||
};
|
||||
|
||||
// This should be more general probably
|
||||
struct UVAnimDictEntry
|
||||
{
|
||||
Animation *anim;
|
||||
LLLink inDict;
|
||||
static UVAnimDictEntry *fromDict(LLLink *lnk){
|
||||
return LLLinkGetData(lnk, UVAnimDictEntry, inDict); }
|
||||
};
|
||||
|
||||
// This too
|
||||
struct UVAnimDictionary
|
||||
{
|
||||
LinkList animations;
|
||||
|
||||
static UVAnimDictionary *create(void);
|
||||
void destroy(void);
|
||||
int32 count(void) { return this->animations.count(); }
|
||||
void add(Animation *anim);
|
||||
Animation *find(const char *name);
|
||||
|
||||
static UVAnimDictionary *streamRead(Stream *stream);
|
||||
bool streamWrite(Stream *stream);
|
||||
uint32 streamGetSize(void);
|
||||
};
|
||||
|
||||
extern UVAnimDictionary *currentUVAnimDictionary;
|
||||
|
||||
struct UVAnim
|
||||
{
|
||||
AnimInterpolator *interp[8];
|
||||
};
|
||||
|
||||
extern int32 uvAnimOffset;
|
||||
|
||||
void registerUVAnimPlugin(void);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user