This commit is contained in:
Daveo 2000-12-14 16:38:34 +00:00
parent 18d0247548
commit 7f6a1a06b9
20 changed files with 283 additions and 154 deletions

View file

@ -82,7 +82,7 @@ void AllFiles::FileCallback(char const * FName,int FileNum)
for (f=0;f<NewEntrys.size();f++)
FileCallback(NewEntrys[f],0);
cout<<"Read gin file *"<<FName<<"*"<<endl;
if (DebugFlag) cout<<"Read gin file *"<<FName<<"*"<<endl;
}
else
{
@ -108,7 +108,7 @@ void AllFiles::FileCallback(char const * FName,int FileNum)
TheFile.Lower();
MyInfo.SetInfo(TheFile,CrossHair,ThisZeroColZero,MoveUVs,AllowRotate,ShrinkToFit,m_allocateAs16bit);
cout<<"Add image file "<<TheFile<<endl;
if (DebugFlag) cout<<"Add image file "<<TheFile<<endl;
if (ForceOffsets)
MyInfo.SetForceOffsets(XOff,YOff);
@ -144,7 +144,7 @@ void AllFiles::AddMemFrame(char const * FName,Frame &Frame)
TheFile.Lower();
MyInfo.SetInfo(TheFile,CrossHair,ThisZeroColZero,MoveUVs,AllowRotate,ShrinkToFit,m_allocateAs16bit,&Frame);
cout<<"Add MemFrame "<<TheFile<<endl;
if (DebugFlag) cout<<"Add MemFrame "<<TheFile<<endl;
if (ForceOffsets)
MyInfo.SetForceOffsets(XOff,YOff);
@ -194,7 +194,7 @@ void AllFiles::ReadRepFile(char const * Name)
for (int f=0;f<MyItems.size();f++)
AllExternalSharedTextures.push_back(MyItems[f].m_texName);
cout<<"Read report file "<<Name<<endl;
if (DebugFlag) cout<<"Read report file "<<Name<<endl;
}
/*===========================================================================

View file

@ -53,6 +53,7 @@ public:
m_allocateAs16bit=false;
MaxSize=0;
m_noSort=false;
DebugFlag=false;
}
void SetFileRecursion(bool NewRecurseFiles) {RecurseFiles=NewRecurseFiles;}
@ -65,6 +66,7 @@ public:
void SetXOff(int NewXOff) {XOff=NewXOff;}
void SetYOff(int NewYOff) {YOff=NewYOff;}
void SetMaxSize(int New) {MaxSize=New;}
void SetDebug(bool f) {DebugFlag=f;}
int GetMaxSize(void) const {return(MaxSize);}
@ -100,6 +102,7 @@ protected:
FIVec AllFileInfos;
int MaxSize;
bool DebugFlag;
};

View file

@ -65,6 +65,7 @@ CTexGrab::~CTexGrab()
---------------------------------------------------------------------- */
void CTexGrab::Process()
{
MySprSet.setDebug(DebugFlag);
MySprSet.setHalfTpage(m_useHalfTpage);
MySprSet.setAnimatedHeader(m_AnimatedHeadersOnly);
MySprSet.setDontOutputBoxes(m_DontOutputBoxes);

View file

@ -69,6 +69,7 @@ public:
void AllowRotate(bool f) {MyFiles.SetAllowRotate(f);}
void FileRecursion(bool f) {MyFiles.SetFileRecursion(f);}
void NoSort() {MyFiles.setNoSort();}
void SetDebug(bool f) {DebugFlag=f;}
void ReadRepFile(GString String) {MyFiles.ReadRepFile(String);}
@ -114,7 +115,7 @@ protected:
bool m_AnimatedHeadersOnly;
bool m_DontOutputBoxes;
bool m_AlignHeaders;
bool DebugFlag;
std::vector<sTexOutInfo> TexInfo;
};

View file

@ -210,7 +210,7 @@ void SprSet::AddAnm(FileInfo const & ThisInfo)
AddFrame(ThisAnim[f],TempFileInfo);
}
cout<<"Added anim file "<<ThisInfo.GetFileName()<<" ("<<ThisAnim.NumOfFrames()<<" frames)"<<endl;
if (DebugFlag) cout<<"Added anim file "<<ThisInfo.GetFileName()<<" ("<<ThisAnim.NumOfFrames()<<" frames)"<<endl;
}
/*----------------------------------------------------------------------
@ -287,7 +287,7 @@ void SprSet::ProcessPals(void)
AllSprPals[PalIndex].SetPalIndex(PalIndex);
}
cout<<"Found "<<AllSprPals.size()<<" unique pal(s)"<<endl;
if (DebugFlag) cout<<"Found "<<AllSprPals.size()<<" unique pal(s)"<<endl;
}
/*----------------------------------------------------------------------
@ -533,7 +533,7 @@ int FrameCount=AllSprFrames.size();
}
size=int(Out.tellp())-thisPos;
cout<<"size of headers == "<<size<<endl;
if (DebugFlag) cout<<"size of headers == "<<size<<endl;
Out.Align(sizeof(u32));
@ -944,7 +944,7 @@ void SprFrame::SetFrameAndInfo(Frame const & Fr,FileInfo const & NewMyFileInfo,i
cout<<"Reducing frame "<<GetFileInfo()->GetActualFileName()<<endl;
ResizeAndReduce(*this,GetNumOfCols(),float(NewWidth)/float(GetWidth()),float(NewHeight)/float(GetHeight()),MyFileInfo.GetZeroColZero());
#if 1
#if 0
char Name[1024];
static int Val;
sprintf(Name,"c:\\data\\%d.lbm",Val);

View file

@ -515,6 +515,7 @@ public:
{
Vi=NULL;
MaxSize=0;
DebugFlag=false;
}
void SetMaxSize(int New)
@ -549,6 +550,8 @@ public:
void setNoWriteTpages(bool newVal)
{m_noWriteTpages=newVal;}
void setDebug(bool f)
{DebugFlag=f;}
protected:
void WriteHeaderFile(char const * HName);
@ -578,6 +581,7 @@ protected:
bool m_halfTpage;
bool m_compressTpages;
bool m_noWriteTpages;
bool DebugFlag;
SprFrVec AllSprFrames;
SprPalVec AllSprPals;