This commit is contained in:
parent
17b465b50e
commit
d7c8979f64
4 changed files with 168 additions and 136 deletions
|
@ -33,26 +33,26 @@ Class21=CMapEditDoc
|
||||||
Class22=CMapEditView
|
Class22=CMapEditView
|
||||||
|
|
||||||
ResourceCount=20
|
ResourceCount=20
|
||||||
Resource1=IDD_ADDLAYER
|
Resource1=IDD_LAYER_PLATFORM
|
||||||
Resource2=IDD_LAYER_PLATFORM
|
Resource2=IDD_ADDLAYER
|
||||||
Resource3=IDR_TOOLBAR (English (U.S.))
|
Resource3=IDD_TOOLBAR
|
||||||
Resource4=IDR_MAPEDITYPE (English (U.S.))
|
Resource4=IDR_MAPEDITYPE (English (U.S.))
|
||||||
Resource5=IDD_NEWMAP
|
Resource5=IDD_LAYER_THING_POS
|
||||||
Resource6=IDD_TOOLBAR
|
Resource6=IDR_TOOLBAR (English (U.S.))
|
||||||
Resource7=IDD_LAYER_LIST
|
Resource7=IDD_LAYER_ACTOR
|
||||||
Resource8=IDD_LAYER_ACTOR
|
Resource8=IDD_LAYER_LIST
|
||||||
Resource9=IDD_ELEMLIST
|
Resource9=IDD_MULTIBAR (English (U.S.))
|
||||||
Resource10=IDD_RESIZE
|
Resource10=IDD_LAYER_THING
|
||||||
Resource11=IDD_TILEBANK
|
Resource11=IDD_LAYER_TRIGGER
|
||||||
Resource12=IDD_LAYER_THING_POS
|
Resource12=IDD_NEWMAP
|
||||||
Resource13=IDD_LAYER_TRIGGER
|
Resource13=IDD_TILEBANK
|
||||||
Resource14=IDD_LAYER_SHADE
|
Resource14=IDR_MAINFRAME (English (U.S.))
|
||||||
Resource15=IDD_LAYER_COLLISION
|
Resource15=IDD_ABOUTBOX (English (U.S.))
|
||||||
Resource16=IDD_ABOUTBOX (English (U.S.))
|
Resource16=IDD_LAYER_COLLISION
|
||||||
Resource17=IDD_MULTIBAR (English (U.S.))
|
Resource17=IDD_ELEMLIST
|
||||||
Resource18=IDR_MAINFRAME (English (U.S.))
|
Resource18=IDD_LAYER_SHADE
|
||||||
Class23=CGUILayerTrigger
|
Class23=CGUILayerTrigger
|
||||||
Resource19=IDD_LAYER_THING
|
Resource19=IDD_RESIZE
|
||||||
Class24=CGUILayerFX
|
Class24=CGUILayerFX
|
||||||
Resource20=IDD_LAYER_FX
|
Resource20=IDD_LAYER_FX
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,10 @@
|
||||||
#include <pak.h>
|
#include <pak.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
//#define CheckDups 1
|
|
||||||
//#define OutputTGA
|
//#define OutputTGA
|
||||||
|
|
||||||
|
// This has got really messy :o(
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
vector<CMkActor> ActorList;
|
vector<CMkActor> ActorList;
|
||||||
int TPBase=-1,TPWidth=-1,TPHeight=-1;
|
int TPBase=-1,TPWidth=-1,TPHeight=-1;
|
||||||
|
@ -28,24 +29,6 @@ GString SpritePath;
|
||||||
GString OutPath;
|
GString OutPath;
|
||||||
GString IncludePath;
|
GString IncludePath;
|
||||||
|
|
||||||
//***************************************************************************
|
|
||||||
void RepAlign(FILE *File,char *Txt=0)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
int Align=ftell(File)&3;
|
|
||||||
|
|
||||||
if (Align)
|
|
||||||
{
|
|
||||||
if (Txt)
|
|
||||||
printf("%s MisAlign %i\n",Txt,Align);
|
|
||||||
else
|
|
||||||
printf("%s MisAlign %i\n","File",Align);
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
PadFile(File);
|
|
||||||
}
|
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
char * CycleCommands(char *String,int Num)
|
char * CycleCommands(char *String,int Num)
|
||||||
{
|
{
|
||||||
|
@ -165,6 +148,8 @@ CMkActor::CMkActor(GString &ActorName,GString &ActorPath,GString &SpritePath)
|
||||||
TexGrab.AllowRotate(false);
|
TexGrab.AllowRotate(false);
|
||||||
|
|
||||||
DupCount=0;
|
DupCount=0;
|
||||||
|
MaxW=0;
|
||||||
|
MaxH=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
@ -263,8 +248,11 @@ GString Filename;
|
||||||
_finddata_t Find;
|
_finddata_t Find;
|
||||||
long FileHandle;
|
long FileHandle;
|
||||||
int Error=0;
|
int Error=0;
|
||||||
|
GString BaseName=Name+"_"+ThisAnim.Name;
|
||||||
|
int BaseLen=strlen(BaseName);
|
||||||
|
|
||||||
|
Filename=SpriteDir+BaseName+"*.bmp";
|
||||||
|
|
||||||
Filename=SpriteDir+Name+"_"+ThisAnim.Name+"*.bmp";
|
|
||||||
if( (FileHandle= _findfirst( Filename, &Find)) == -1L )
|
if( (FileHandle= _findfirst( Filename, &Find)) == -1L )
|
||||||
{
|
{
|
||||||
GObject::Error(ERR_WARNING,"Cant find Anim %s.\n",ThisAnim.Name);
|
GObject::Error(ERR_WARNING,"Cant find Anim %s.\n",ThisAnim.Name);
|
||||||
|
@ -275,7 +263,11 @@ int Error=0;
|
||||||
{
|
{
|
||||||
sFrame NewFrame;
|
sFrame NewFrame;
|
||||||
NewFrame.Filename=Find.name;
|
NewFrame.Filename=Find.name;
|
||||||
ThisAnim.Frames.push_back(NewFrame);
|
char c=NewFrame.Filename[BaseLen];
|
||||||
|
if (c>='0' && c<='9')
|
||||||
|
{
|
||||||
|
ThisAnim.Frames.push_back(NewFrame);
|
||||||
|
}
|
||||||
|
|
||||||
Error=_findnext( FileHandle, &Find);
|
Error=_findnext( FileHandle, &Find);
|
||||||
}
|
}
|
||||||
|
@ -310,19 +302,8 @@ void CMkActor::LoadFrame(sFrame &ThisFrame,bool VRamFlag)
|
||||||
void CMkActor::MakePsxGfx(sBmp &Bmp)
|
void CMkActor::MakePsxGfx(sBmp &Bmp)
|
||||||
{
|
{
|
||||||
// Copied from SprSet
|
// Copied from SprSet
|
||||||
// apparantly only works on 16 colors, so I gotta watch it!!
|
|
||||||
int AlignPixels=4;
|
|
||||||
int nfW,nfH,nfLineWidthBytes,nfAreaBytes;
|
int nfW,nfH,nfLineWidthBytes,nfAreaBytes;
|
||||||
Frame &Frm=Bmp.Bmp;
|
Frame Frm=Bmp.Bmp;
|
||||||
Rect OriginalRect;
|
|
||||||
|
|
||||||
OriginalRect=Frm;
|
|
||||||
|
|
||||||
OriginalRect.X=0;
|
|
||||||
OriginalRect.Y=0;
|
|
||||||
OriginalRect.W=GU_AlignVal(OriginalRect.W,AlignPixels);
|
|
||||||
|
|
||||||
Frm.Crop(OriginalRect);
|
|
||||||
|
|
||||||
nfW=Frm.GetWidth();
|
nfW=Frm.GetWidth();
|
||||||
nfH=Frm.GetHeight();
|
nfH=Frm.GetHeight();
|
||||||
|
@ -330,6 +311,8 @@ Rect OriginalRect;
|
||||||
nfAreaBytes=nfLineWidthBytes*nfH;
|
nfAreaBytes=nfLineWidthBytes*nfH;
|
||||||
Bmp.PsxSize=nfAreaBytes;
|
Bmp.PsxSize=nfAreaBytes;
|
||||||
|
|
||||||
|
if (nfW>MaxW) MaxW=nfW;
|
||||||
|
if (nfH>MaxH) MaxH=nfH;
|
||||||
Bmp.Psx=(u8*)malloc(nfAreaBytes+16);
|
Bmp.Psx=(u8*)malloc(nfAreaBytes+16);
|
||||||
ASSERT(Bmp.Psx);
|
ASSERT(Bmp.Psx);
|
||||||
|
|
||||||
|
@ -360,103 +343,58 @@ Rect OriginalRect;
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
int CMkActor::LoadBmp(GString &Name,bool VRamFlag)
|
int CMkActor::FindDup(sBmp &Bmp)
|
||||||
{
|
{
|
||||||
GString Filename=SpriteDir+Name;
|
int i,BmpListSize=BmpList.size();
|
||||||
|
int Size=Bmp.Bmp.GetWidth()*Bmp.Bmp.GetHeight();
|
||||||
int BmpListSize=BmpList.size();
|
|
||||||
sBmp NewBmp;
|
|
||||||
SprFrame &NewFrame=NewBmp.Bmp;
|
|
||||||
FileInfo ThisInfo;
|
|
||||||
|
|
||||||
// ThisInfo.SetInfo(name, CrossHair, ThisZeroColZero, MoveUVs, AllowRotate, ShrinkToFit, m_allocateAs16bit);
|
|
||||||
ThisInfo.SetInfo(Filename, false, true, false, false, true, false);
|
|
||||||
|
|
||||||
NewBmp.RGB=0;
|
|
||||||
NewBmp.Pak=0;
|
|
||||||
NewBmp.Psx=0;
|
|
||||||
NewBmp.VRamFlag=VRamFlag;
|
|
||||||
|
|
||||||
NewFrame.LoadBMP(Filename);
|
|
||||||
int ColorCount=NewFrame.GetNumOfCols();
|
|
||||||
if (ColorCount>16)
|
|
||||||
{
|
|
||||||
GObject::Error(ERR_WARNING,"%s has %i colors.\n",Name,ColorCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CheckDups
|
|
||||||
int Size=NewFrame.GetWidth()*NewFrame.GetHeight();
|
|
||||||
NewBmp.RGB=(u8*)malloc(Size*3);
|
|
||||||
ASSERT(NewBmp.RGB);
|
|
||||||
NewFrame.MakeRGB(NewBmp.RGB);
|
|
||||||
|
|
||||||
|
Bmp.RGB=(u8*)malloc(Size*3);
|
||||||
|
ASSERT(Bmp.RGB);
|
||||||
|
Bmp.Bmp.MakeRGB(Bmp.RGB);
|
||||||
// Check for dups (Broken at the mo, ah well)
|
// Check for dups (Broken at the mo, ah well)
|
||||||
// Gen Chksum
|
// Gen Chksum
|
||||||
u8 *RGB=NewBmp.RGB;
|
|
||||||
NewBmp.ChkR=NewBmp.ChkG=NewBmp.ChkB=0;
|
u8 *RGB=Bmp.RGB;
|
||||||
|
Bmp.ChkR=Bmp.ChkG=Bmp.ChkB=0;
|
||||||
for (i=0; i<Size; i++)
|
for (i=0; i<Size; i++)
|
||||||
{
|
{
|
||||||
NewBmp.ChkR+=*RGB++;
|
Bmp.ChkR+=*RGB++;
|
||||||
NewBmp.ChkG+=*RGB++;
|
Bmp.ChkG+=*RGB++;
|
||||||
NewBmp.ChkB+=*RGB++;
|
Bmp.ChkB+=*RGB++;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Idx=-1;
|
|
||||||
// Find existing
|
// Find existing
|
||||||
for (int i=0; i<BmpListSize && Idx==-1; i++)
|
for (i=0; i<BmpListSize; i++)
|
||||||
{
|
{
|
||||||
sBmp &ThisBmp=BmpList[i];
|
sBmp &ThisBmp=BmpList[i];
|
||||||
// if (ThisBmp.ChkR==NewBmp.ChkR && ThisBmp.ChkG==NewBmp.ChkG && ThisBmp.ChkB==NewBmp.ChkB)
|
ASSERT(Bmp.RGB);
|
||||||
|
ASSERT(ThisBmp.RGB);
|
||||||
|
if (IsImageSame(ThisBmp,Bmp))
|
||||||
{
|
{
|
||||||
if (IsImageSame(ThisBmp,NewBmp)) Idx=i;
|
free(Bmp.RGB);
|
||||||
|
return(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Idx!=-1)
|
return(-1);
|
||||||
{
|
|
||||||
DupCount++;
|
|
||||||
free(NewBmp.RGB);
|
|
||||||
return(Idx);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
BmpList.push_back(NewBmp);
|
|
||||||
BmpList[BmpListSize].Bmp.SetFrameAndInfo(BmpList[BmpListSize].Bmp,ThisInfo,0);
|
|
||||||
MakePsxGfx(BmpList[BmpListSize]);
|
|
||||||
|
|
||||||
|
|
||||||
#if _DEBUG && defined(OutputTGA)
|
|
||||||
{
|
|
||||||
Frame &OutF=BmpList[BmpListSize].Bmp;
|
|
||||||
u8 *TGA=(u8*)malloc(OutF.GetWidth()*OutF.GetHeight()*3);
|
|
||||||
ASSERT(TGA);
|
|
||||||
OutF.FlipY();
|
|
||||||
OutF.MakeRGB(TGA);
|
|
||||||
OutF.FlipY();
|
|
||||||
|
|
||||||
char OutName[256];
|
|
||||||
sprintf(OutName,"\\x\\%s.tga",Name);
|
|
||||||
SaveTGA(OutName,OutF.GetWidth(),OutF.GetHeight(),TGA,true);
|
|
||||||
free(TGA);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return(BmpListSize);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
bool CMkActor::IsImageSame(sBmp &Bmp0,sBmp &Bmp1)
|
bool CMkActor::IsImageSame(sBmp &Bmp0,sBmp &Bmp1)
|
||||||
{
|
{
|
||||||
int W0=Bmp0.Bmp.GetOrigW();
|
int W0,H0,W1,H1,Size;
|
||||||
int H0=Bmp0.Bmp.GetOrigH();
|
u8 *RGB0,*RGB1;
|
||||||
int W1=Bmp1.Bmp.GetOrigW();
|
|
||||||
int H1=Bmp1.Bmp.GetOrigH();
|
if (Bmp0.ChkR!=Bmp1.ChkR || Bmp0.ChkG!=Bmp1.ChkG || Bmp0.ChkB!=Bmp1.ChkB) return(false);
|
||||||
int Size=W0*H0*3;
|
W0=Bmp0.Bmp.GetWidth();
|
||||||
u8 *RGB0=Bmp0.RGB;
|
H0=Bmp0.Bmp.GetHeight();
|
||||||
u8 *RGB1=Bmp1.RGB;
|
W1=Bmp1.Bmp.GetWidth();
|
||||||
|
H1=Bmp1.Bmp.GetHeight();
|
||||||
|
|
||||||
if (W0!=W1 || H0!=H1) return(false);
|
if (W0!=W1 || H0!=H1) return(false);
|
||||||
|
Size=W0*H0*3;
|
||||||
|
RGB0=Bmp0.RGB;
|
||||||
|
RGB1=Bmp1.RGB;
|
||||||
for (int i=0; i<Size; i++)
|
for (int i=0; i<Size; i++)
|
||||||
{
|
{
|
||||||
if (*RGB0++!=*RGB1++) return(false);
|
if (*RGB0++!=*RGB1++) return(false);
|
||||||
|
@ -465,6 +403,89 @@ u8 *RGB1=Bmp1.RGB;
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//***************************************************************************
|
||||||
|
// Shrink frame to extents, aligned for 4 pixels (needed?)
|
||||||
|
void CMkActor::SetAndShrinkFrame(GString &Filename,Frame &Src, SprFrame &Dst)
|
||||||
|
{
|
||||||
|
FileInfo ThisInfo;
|
||||||
|
Rect OriginalRect;
|
||||||
|
|
||||||
|
// Check Colors
|
||||||
|
int ColorCount=Src.GetNumOfCols();
|
||||||
|
if (ColorCount>16)
|
||||||
|
{
|
||||||
|
GObject::Error(ERR_FATAL,"%s has %i colors.\n",Name,ColorCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ThisInfo.SetInfo(name, CrossHair, ThisZeroColZero, MoveUVs, AllowRotate, ShrinkToFit, m_allocateAs16bit);
|
||||||
|
ThisInfo.SetInfo(Filename, false, true, false, false, true, false);
|
||||||
|
|
||||||
|
// Copy Frame
|
||||||
|
Dst.SetFrameAndInfo(Src,ThisInfo,0);
|
||||||
|
// Align Frame
|
||||||
|
|
||||||
|
OriginalRect=Src;
|
||||||
|
OriginalRect.X=0;
|
||||||
|
OriginalRect.Y=0;
|
||||||
|
OriginalRect.W=GU_AlignVal(OriginalRect.W,4);
|
||||||
|
|
||||||
|
Dst.Crop(OriginalRect);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//***************************************************************************
|
||||||
|
int CMkActor::LoadBmp(GString &Name,bool VRamFlag)
|
||||||
|
{
|
||||||
|
GString Filename=SpriteDir+Name;
|
||||||
|
int BmpListSize=BmpList.size();
|
||||||
|
sBmp NewBmp;
|
||||||
|
Frame NewFrame;
|
||||||
|
|
||||||
|
// Init Frame
|
||||||
|
NewBmp.RGB=0;
|
||||||
|
NewBmp.Pak=0;
|
||||||
|
NewBmp.Psx=0;
|
||||||
|
NewBmp.VRamFlag=VRamFlag;
|
||||||
|
|
||||||
|
// Load frame
|
||||||
|
NewFrame.LoadBMP(Filename);
|
||||||
|
SetAndShrinkFrame(Filename,NewFrame,NewBmp.Bmp);
|
||||||
|
|
||||||
|
// Check Dups
|
||||||
|
int Idx=FindDup(NewBmp);
|
||||||
|
|
||||||
|
if (Idx!=-1)
|
||||||
|
{
|
||||||
|
DupCount++;
|
||||||
|
return(Idx);
|
||||||
|
}
|
||||||
|
// Its unique, add to list
|
||||||
|
BmpList.push_back(NewBmp);
|
||||||
|
|
||||||
|
MakePsxGfx(BmpList[BmpListSize]);
|
||||||
|
|
||||||
|
#if _DEBUG && defined(OutputTGA)
|
||||||
|
void WriteTGA(GString Name,Frame Frm);
|
||||||
|
WriteTGA(Name,NewBmp.Bmp);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return(BmpListSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
//***************************************************************************
|
||||||
|
void WriteTGA(GString Name,Frame Frm)
|
||||||
|
{
|
||||||
|
u8 *TGA=(u8*)malloc(Frm.GetWidth()*Frm.GetHeight()*3);
|
||||||
|
ASSERT(TGA);
|
||||||
|
Frm.FlipY();
|
||||||
|
Frm.MakeRGB(TGA);
|
||||||
|
|
||||||
|
char OutName[256];
|
||||||
|
sprintf(OutName,"\\x\\%s.tga",Name);
|
||||||
|
SaveTGA(OutName,Frm.GetWidth(),Frm.GetHeight(),TGA,true);
|
||||||
|
free(TGA);
|
||||||
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
@ -513,16 +534,16 @@ GString OutName=OutFile+".SBK";
|
||||||
|
|
||||||
// Write Dummy Hdr
|
// Write Dummy Hdr
|
||||||
fwrite(&FileHdr,1,sizeof(sSpriteAnimBank),File);
|
fwrite(&FileHdr,1,sizeof(sSpriteAnimBank),File);
|
||||||
RepAlign(File,"MainHeader");
|
PadFile(File);
|
||||||
// Write Palette
|
// Write Palette
|
||||||
FileHdr.Palette=(u8*)WritePalette();
|
FileHdr.Palette=(u8*)WritePalette();
|
||||||
RepAlign(File,"PaletteHdr");
|
PadFile(File);
|
||||||
// Write AnimList
|
// Write AnimList
|
||||||
FileHdr.AnimList=(sSpriteAnim*)WriteAnimList();
|
FileHdr.AnimList=(sSpriteAnim*)WriteAnimList();
|
||||||
RepAlign(File,"AnimListHdr");
|
PadFile(File);
|
||||||
// Write FrameList
|
// Write FrameList
|
||||||
FileHdr.FrameList=(sSpriteFrame*)WriteFrameList();
|
FileHdr.FrameList=(sSpriteFrame*)WriteFrameList();
|
||||||
// RepAlign(File,"FrameHdr");
|
// PadFile(File);
|
||||||
|
|
||||||
// Rewrite Header
|
// Rewrite Header
|
||||||
fseek(File, 0, SEEK_SET);
|
fseek(File, 0, SEEK_SET);
|
||||||
|
@ -575,7 +596,7 @@ vector<sSpriteAnim> Hdrs;
|
||||||
{
|
{
|
||||||
fwrite(&Hdrs[i],1,sizeof(sSpriteAnim),File);
|
fwrite(&Hdrs[i],1,sizeof(sSpriteAnim),File);
|
||||||
}
|
}
|
||||||
RepAlign(File,"AnimListHdr");
|
PadFile(File);
|
||||||
|
|
||||||
// Write Frame Lists
|
// Write Frame Lists
|
||||||
for (i=0; i<AnimCount; i++)
|
for (i=0; i<AnimCount; i++)
|
||||||
|
@ -592,7 +613,7 @@ vector<sSpriteAnim> Hdrs;
|
||||||
u16 FrameNo=ThisFrame.FrameIdx;
|
u16 FrameNo=ThisFrame.FrameIdx;
|
||||||
fwrite(&FrameNo,1,sizeof(u16),File);
|
fwrite(&FrameNo,1,sizeof(u16),File);
|
||||||
}
|
}
|
||||||
RepAlign(File,"AnimIdx");
|
PadFile(File);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -616,13 +637,15 @@ int i,FrameCount=BmpList.size();
|
||||||
vector<sSpriteFrame> Hdrs;
|
vector<sSpriteFrame> Hdrs;
|
||||||
|
|
||||||
// Write Dummy Hdrs
|
// Write Dummy Hdrs
|
||||||
|
FileHdr.MaxW=MaxW;
|
||||||
|
FileHdr.MaxH=MaxH;
|
||||||
FileHdr.FrameCount=FrameCount;
|
FileHdr.FrameCount=FrameCount;
|
||||||
Hdrs.resize(FrameCount);
|
Hdrs.resize(FrameCount);
|
||||||
for (i=0; i<FrameCount; i++)
|
for (i=0; i<FrameCount; i++)
|
||||||
{
|
{
|
||||||
fwrite(&Hdrs[i],1,sizeof(sSpriteFrame),File);
|
fwrite(&Hdrs[i],1,sizeof(sSpriteFrame),File);
|
||||||
}
|
}
|
||||||
RepAlign(File,"FrameListHdr");
|
PadFile(File);
|
||||||
|
|
||||||
// Write Frame Lists
|
// Write Frame Lists
|
||||||
for (i=0; i<FrameCount; i++)
|
for (i=0; i<FrameCount; i++)
|
||||||
|
@ -695,4 +718,10 @@ int ListSize=AnimList.size();
|
||||||
|
|
||||||
fclose(File);
|
fclose(File);
|
||||||
}
|
}
|
||||||
//
|
|
||||||
|
|
||||||
|
//platform length on bio dome - collision fix
|
||||||
|
//flying things
|
||||||
|
//platform gfx
|
||||||
|
//look up & down
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ CFG=MkActor - Win32 Debug
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""$/Utils/MkActor", TGVAAAAA"
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath "."
|
||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
|
|
|
@ -50,10 +50,12 @@ private:
|
||||||
void ReadScript(const char *Filename,vector<GString> &List);
|
void ReadScript(const char *Filename,vector<GString> &List);
|
||||||
void BuildFrameList();
|
void BuildFrameList();
|
||||||
void FindFrames(sAnim &ThisAnim);
|
void FindFrames(sAnim &ThisAnim);
|
||||||
|
int FindDup(sBmp &Frm);
|
||||||
|
|
||||||
void LoadFrameList();
|
void LoadFrameList();
|
||||||
void LoadFrame(sFrame &ThisFrame,bool VRamFlag);
|
void LoadFrame(sFrame &ThisFrame,bool VRamFlag);
|
||||||
int LoadBmp(GString &Name,bool VRamFlag);
|
int LoadBmp(GString &Name,bool VRamFlag);
|
||||||
|
void SetAndShrinkFrame(GString &Filename,Frame &Src,SprFrame &Dst);
|
||||||
bool IsImageSame(sBmp &Bmp0,sBmp &Bmp1);
|
bool IsImageSame(sBmp &Bmp0,sBmp &Bmp1);
|
||||||
void MakePsxGfx(sBmp &Bmp);
|
void MakePsxGfx(sBmp &Bmp);
|
||||||
void ProcessFrames();
|
void ProcessFrames();
|
||||||
|
@ -74,6 +76,7 @@ private:
|
||||||
vector<sBmp> BmpList;
|
vector<sBmp> BmpList;
|
||||||
CTexGrab TexGrab;
|
CTexGrab TexGrab;
|
||||||
int DupCount;
|
int DupCount;
|
||||||
|
int MaxW,MaxH;
|
||||||
};
|
};
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue