1 //------------------------------------------------------------------------ 2 // WAD PIC LOADER 3 //------------------------------------------------------------------------ 4 // 5 // Eureka DOOM Editor 6 // 7 // Copyright (C) 2001-2016 Andrew Apted 8 // Copyright (C) 1997-2003 André Majorel et al 9 // 10 // This program is free software; you can redistribute it and/or 11 // modify it under the terms of the GNU General Public License 12 // as published by the Free Software Foundation; either version 2 13 // of the License, or (at your option) any later version. 14 // 15 // This program is distributed in the hope that it will be useful, 16 // but WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU General Public License for more details. 19 // 20 //------------------------------------------------------------------------ 21 // 22 // Based on Yadex which incorporated code from DEU 5.21 that was put 23 // in the public domain in 1994 by Raphaël Quinet and Brendon Wyber. 24 // 25 //------------------------------------------------------------------------ 26 27 #ifndef __EUREKA_W_LOADPIC_H__ 28 #define __EUREKA_W_LOADPIC_H__ 29 30 #include "im_img.h" 31 #include "w_wad.h" 32 33 34 bool LoadPicture(Img_c& dest, 35 Lump_c *lump, /* Lump containing picture */ 36 const char *pic_name, /* Picture name, for messages */ 37 int pic_x_offset, /* Coordinates of top left corner of picture */ 38 int pic_y_offset, /* relative to top left corner of buffer. */ 39 int *pic_width = NULL, /* To return the size of the picture */ 40 int *pic_height = NULL); /* (can be NULL) */ 41 42 43 Img_c * LoadImage_PNG(Lump_c *lump, const char *name); 44 Img_c * LoadImage_JPEG(Lump_c *lump, const char *name); 45 Img_c * LoadImage_TGA(Lump_c *lump, const char *name); 46 47 48 // Determine the image format of the given wad lump. 49 // 50 // Return values are: 51 // 'p' : PNG format 52 // 't' : TGA (Targa) format 53 // 'd' : Doom patch 54 // 55 // 'j' : JPEG 56 // 'g' : GIF 57 // 's' : DDS 58 // 59 // NUL : unrecognized 60 // 61 char W_DetectImageFormat(Lump_c *lump); 62 63 64 #endif /* __EUREKA_W_LOADPIC_H__ */ 65 66 //--- editor settings --- 67 // vi:ts=4:sw=4:noexpandtab 68