00001 /*--------------------------------------------------------------------------------- 00002 $Id: pcx.h,v 1.4 2008-04-15 02:18:41 dovoto Exp $ 00003 00004 00005 Copyright (C) 2005 00006 Jason Rogers (dovoto) 00007 Dave Murphy (WinterMute) 00008 00009 This software is provided 'as-is', without any express or implied 00010 warranty. In no event will the authors be held liable for any 00011 damages arising from the use of this software. 00012 00013 Permission is granted to anyone to use this software for any 00014 purpose, including commercial applications, and to alter it and 00015 redistribute it freely, subject to the following restrictions: 00016 00017 1. The origin of this software must not be misrepresented; you 00018 must not claim that you wrote the original software. If you use 00019 this software in a product, an acknowledgment in the product 00020 documentation would be appreciated but is not required. 00021 2. Altered source versions must be plainly marked as such, and 00022 must not be misrepresented as being the original software. 00023 3. This notice may not be removed or altered from any source 00024 distribution. 00025 00026 00027 00028 00029 ---------------------------------------------------------------------------------*/ 00035 #ifndef PCX_H 00036 #define PCX_H 00037 00038 typedef struct PCXHeader 00039 { 00040 char manufacturer; //should be 0 00041 char version; //should be 5 00042 char encoding; //should be 1 00043 char bitsPerPixel; //should be 8 00044 short int xmin,ymin; //coordinates for top left,bottom right 00045 short int xmax,ymax; 00046 short int hres; //resolution 00047 short int vres; 00048 char palette16[48]; //16 color palette if 16 color image 00049 char reserved; //ignore 00050 char colorPlanes; //ignore 00051 short int bytesPerLine; 00052 short int paletteYype; //should be 2 00053 char filler[58]; //ignore 00054 }__attribute__ ((packed)) PCXHeader, *pPCXHeader; 00055 00056 #ifdef __cplusplus 00057 extern "C" { 00058 #endif 00059 00064 int loadPCX(unsigned char* pcx, sImage* image); 00065 00066 #ifdef __cplusplus 00067 } 00068 #endif 00069 00070 #endif 00071