\section{fl\-Texture\-TGA.c File Reference}
\label{flTextureTGA_8c}\index{flTextureTGA.c@{flTextureTGA.c}}
{\tt \#include \char`\"{}fl\-Global.h\char`\"{}}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$pspgu.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct {\bf tga\-File\-Header}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
{\bf Texture} $\ast$ {\bf tex\-Load\-TGA} (char $\ast$in\-Path)
\begin{CompactList}\small\item\em Loads a tga image into a \doxyref{Texture}{p.}{structTexture} struct. \item\end{CompactList}\item 
{\bf bool} {\bf tex\-Save\-TGA} ({\bf Texture} $\ast$in\-Tex, char $\ast$in\-Path)
\begin{CompactList}\small\item\em Saves a tga image from a \doxyref{Texture}{p.}{structTexture} struct. \item\end{CompactList}\end{CompactItemize}


\subsection{Function Documentation}
\index{flTextureTGA.c@{fl\-Texture\-TGA.c}!texLoadTGA@{texLoadTGA}}
\index{texLoadTGA@{texLoadTGA}!flTextureTGA.c@{fl\-Texture\-TGA.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Texture}$\ast$ tex\-Load\-TGA (char $\ast$ {\em in\-Path})}\label{flTextureTGA_8c_757f945346a9fc4bb04553cf7735a452}


Loads a tga image into a \doxyref{Texture}{p.}{structTexture} struct. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em in\-Path}]Path to the tga image in memory or file. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A pointer to the texture struct created to hold the tga, or NULL on failure. \end{Desc}
\begin{Desc}
\item[Warning:]Currently 16-bit tga's are not properly supported however all others are, including RLE. \end{Desc}


Definition at line 33 of file fl\-Texture\-TGA.c.

References debug\-Error, FILE\_\-MODE\_\-BINARY, FILE\_\-MODE\_\-READ, FILE\_\-SEEK\_\-CUR, file\-Close(), file\-Open(), file\-Read(), file\-Seek(), NULL, pal\-Create(), Palette::pal\-Data, pal\-Grayscale\-T8(), Palette::pal\-Pixel\-Format, tga\-File\-Header::tga\-BPP, tga\-File\-Header::tga\-Descriptor, tga\-File\-Header::tga\-Height, tga\-File\-Header::tga\-Ident\-Size, tga\-File\-Header::tga\-Image\-Type, tga\-File\-Header::tga\-Palette\-BPP, tga\-File\-Header::tga\-Palette\-Len, tga\-File\-Header::tga\-Palette\-Start, tga\-File\-Header::tga\-Palette\-Type, tga\-File\-Header::tga\-Width, tga\-File\-Header::tga\-XStart, and tga\-File\-Header::tga\-YStart.

Referenced by tex\-Load().\index{flTextureTGA.c@{fl\-Texture\-TGA.c}!texSaveTGA@{texSaveTGA}}
\index{texSaveTGA@{texSaveTGA}!flTextureTGA.c@{fl\-Texture\-TGA.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf bool} tex\-Save\-TGA ({\bf Texture} $\ast$ {\em in\-Tex}, char $\ast$ {\em in\-Path})}\label{flTextureTGA_8c_04d04c99bfc1071df2b7e326d8ed528c}


Saves a tga image from a \doxyref{Texture}{p.}{structTexture} struct. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em in\-Tex}]The texture to save as a tga. \item[{\em in\-Path}]Path to the file to which the tga image will be written. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Whether the tga was saved successfully or not. \end{Desc}
\begin{Desc}
\item[Warning:]Currently 16-bit tga's are not properly supported however all others are, though not saved with RLE. \end{Desc}


Definition at line 334 of file fl\-Texture\-TGA.c.

References debug\-Error, debug\-Warning, FILE\_\-MODE\_\-BINARY, FILE\_\-MODE\_\-WRITE, file\-Open(), file\-Write(), FL\_\-TEXTURE\_\-PRESERVENONALPHA, Palette::pal\-Data, Palette::pal\-Entries, Palette::pal\-Pixel\-Format, Texture::tex\-Alpha, tex\-BPP(), Texture::tex\-Data, Texture::tex\-Data\-Width, Texture::tex\-Height, Texture::tex\-Palette, tex\-Palettized(), Texture::tex\-Pixel\-Format, Texture::tex\-Swizzled, tex\-Unswizzle(), Texture::tex\-Width, tga\-File\-Header::tga\-BPP, tga\-File\-Header::tga\-Descriptor, tga\-File\-Header::tga\-Height, tga\-File\-Header::tga\-Ident\-Size, tga\-File\-Header::tga\-Image\-Type, tga\-File\-Header::tga\-Palette\-BPP, tga\-File\-Header::tga\-Palette\-Len, tga\-File\-Header::tga\-Palette\-Start, tga\-File\-Header::tga\-Palette\-Type, tga\-File\-Header::tga\-Width, tga\-File\-Header::tga\-XStart, and tga\-File\-Header::tga\-YStart.

Referenced by tex\-Save().