diff --git a/Utils/MkActor/MkActor.cpp b/Utils/MkActor/MkActor.cpp index 9d21431fd..11465bdf8 100644 --- a/Utils/MkActor/MkActor.cpp +++ b/Utils/MkActor/MkActor.cpp @@ -18,7 +18,7 @@ using namespace std; //#define OutputTGA // This has got really messy :o( - + //*************************************************************************** vector ActorList; int TPBase=-1,TPWidth=-1,TPHeight=-1; @@ -289,6 +289,14 @@ int i,ListSize=AnimList.size(); //*************************************************************************** void CMkActor::MakePsxGfx(sBmp &Bmp) { +// capture blank frames + if (Bmp.Frm.IsBlank()) + { + Bmp.Psx=0; + Bmp.PsxSize=0; + return; + } + // Copied from SprSet int nfW,nfH,nfLineWidthBytes,nfAreaBytes; Frame Frm=Bmp.Frm; @@ -393,7 +401,7 @@ u8 *RGB0,*RGB1; } //*************************************************************************** -void CMkActor::CheckAndShrinkFrame(sBmp &Bmp) +void CMkActor::CheckAndShrinkFrame(sBmp &Bmp,const char *FrameName) { // Check Colors int ColorCount=Bmp.Frm.GetNumOfCols(); @@ -401,6 +409,24 @@ int ColorCount=Bmp.Frm.GetNumOfCols(); { GObject::Error(ERR_FATAL,"%s has %i colors.\n",Name,ColorCount); } +// Check Palette + if (BmpList.size()) + { + Palette &BasePal=BmpList[0].Frm.GetPal(); + Palette &ThisPal=Bmp.Frm.GetPal(); + int Count=__min(BasePal.GetNumOfCols(),ThisPal.GetNumOfCols()); + + for (int p=1;pAnimList+Anim; CurrentFrame=&ThisAnim->Anim[Frame]; CurrentFrameGfx=&SpriteBank->FrameList[CurrentFrame->FrameIdx]; + if (!CurrentFrameGfx->PAKSpr) return(0); // Blank Frame + // Try to find Pre-cached sprite ThisNode=0; // Check Local Cache