// **************************************************************************
// **************************************************************************
// **************************************************************************
// **                                                                      **
// ** TGA.H                                                         MODULE **
// **                                                                      **
// ** Simple interface for reading data objects (see DATA.H) from a file   **
// ** in TrueVision's TGA format.                                          **
// **                                                                      **
// ** Limitations ...                                                      **
// **                                                                      **
// ** Lots.                                                                **
// **                                                                      **
// ** Only the following file contents are currently understood ...        **
// **                                                                      **
// **   Colour-mapped 8 bits-per-pixel.                                    **
// **                                                                      **
// ** Last modified : 03 Nov 1996 by John Brandwood                        **
// **                                                                      **
// **************************************************************************
// **************************************************************************
// **************************************************************************

#ifndef __TGA_h
#define __TGA_h

//
// GLOBAL DATA STRUCTURES AND DEFINITIONS
//

// Force byte alignment for the following structures.

#if __ZTC__
#pragma ZTC align 1
#endif

#if __WATCOMC__
#pragma pack (1)
#endif

// TGA file header (18 bytes).

typedef	struct	TGA_HEADER_S
	{
	UB                  ub___tgaID;
	UB                  ub___tgaCMapType;
	UB                  ub___tgaImageType;
	UB                  ub___tgaCMapIdxLo;
	UB                  ub___tgaCMapIdxHi;
	UB                  ub___tgaCMapLenLo;
	UB                  ub___tgaCMapLenHi;
	UB                  ub___tgaCMapEntry;
	UW                  uw___tgaX;
	UW                  uw___tgaY;
	UW                  uw___tgaW;
	UW                  uw___tgaH;
	UB                  ub___tgaImageBPP;
	UB                  ub___tgaImageDesc;
	} TGA_HEADER_T;

typedef	struct RGB_S
	{
	UB                  ub___r;
	UB                  ub___g;
	UB                  ub___b;
	} RGB;

typedef	struct PALETTE_S
	{
	RGB                 acl__rgb[256];
	} PALETTE;

// Restore default alignment.

#if __ZTC__
#pragma ZTC align
#endif

#if __WATCOMC__
#pragma pack
#endif

//
// GLOBAL VARIABLES
//

//
// GLOBAL FUNCTION PROTOTYPES
//

extern	TGA_HEADER_T *      LoadTarga               (
//								char *              pcz__Name);
								char *              pcz__Name,
								UW *                puw__Buff);

//
// End of __TGA_h
//

#endif



// **************************************************************************
// **************************************************************************
// **************************************************************************
//	END OF TGA.H
// **************************************************************************
// **************************************************************************
// **************************************************************************

