This commit is contained in:
parent
7551b4f12e
commit
8788076d39
37 changed files with 11186 additions and 0 deletions
134
Utils/Libs/TexGrab/TexGrab.cpp
Normal file
134
Utils/Libs/TexGrab/TexGrab.cpp
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*=========================================================================
|
||||
|
||||
TexGrab.CPP
|
||||
|
||||
Author: Dave @ Fareham (based on work by Gary Liddon)
|
||||
Created: 011200
|
||||
Project: SpongeBob
|
||||
Purpose: Main file for the new TexGrab lib, based on ParkGrab
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
-------- */
|
||||
|
||||
#include "TexGrab.h"
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function Prototypes
|
||||
------------------- */
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Vars
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Data
|
||||
---- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
CTexGrab::CTexGrab()
|
||||
{
|
||||
m_PagePlacements=false;
|
||||
m_compressTpages=false;
|
||||
m_noWriteTpages=false;
|
||||
m_useHalfTpage=false;
|
||||
m_AnimatedHeadersOnly=false;
|
||||
m_DontOutputBoxes=false;
|
||||
m_AlignHeaders=false;
|
||||
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
CTexGrab::~CTexGrab()
|
||||
{
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CTexGrab::Process()
|
||||
{
|
||||
SprSet MySprSet;
|
||||
|
||||
MySprSet.setHalfTpage(m_useHalfTpage);
|
||||
MySprSet.setAnimatedHeader(m_AnimatedHeadersOnly);
|
||||
MySprSet.setDontOutputBoxes(m_DontOutputBoxes);
|
||||
MySprSet.setAlignHeaders(m_AlignHeaders);
|
||||
MySprSet.setCompressTpages(m_compressTpages);
|
||||
MySprSet.setNoWriteTpages(m_noWriteTpages);
|
||||
|
||||
MyFiles.SortOrder();
|
||||
|
||||
if (MyFiles.GetMaxSize())
|
||||
MySprSet.SetMaxSize(MyFiles.GetMaxSize());
|
||||
|
||||
MySprSet.AddFiles(MyFiles.GetFileInfoVector());
|
||||
|
||||
if (m_IncOutFile)
|
||||
MySprSet.SetIncOutFile(m_IncOutFile);
|
||||
|
||||
if (m_SprFile)
|
||||
MySprSet.WriteSprFile(m_SprFile);
|
||||
|
||||
if (m_OutFile)
|
||||
{
|
||||
if (m_PagePlacements)
|
||||
{
|
||||
MySprSet.Write(m_OutFile,m_PageBase,m_WidthPages,m_HeightPages);
|
||||
|
||||
if (m_OutLbm)
|
||||
MySprSet.WriteLBM(m_OutLbm);
|
||||
|
||||
if (m_ReportFile)
|
||||
MySprSet.WriteReport(m_ReportFile);
|
||||
|
||||
if (m_rawTpageFile)
|
||||
MySprSet.writeRawTPage(m_rawTpageFile);
|
||||
|
||||
}
|
||||
else
|
||||
GObject::Error(ERR_FATAL,"-t option hasn't been specified");
|
||||
}
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function: void CTexGrab::AddFile(char *Name)
|
||||
Purpose: Add bitmaps to file list
|
||||
Params: Name = Filename
|
||||
---------------------------------------------------------------------- */
|
||||
void CTexGrab::AddFile(char *Name)
|
||||
{
|
||||
GString UpperName(Name);
|
||||
|
||||
UpperName.Upper();
|
||||
|
||||
MyFiles.AddFile(UpperName);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
|
||||
/*===========================================================================
|
||||
end */
|
Loading…
Add table
Add a link
Reference in a new issue