SBSPSS/Utils/MkActor3d/MkActor3d.h

92 lines
2.0 KiB
C
Raw Normal View History

2001-01-06 00:02:31 +01:00
/**********************************/
/*** SpongeBob 3d Actor Creator ***/
/**********************************/
#include <Vector3.h>
#include <List.h>
#include <FaceStore.h>
2001-02-08 15:04:49 +01:00
#include "..\mapedit\ExportHdr.h"
2001-01-06 00:02:31 +01:00
2001-02-26 21:14:08 +01:00
//***************************************************************************
2001-01-30 18:39:20 +01:00
struct sGinSkel
{
sBone Bone;
CFaceStore FaceList;
};
2001-01-06 00:02:31 +01:00
//***************************************************************************
2001-02-26 21:14:08 +01:00
struct sBoneAnim
2001-01-06 00:02:31 +01:00
{
2001-02-26 21:14:08 +01:00
vector<int> Idx;
};
2001-01-06 00:02:31 +01:00
2001-02-26 21:14:08 +01:00
//***************************************************************************
struct sAnim
{
GString Name;
int FrameCount;
vector<sBoneAnim> BoneAnim;
vector<s32> Move;
int AnimOfs;
int MoveOfs;
};
2001-01-06 00:02:31 +01:00
2001-02-26 21:14:08 +01:00
//***************************************************************************
class CMkActor3d
{
public:
2001-02-27 20:03:36 +01:00
CMkActor3d(GString const &In);
static void SetTPData(const char *Name,int TPBase,int TPW,int TPH);
2001-03-12 18:11:40 +01:00
//static void TexProcess() {TexGrab.Process();}
2001-02-26 21:14:08 +01:00
void ActorLoad();
void ActorProcess();
void ActorWrite();
2001-02-27 20:03:36 +01:00
void AnimLoad();
void AnimWrite();
2001-03-12 18:11:40 +01:00
static CTexGrab TexGrab;
2001-02-27 20:03:36 +01:00
private:
void ReadScript(const char *Filename,vector<GString> &List);
2001-01-30 18:39:20 +01:00
void ProcessSkel(int Idx,int Parent);
void WriteSkel();
void BuildSkelOut();
void BuildBoneOut(sBone &OutBone,CNode const &InNode,int ParentBoneIdx);
int WriteTexInfoList();
2001-01-06 00:02:31 +01:00
2001-02-26 21:14:08 +01:00
GString InFilename,InPath,Name,OutFile,IncFile;
2001-01-30 18:39:20 +01:00
CScene Scene;
2001-01-06 00:02:31 +01:00
2001-01-30 18:39:20 +01:00
vector<sGinSkel> Skel;
CFaceStore FaceList;
2001-01-06 00:02:31 +01:00
2001-02-26 21:14:08 +01:00
sActorHdr FileHdr;
2001-01-30 18:39:20 +01:00
FILE *File;
2001-01-08 22:40:41 +01:00
2001-02-26 21:14:08 +01:00
std::vector<GString> InTexList;
std::vector<GString> InAnimList;
2001-01-06 00:02:31 +01:00
2001-02-26 21:14:08 +01:00
/*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<sAnim> AnimList;
CList<sQuat> QuatList;
2001-01-06 00:02:31 +01:00
};
//***************************************************************************