1 /* 2 image.h 3 4 General image handling 5 6 Copyright (C) 2003 Harry Roberts 7 8 Author: Harry Roberts 9 Date: Sep 4 2003 10 11 This program is free software; you can redistribute it and/or 12 modify it under the terms of the GNU General Public License 13 as published by the Free Software Foundation; either version 2 14 of the License, or (at your option) any later version. 15 16 This program is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 20 See the GNU General Public License for more details. 21 22 You should have received a copy of the GNU General Public License 23 along with this program; if not, write to: 24 25 Free Software Foundation, Inc. 26 59 Temple Place - Suite 330 27 Boston, MA 02111-1307, USA 28 */ 29 #ifndef __QF_image_h 30 #define __QF_image_h 31 32 #include "QF/quakeio.h" 33 34 // could not use texture_t as that is used for models. 35 typedef struct tex_s { 36 int width; 37 int height; 38 int format; 39 unsigned char *palette; // 0 = 32 bit, otherwise 8 40 unsigned char data[4]; // variable length 41 } tex_t; 42 43 #define tex_palette 0 44 #define tex_l 0x1909 //GL_LUMINANCE 45 #define tex_a 0x1906 //GL_ALPHA 46 #define tex_la 2 47 #define tex_rgb 3 48 #define tex_rgba 4 49 50 tex_t *LoadImage (const char *imageFile); 51 52 #endif //__QF_image_h 53