This commit is contained in:
parent
8cbe787841
commit
bad8fa425e
9 changed files with 44 additions and 138 deletions
|
@ -190,7 +190,7 @@ CFace &F = FaceList[ListSize];
|
|||
int CFaceStore::AddTex(GString const &TexName)
|
||||
{
|
||||
int ListSize=TexList.size();
|
||||
GString UpperName=TexName;
|
||||
GString UpperName=TexBasePath+TexName;
|
||||
UpperName.Upper();
|
||||
|
||||
for (int i=0; i<ListSize; i++)
|
||||
|
@ -209,29 +209,6 @@ sFaceTexList &New=TexList[ListSize];
|
|||
return(New.TexGrabId);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CFaceStore::SetTexBasePath(GString &Path)
|
||||
{
|
||||
TexBasePath=Path;
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CFaceStore::SetTexOut(GString &Name,int TPBase,int TPW,int TPH)
|
||||
{
|
||||
char File[256];
|
||||
sprintf(File,"%s",Name);
|
||||
TexGrab->SetOutFile(File);
|
||||
TexGrab->SetTPage(TPBase,TPW,TPH);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CFaceStore::SetTexDebugOut(GString &Name)
|
||||
{
|
||||
char File[256];
|
||||
sprintf(File,"%s",Name);
|
||||
TexGrab->SetDebugOut(File);
|
||||
}
|
||||
|
||||
//***************************************************************************
|
||||
void CFaceStore::ProcessTextures()
|
||||
{
|
||||
|
@ -272,7 +249,6 @@ void CFaceStore::SetupUV(CFace const &In, sTri &Out)
|
|||
{
|
||||
vector<sTexOutInfo> &TexInfo=TexGrab->GetTexInfo();
|
||||
sTexOutInfo &ThisTex=TexInfo[In.Mat];
|
||||
// printf("Setup UV %s\n",ThisTex.Name);
|
||||
|
||||
int W = ThisTex.w - 1;
|
||||
int H = ThisTex.h - 1;
|
||||
|
|
|
@ -75,11 +75,11 @@ public:
|
|||
|
||||
void SetTexGrab(CTexGrab &NewGrab) {TexGrab=&NewGrab;}
|
||||
int AddTex(GString const &TexName);
|
||||
void SetTexBasePath(GString &Path);
|
||||
void SetTexOut(GString &Name,int TPBase,int TPW,int TPH);
|
||||
void SetTexBasePath(GString &Path) {TexBasePath=Path;}
|
||||
void SetTexOut(GString &Name,int TPBase,int TPW,int TPH) {TexGrab->SetOutFile(Name); TexGrab->SetTPage(TPBase,TPW,TPH);}
|
||||
void SetTexInclude(GString &Name) {TexGrab->SetIncFile(Name);}
|
||||
void SetTexDebug(bool f) {TexGrab->SetDebug(f);}
|
||||
void SetTexDebugOut(GString &Name);
|
||||
void SetTexDebugOut(GString &Name) {TexGrab->SetDebugOut(Name);}
|
||||
void SetTexShrinkToFit(bool f) {TexGrab->ShrinkToFit(f);}
|
||||
void SetTexNoSort() {TexGrab->NoSort();}
|
||||
void SetTexAnimatedHeadersOnly(bool f) {TexGrab->AnimatedHeadersOnly(f);}
|
||||
|
|
|
@ -21,9 +21,6 @@
|
|||
#include <gfname.hpp>
|
||||
#include <pcre.h>
|
||||
|
||||
//#include <ginio.h>
|
||||
//#include <repread.h>
|
||||
|
||||
#include "sprset.h"
|
||||
|
||||
#include "AllFiles.h"
|
||||
|
@ -58,36 +55,6 @@ void AllFiles::FileCallback(char const * FName,int FileNum)
|
|||
GString Ext(FileName.Ext());
|
||||
|
||||
Ext.Lower();
|
||||
/*
|
||||
if (Ext=="gin")
|
||||
{
|
||||
vector<GString> NonSharedTextures;
|
||||
|
||||
CScene MyFile;
|
||||
MyFile.Load(FName);
|
||||
|
||||
MyFile.GetNonSharedTextures(AllExternalSharedTextures,NonSharedTextures);
|
||||
|
||||
|
||||
vector<GString> NewEntrys;
|
||||
|
||||
for (int f=0;f<NonSharedTextures.size();f++)
|
||||
{
|
||||
if (find(UniqueTexturesSoFar.begin(),UniqueTexturesSoFar.end(),NonSharedTextures[f]) == UniqueTexturesSoFar.end())
|
||||
{
|
||||
NewEntrys.push_back(NonSharedTextures[f]);
|
||||
UniqueTexturesSoFar.push_back(NonSharedTextures[f]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (f=0;f<NewEntrys.size();f++)
|
||||
FileCallback(NewEntrys[f],0);
|
||||
|
||||
if (DebugFlag) cout<<"Read gin file *"<<FName<<"*"<<endl;
|
||||
}
|
||||
else
|
||||
*/ {
|
||||
GFName Name(FName);
|
||||
|
||||
if (Name.File()[0]=='+')
|
||||
|
@ -117,7 +84,7 @@ void AllFiles::FileCallback(char const * FName,int FileNum)
|
|||
|
||||
AllFileInfos.resize(AllFileInfos.size()+1);
|
||||
AllFileInfos[AllFileInfos.size()-1]=MyInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int AllFiles::AddMemFrame(char const * FName,Frame &Frame)
|
||||
|
@ -182,24 +149,5 @@ void AllFiles::SortOrder()
|
|||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function: void AllFiles::ReadRepFile(char const * Name)
|
||||
Purpose: Read in rep file for shared textures
|
||||
Params: Name of rep file
|
||||
---------------------------------------------------------------------- */
|
||||
void AllFiles::ReadRepFile(char const * Name)
|
||||
{
|
||||
/*
|
||||
vector<RepItem> MyItems;
|
||||
|
||||
::readRepFile(Name,MyItems);
|
||||
|
||||
for (int f=0;f<MyItems.size();f++)
|
||||
AllExternalSharedTextures.push_back(MyItems[f].m_texName);
|
||||
|
||||
if (DebugFlag) cout<<"Read report file "<<Name<<endl;
|
||||
*/
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
||||
|
|
|
@ -18,18 +18,6 @@
|
|||
Includes
|
||||
-------- */
|
||||
|
||||
//#include <vector>
|
||||
//#include <gtypes.h>
|
||||
//#include <gstring.hpp>
|
||||
//#include <misc.hpp>
|
||||
//#include <gfname.hpp>
|
||||
//#include <pcre.h>
|
||||
|
||||
//#include <ginio.h>
|
||||
//#include <repread.h>
|
||||
|
||||
//#include "sprset.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -78,8 +66,6 @@ public:
|
|||
void SortOrder();
|
||||
int AddFile(const char * Name);
|
||||
int AddMemFrame(char const * FName,Frame &Frame);
|
||||
void ReadRepFile(char const * Name);
|
||||
|
||||
|
||||
protected:
|
||||
vector<GString> UniqueTexturesSoFar;
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
#include <gfname.hpp>
|
||||
#include <pcre.h>
|
||||
|
||||
//#include <ginio.h>
|
||||
//#include <repread.h>
|
||||
|
||||
#include "sprset.h"
|
||||
#include "allfiles.h"
|
||||
|
||||
|
@ -71,8 +68,6 @@ public:
|
|||
void NoSort() {MyFiles.setNoSort();}
|
||||
void SetDebug(bool f) {DebugFlag=f;}
|
||||
|
||||
void ReadRepFile(GString String) {MyFiles.ReadRepFile(String);}
|
||||
|
||||
void CrossHair(bool f) {MyFiles.SetCrossHair(f);}
|
||||
void ZeroColZero(bool f) {MyFiles.SetZeroColZero(f);}
|
||||
void MoveUVs(bool f) {MyFiles.SetMoveUVs(f);}
|
||||
|
|
|
@ -203,6 +203,7 @@ int ListSize=Skel.size();
|
|||
sGinSkel &ThisBone=Skel[i];
|
||||
int VtxStart=FaceList.GetVtxCount();
|
||||
int FaceListSize=ThisBone.FaceList.GetFaceCount();
|
||||
|
||||
if (FaceListSize)
|
||||
{
|
||||
ThisBone.Bone.TriStart=FaceList.GetFaceCount();
|
||||
|
@ -234,15 +235,15 @@ int ListSize=Skel.size();
|
|||
//***************************************************************************
|
||||
void CMkActor3d::Process()
|
||||
{
|
||||
ProcessSkel(1,-1);
|
||||
BuildSkelOut();
|
||||
printf("Skel has %i bones\n",Skel.size());
|
||||
|
||||
FaceList.SetTexBasePath(InPath);
|
||||
FaceList.SetTexOut(OutFile+".Tex",TPageBase,TPageWidth,TPageHeight);
|
||||
FaceList.SetTexDebugOut(OutFile+".Lbm");
|
||||
if (!IncludeFile.Empty()) FaceList.SetTexInclude(IncludeFile);
|
||||
|
||||
ProcessSkel(1,-1);
|
||||
BuildSkelOut();
|
||||
printf("Skel has %i bones\n",Skel.size());
|
||||
|
||||
int ListSize=ExtraTex.size();
|
||||
for (int i=0; i<ListSize; i++)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,6 @@ private:
|
|||
|
||||
CFaceStore FaceList;
|
||||
|
||||
CTexGrab TexGrab;
|
||||
sActor3dHdr FileHdr;
|
||||
FILE *File;
|
||||
|
||||
|
|
|
@ -298,6 +298,7 @@ int ListSize=AnimList.size();
|
|||
fprintf(File,",\n");
|
||||
}
|
||||
|
||||
fprintf(File,"\tNUM_ANIM_%s",Name.File());
|
||||
fprintf(File,"};\n");
|
||||
fprintf(File,"\n");
|
||||
fprintf(File,"#endif\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue