This commit is contained in:
parent
18d0247548
commit
7f6a1a06b9
20 changed files with 283 additions and 154 deletions
|
@ -663,6 +663,28 @@ void Frame::MakeRGBA(u8 * Dest,bool ZeroIsTrans)
|
|||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void Frame::MakeRGB(u8 * Dest)
|
||||
{
|
||||
if (Buffa)
|
||||
{
|
||||
int Area;
|
||||
Area=Width*Height;
|
||||
|
||||
for (int f=0;f<Area;f++)
|
||||
{
|
||||
Dest[f*3+0]=MyPal[Buffa[f]].GetR();
|
||||
Dest[f*3+1]=MyPal[Buffa[f]].GetG();
|
||||
Dest[f*3+2]=MyPal[Buffa[f]].GetB();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
|
|
|
@ -93,6 +93,7 @@ public:
|
|||
void Expand(int BorderWidth,bool DupeEdges);
|
||||
void AddPixelSurround(int Col);
|
||||
|
||||
void MakeRGB(u8 * Dest);
|
||||
void MakeRGBA(u8 * Dest,bool ZeroIsTrans=true);
|
||||
|
||||
Frame(void);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ CTexGrab::~CTexGrab()
|
|||
---------------------------------------------------------------------- */
|
||||
void CTexGrab::Process()
|
||||
{
|
||||
MySprSet.setDebug(DebugFlag);
|
||||
MySprSet.setHalfTpage(m_useHalfTpage);
|
||||
MySprSet.setAnimatedHeader(m_AnimatedHeadersOnly);
|
||||
MySprSet.setDontOutputBoxes(m_DontOutputBoxes);
|
||||
|
|
|
@ -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;
|
||||
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -79,7 +79,7 @@ BSC32=bscmake.exe
|
|||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 opengl32.lib glu32.lib glib.lib ginlib.lib glaux.lib maths.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\libs\ginlib\debug\\" /libpath:"..\libs\glib\debug\\" /libpath:"..\libs\maths\debug\\"
|
||||
# ADD LINK32 opengl32.lib glu32.lib glib.lib ginlib.lib maths.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\libs\ginlib\debug\\" /libpath:"..\libs\glib\debug\\" /libpath:"..\libs\maths\debug\\"
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ sTex &ThisTex=TexCache.GetTex(TexID);
|
|||
int Width=ThisTex.TexWidth/16;
|
||||
int Height=ThisTex.TexHeight/16;
|
||||
|
||||
TRACE3("Load 2d TileBank %s (%i,%i)\n",Filename.FullName(),Width,Height);
|
||||
// TRACE3("Load 2d TileBank %s (%i,%i)\n",Filename.FullName(),Width,Height);
|
||||
|
||||
Tile.push_back(CTile(0)); // Insert Blank
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ public:
|
|||
void Load2d(CCore *Core);
|
||||
void Load3d(CCore *Core);
|
||||
|
||||
const char *GetDrive() {return(Filename.Drive());}
|
||||
const char *GetPath() {return(Filename.Dir());}
|
||||
const char *GetName() {return(Filename.File());}
|
||||
const char *GetExt() {return(Filename.Ext());}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue