Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Friends | List of all members
TGAClass Class Reference

#include <TGAClass.h>

Inheritance diagram for TGAClass:
TinyImage GenericRefCountedBaseClass

Classes

struct  tgafooter
 TGA footer (TGA 2.0 only) More...
 
struct  tgaheader
 TGA header. More...
 

Public Types

enum  TGAFormats { ,
  NO_COMPRESSION_COLORMAPPED = 1, NO_COMPRESSION_TRUECOLOR = 2, NO_COMPRESSION_BLACKWHITE = 3, RLE_COMPRESSION_COLORMAPPED = 9,
  RLE_COMPRESSION_TRUECOLOR = 10, RLE_COMPRESSION_BLACKWHITE = 11, NDS_A3I5_TRANSLUCENT = 128, NDS_A5I3_TRANSLUCENT = 129,
  NDS_4X4_COMPRESSED = 130
}
 list of tga image formats More...
 
- Public Types inherited from TinyImage
enum  ImageFormat
 enumeration of supported texture format
 

Public Member Functions

virtual ~TGAClass ()
 Destructor.
 
 TGAClass (FileHandle *fileName)
 
virtual bool Load (FileHandle *fileName)
 

Static Public Member Functions

template<unsigned int bytes>
static void readColorData16_RGBA_4444 (unsigned char *src, unsigned char *dst)
 

Static Public Attributes

static const u8 mHeaderSize = 18
 size of the TGA header (in bytes)
 
static const u8 mFooterSize = 26
 size of the TGA footer (in bytes)
 

Static Protected Member Functions

static void loadHeader (tgaheader &header, u8 *memfile)
 

Friends

class TinyImage
 

Detailed Description

TinyImage specialized for TGA management.

Member Enumeration Documentation

◆ TGAFormats

list of tga image formats

Enumerator
NO_COMPRESSION_COLORMAPPED 

no image data

NO_COMPRESSION_TRUECOLOR 

uncompressed, color-mapped image

NO_COMPRESSION_BLACKWHITE 

uncompressed, true-color image

RLE_COMPRESSION_COLORMAPPED 

uncompressed, black&white image

RLE_COMPRESSION_TRUECOLOR 

run-length encoded, color-mapped image

RLE_COMPRESSION_BLACKWHITE 

run-length encoded, true-color image

NDS_A3I5_TRANSLUCENT 

run-length encoded, black&white image

NDS_A5I3_TRANSLUCENT 

3 alpha bits 5 index bits, translucent texture

NDS_4X4_COMPRESSED 

5 alpha bits 3 index bits, translucent texture

Constructor & Destructor Documentation

◆ TGAClass()

TGAClass::TGAClass ( FileHandle *  fileName)

Constructor

Parameters
fileNameTGA file to load

Member Function Documentation

◆ Load()

bool TGAClass::Load ( FileHandle *  fileName)
virtual

Main loading method

Parameters
fileNameTGA file to load

Reimplemented from TinyImage.

◆ loadHeader()

void TGAClass::loadHeader ( tgaheader header,
u8 *  memfile 
)
staticprotected

load the tga header from the file

Parameters
headerthe header to fill
memfilethe loaded file

◆ readColorData16_RGBA_4444()

template<unsigned int bytes>
void TGAClass::readColorData16_RGBA_4444 ( unsigned char *  src,
unsigned char *  dst 
)
static

read color from specified source, convert it and copy it to destination

Parameters
srcpointer on the color data to read
dstpointer to the color data to write
bytesnumber of bytes to read

The documentation for this class was generated from the following files: