📄 tgalib.h
字号:
//// TGA lib for cocos2d-iphone//// sources from: http://www.lighthouse3d.com/opengl/terrain/index.php3?tgasource////#ifndef TGA_LIB//#define TGA_LIBenum { 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 directlyvoid tgaLoadImageData(FILE *file, tImageTGA *info);// this is the function to call when we want to load an imagetImageTGA * tgaLoad(const char *filename);// converts RGB to greyscalevoid tgaRGBtogreyscale(tImageTGA *info);// releases the memory used for the imagevoid tgaDestroy(tImageTGA *info);//#endif // TGA_LIB
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -