Debian Codegraph @

bitmap/iff.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef _IFF_H
20 #define _IFF_Hcxx . . $ `bitmap/iff.h:20:9`!
21
22 #include "cfile.h"cxx . . $ `<file>/cfile/cfile.h`/
23
24 // Error codes for read & write routines
25
26 #define IFF_NO_ERRORcxx . . $ `bitmap/iff.h:26:9`! 0 // everything is fine, have a nice day
27 #define IFF_NO_MEMcxx . . $ `bitmap/iff.h:27:9`! 1 // not enough mem for loading or processing
28 #define IFF_UNKNOWN_FORMcxx . . $ `bitmap/iff.h:28:9`! 2 // IFF file, but not a bitmap
29 #define IFF_NOT_IFFcxx . . $ `bitmap/iff.h:29:9`! 3 // this isn't even an IFF file
30 #define IFF_NO_FILEcxx . . $ `bitmap/iff.h:30:9`! 4 // cannot find or open file
31 #define IFF_BAD_BM_TYPEcxx . . $ `bitmap/iff.h:31:9`! 5 // tried to save invalid type, like BM_RGB15
32 #define IFF_CORRUPTcxx . . $ `bitmap/iff.h:32:9`! 6 // bad data in file
33 #define IFF_FORM_ANIMcxx . . $ `bitmap/iff.h:33:9`! 7 // this is an anim, with non-anim load rtn
34 #define IFF_FORM_BITMAPcxx . . $ `bitmap/iff.h:34:9`! 8 // this is not an anim, with anim load rtn
35 #define IFF_TOO_MANY_BMScxx . . $ `bitmap/iff.h:35:9`! 9 // anim read had more bitmaps than room for
36 #define IFF_UNKNOWN_MASKcxx . . $ `bitmap/iff.h:36:9`! 10 // unknown masking type
37 #define IFF_READ_ERRORcxx . . $ `bitmap/iff.h:37:9`! 11 // error reading from file
38 #define IFF_BM_MISMATCHcxx . . $ `bitmap/iff.h:38:9`! 12 // bm being loaded doesn't match bm loaded into
39
40 // Type values for iff bitmaps
41 #define TYPE_PBMcxx . . $ `bitmap/iff.h:41:9`! 0
42 #define TYPE_ILBMcxx . . $ `bitmap/iff.h:42:9`! 1
43
44 // Loads an IFF file, returning bitmap handle or -1 if error
45 int bm_iff_alloc_filecxx . . $ bm_iff_alloc_file(413716a422df0036).(CFILEcxx . . $ CFILE# *);
46
47 // Loads a tga or ogf file into a bitmap...returns handle to bm or -1 on error
48 int bm_tga_alloc_filecxx . . $ bm_tga_alloc_file(3b86680ef84cac7b).(CFILEcxx . . $ CFILE# *infile, char *name, int format = 0);
49
50 // Loads a pcx file and converts it to 16 bit. Returns bitmap handle or -1 on error
51 int bm_pcx_alloc_filecxx . . $ bm_pcx_alloc_file(413716a422df0036).(CFILEcxx . . $ CFILE# *infile);
52
53 int bm_tga_load_short_filecxx . . $ bm_tga_load_short_file(d795696ca27f7f7a).(CFILEcxx . . $ CFILE# *infile, char *name);
54
55 // Pages in bitmap index n. Returns 1 if successful, 0 if not
56 int bm_page_in_filecxx . . $ bm_page_in_file(7864480464b09eea).(int n);
57
58 int bm_iff_read_animbrushcxx . . $ bm_iff_read_animbrush(7436bf38bddd805d).(const char *ifilename, int *bm_list);
59
60 #endif