#include "flGlobal.h"
#include <stdlib.h>
#include <string.h>
#include <pspgu.h>
Go to the source code of this file.
Classes | |
struct | tgaFileHeader |
Functions | |
Texture * | texLoadTGA (char *inPath) |
Loads a tga image into a Texture struct. | |
bool | texSaveTGA (Texture *inTex, char *inPath) |
Saves a tga image from a Texture struct. |
Texture* texLoadTGA | ( | char * | inPath | ) |
Loads a tga image into a Texture struct.
inPath | Path to the tga image in memory or file. |
Definition at line 33 of file flTextureTGA.c.
References debugError, FILE_MODE_BINARY, FILE_MODE_READ, FILE_SEEK_CUR, fileClose(), fileOpen(), fileRead(), fileSeek(), NULL, palCreate(), Palette::palData, palGrayscaleT8(), Palette::palPixelFormat, tgaFileHeader::tgaBPP, tgaFileHeader::tgaDescriptor, tgaFileHeader::tgaHeight, tgaFileHeader::tgaIdentSize, tgaFileHeader::tgaImageType, tgaFileHeader::tgaPaletteBPP, tgaFileHeader::tgaPaletteLen, tgaFileHeader::tgaPaletteStart, tgaFileHeader::tgaPaletteType, tgaFileHeader::tgaWidth, tgaFileHeader::tgaXStart, and tgaFileHeader::tgaYStart.
Referenced by texLoad().
Saves a tga image from a Texture struct.
inTex | The texture to save as a tga. | |
inPath | Path to the file to which the tga image will be written. |
Definition at line 334 of file flTextureTGA.c.
References debugError, debugWarning, FILE_MODE_BINARY, FILE_MODE_WRITE, fileOpen(), fileWrite(), FL_TEXTURE_PRESERVENONALPHA, Palette::palData, Palette::palEntries, Palette::palPixelFormat, Texture::texAlpha, texBPP(), Texture::texData, Texture::texDataWidth, Texture::texHeight, Texture::texPalette, texPalettized(), Texture::texPixelFormat, Texture::texSwizzled, texUnswizzle(), Texture::texWidth, tgaFileHeader::tgaBPP, tgaFileHeader::tgaDescriptor, tgaFileHeader::tgaHeight, tgaFileHeader::tgaIdentSize, tgaFileHeader::tgaImageType, tgaFileHeader::tgaPaletteBPP, tgaFileHeader::tgaPaletteLen, tgaFileHeader::tgaPaletteStart, tgaFileHeader::tgaPaletteType, tgaFileHeader::tgaWidth, tgaFileHeader::tgaXStart, and tgaFileHeader::tgaYStart.
Referenced by texSave().