/**********************************/ /*** SpongeBob 3d Actor Creator ***/ /**********************************/ #include #include #include #include "..\mapedit\ExportHdr.h" //*************************************************************************** struct sGinSkel { sBone Bone; CFaceStore FaceList; }; //*************************************************************************** struct sBoneAnim { vector Idx; }; //*************************************************************************** struct sAnim { GString Name; int FrameCount; vector BoneAnim; vector Move; int AnimOfs; int MoveOfs; }; //*************************************************************************** class CMkActor3d { public: CMkActor3d(GString const &In); static void SetTPData(const char *Name,int TPBase,int TPW,int TPH); static void TexProcess() {TexGrab.Process();} void ActorLoad(); void ActorProcess(); void ActorWrite(); void AnimLoad(); void AnimWrite(); private: void ReadScript(const char *Filename,vector &List); void ProcessSkel(int Idx,int Parent); void WriteSkel(); void BuildSkelOut(); void BuildBoneOut(sBone &OutBone,CNode const &InNode,int ParentBoneIdx); int WriteTexInfoList(); GString InFilename,InPath,Name,OutFile,IncFile; CScene Scene; vector Skel; CFaceStore FaceList; sActorHdr FileHdr; FILE *File; std::vector InTexList; std::vector InAnimList; static CTexGrab TexGrab; /*Anim*/ void AnimWriteInclude(); int AnimProcessSkelMove(CScene &Scene,sAnim &ThisAnim,int Idx); void AnimProcessSkelAnim(CScene &Scene,sAnim &ThisAnim,int Idx); int AnimWriteMove(sAnim const &ThisAnim); int AnimWriteAnim(sAnim const &ThisAnim); int AnimWriteQuatTable(); int BoneCount; vector AnimList; CList QuatList; }; //***************************************************************************