Sha256: c52e9b9187cb3fa7293524b81dfbb5d4d9ce48da564fa5c97dad1c5c884f22eb

Contents?: true

Size: 1.06 KB

Versions: 11

Compression:

Stored size: 1.06 KB

Contents

//
// TGA lib for cocos2d-iphone
//
// sources from: http://www.lighthouse3d.com/opengl/terrain/index.php3?tgasource
//

//#ifndef TGA_LIB
//#define TGA_LIB

/**
 @file
 TGA image support
 */

enum {
	TGA_OK,
	TGA_ERROR_FILE_OPEN,
	TGA_ERROR_READING_FILE,
	TGA_ERROR_INDEXED_COLOR,
	TGA_ERROR_MEMORY,
	TGA_ERROR_COMPRESSED_FILE,
};

/** TGA format */
typedef struct sImageTGA {
	int status;
	unsigned char type, pixelDepth;

	/** map width */
	short int width;

	/** map height */
	short int height;

	/** raw data */
	unsigned char *imageData;
	int flipped;
} tImageTGA;

/// load the image header fields. We only keep those that matter!
void tgaLoadHeader(FILE *file, tImageTGA *info);

/// loads the image pixels. You shouldn't call this function directly
void tgaLoadImageData(FILE *file, tImageTGA *info);

/// this is the function to call when we want to load an image
tImageTGA * tgaLoad(const char *filename);

// /converts RGB to greyscale
void tgaRGBtogreyscale(tImageTGA *info);

/// releases the memory used for the image
void tgaDestroy(tImageTGA *info);

//#endif // TGA_LIB

Version data entries

11 entries across 7 versions & 1 rubygems

Version Path
joybox-1.1.1 vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-1.1.1 vendor/vendor-ios/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-1.1.0 vendor/vendor-ios/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-1.1.0 vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-1.0.0 vendor/vendor-ios/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-1.0.0 vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-0.0.6 vendor/vendor-osx/cocos_2d/cocos_2d_include/Support/TGAlib.h
joybox-0.0.6 vendor/vendor-ios/cocos_2d/include/Support/TGAlib.h
joybox-0.0.5 vendor/Cocos2D/include/TGAlib.h
joybox-0.0.4 vendor/Cocos2D/include/TGAlib.h
joybox-0.0.3 vendor/Cocos2D/include/TGAlib.h