-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathr_data.h
69 lines (52 loc) · 1.38 KB
/
r_data.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef __R_DATA__
#define __R_DATA__
#include "r_defs.h"
#include "r_state.h"
#ifdef __GNUG__
#pragma interface
#endif
// A single patch from a texture definition,
// basically a rectangular area within
// the texture rectangle.
typedef struct
{
// Block origin (allways UL),
// which has allready accounted
// for the internal origin of the patch.
int originx;
int originy;
int patch;
} texpatch_t;
// A maptexturedef_t describes a rectangular texture,
// which is composed of one or more mappatch_t structures
// that arrange graphic patches.
typedef struct
{
// Keep name for switch changing, etc.
char name[8];
short width;
short height;
// All the patches[patchcount]
// are drawn back to front into the cached texture.
short patchcount;
texpatch_t patches[1];
} texture_t;
extern int numtextures;
extern texture_t** textures;
// Retrieve column data for span blitting.
byte*
R_GetColumn
( int tex,
int col );
// I/O, setting up the stuff.
void R_InitData (void);
void R_PrecacheLevel (void);
// Retrieval.
// Floor/ceiling opaque texture tiles,
// lookup by name. For animation?
int R_FlatNumForName (char* name);
// Called by P_Ticker for switches and animations,
// returns the texture number for the texture name.
int R_TextureNumForName (char *name);
int R_CheckTextureNumForName (char *name);
#endif