diff options
Diffstat (limited to 'apps/plugins/doom/r_data.h')
-rw-r--r-- | apps/plugins/doom/r_data.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/apps/plugins/doom/r_data.h b/apps/plugins/doom/r_data.h new file mode 100644 index 0000000000..12c9eb74af --- /dev/null +++ b/apps/plugins/doom/r_data.h | |||
@@ -0,0 +1,105 @@ | |||
1 | /* Emacs style mode select -*- C++ -*- | ||
2 | *----------------------------------------------------------------------------- | ||
3 | * | ||
4 | * | ||
5 | * PrBoom a Doom port merged with LxDoom and LSDLDoom | ||
6 | * based on BOOM, a modified and improved DOOM engine | ||
7 | * Copyright (C) 1999 by | ||
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman | ||
9 | * Copyright (C) 1999-2000 by | ||
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * 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 the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
25 | * 02111-1307, USA. | ||
26 | * | ||
27 | * DESCRIPTION: | ||
28 | * Refresh module, data I/O, caching, retrieval of graphics | ||
29 | * by name. | ||
30 | * | ||
31 | *-----------------------------------------------------------------------------*/ | ||
32 | |||
33 | |||
34 | #ifndef __R_DATA__ | ||
35 | #define __R_DATA__ | ||
36 | |||
37 | #include "r_defs.h" | ||
38 | #include "r_state.h" | ||
39 | |||
40 | #ifdef __GNUG__ | ||
41 | #pragma interface | ||
42 | #endif | ||
43 | |||
44 | // A single patch from a texture definition, basically | ||
45 | // a rectangular area within the texture rectangle. | ||
46 | typedef struct | ||
47 | { | ||
48 | int originx, originy; // Block origin, which has already accounted | ||
49 | int patch; // for the internal origin of the patch. | ||
50 | } texpatch_t; | ||
51 | |||
52 | // | ||
53 | // Texture definition. | ||
54 | // A DOOM wall texture is a list of patches | ||
55 | // which are to be combined in a predefined order. | ||
56 | // | ||
57 | |||
58 | typedef struct | ||
59 | { | ||
60 | char name[8]; // Keep name for switch changing, etc. | ||
61 | int next, index; // killough 1/31/98: used in hashing algorithm | ||
62 | // CPhipps - moved arrays with per-texture entries to elements here | ||
63 | unsigned widthmask; | ||
64 | size_t compositesize; | ||
65 | byte *composite; | ||
66 | short *columnlump; | ||
67 | unsigned *columnofs; | ||
68 | // CPhipps - end of additions | ||
69 | short width, height; | ||
70 | short patchcount; // All the patches[patchcount] are drawn | ||
71 | texpatch_t patches[1]; // back-to-front into the cached texture. | ||
72 | } texture_t; | ||
73 | |||
74 | // Retrieve column data for span blitting. | ||
75 | const byte* | ||
76 | R_GetColumn | ||
77 | ( int tex, | ||
78 | int col ); | ||
79 | |||
80 | |||
81 | // I/O, setting up the stuff. | ||
82 | void R_InitData (void); | ||
83 | void R_PrecacheLevel (void); | ||
84 | |||
85 | |||
86 | // Retrieval. | ||
87 | // Floor/ceiling opaque texture tiles, | ||
88 | // lookup by name. For animation? | ||
89 | int R_FlatNumForName (const char* name); // killough -- const added | ||
90 | |||
91 | |||
92 | // Called by P_Ticker for switches and animations, | ||
93 | // returns the texture number for the texture name. | ||
94 | int R_TextureNumForName (const char *name); // killough -- const added | ||
95 | int R_CheckTextureNumForName (const char *name); | ||
96 | |||
97 | void R_InitTranMap(int); // killough 3/6/98: translucency initialization | ||
98 | int R_ColormapNumForName(const char *name); // killough 4/4/98 | ||
99 | |||
100 | extern const byte *main_tranmap, *tranmap; | ||
101 | |||
102 | /* Proff - Added for OpenGL - cph - const char* param */ | ||
103 | void R_SetPatchNum(patchnum_t *patchnum, const char *name); | ||
104 | |||
105 | #endif | ||