This commit is contained in:
parent
d8dc188f90
commit
1d87e8a0c7
3 changed files with 824 additions and 0 deletions
81
Utils/MkActor/MkActor.h
Normal file
81
Utils/MkActor/MkActor.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*************************/
|
||||
/*** Actor Sprite Tool ***/
|
||||
/*************************/
|
||||
|
||||
#include <Vector3.h>
|
||||
#include <List.h>
|
||||
|
||||
//***************************************************************************
|
||||
struct sFrame
|
||||
{
|
||||
GString Filename;
|
||||
int FrameIdx;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
struct sAnim
|
||||
{
|
||||
GString Name;
|
||||
vector<sFrame> Frames;
|
||||
bool VRamFlag;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
struct sBmp
|
||||
{
|
||||
GString Filename;
|
||||
Frame Bmp;
|
||||
int ChkR,ChkG,ChkB;
|
||||
u8 *RGB;
|
||||
u8 *Psx;
|
||||
u8 *Pak;
|
||||
int PsxSize;
|
||||
int PakSize;
|
||||
bool VRamFlag;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
class CMkActor
|
||||
{
|
||||
public:
|
||||
CMkActor(GString &ActorName,GString &ActorPath,GString &SpritePath);
|
||||
// ~CMkActor();
|
||||
|
||||
static void SetTPData(const char *Name,int TPBase,int TPW,int TPH);
|
||||
|
||||
void Load();
|
||||
void Process();
|
||||
void Write();
|
||||
void CleanUp();
|
||||
|
||||
private:
|
||||
void ReadScript(const char *Filename,vector<GString> &List);
|
||||
void BuildFrameList();
|
||||
void FindFrames(sAnim &ThisAnim);
|
||||
|
||||
void LoadFrameList();
|
||||
void LoadFrame(sFrame &ThisFrame,bool VRamFlag);
|
||||
int LoadBmp(GString &Name,bool VRamFlag);
|
||||
bool IsImageSame(sBmp &Bmp0,sBmp &Bmp1);
|
||||
void MakePsxGfx(sBmp &Bmp);
|
||||
void ProcessFrames();
|
||||
|
||||
int WritePalette();
|
||||
int WriteAnimList();
|
||||
int WriteFrameList();
|
||||
|
||||
void WriteInclude();
|
||||
GString Name,ActorDir,SpriteDir;
|
||||
GString OutFile,IncFile;
|
||||
|
||||
FILE *File;
|
||||
sSpriteAnimBank FileHdr;
|
||||
|
||||
vector<GString> InAnimList;
|
||||
vector<sAnim> AnimList;
|
||||
vector<sBmp> BmpList;
|
||||
CTexGrab TexGrab;
|
||||
int DupCount;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
Loading…
Add table
Add a link
Reference in a new issue