A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
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.
46typedef struct
47{
48 int originx, originy; // Block origin, which has already accounted
49 int patch; // for the internal origin of the patch.
50}
51texpatch_t;
52
53//
54// Texture definition.
55// A DOOM wall texture is a list of patches
56// which are to be combined in a predefined order.
57//
58
59typedef struct
60{
61 char name[8]; // Keep name for switch changing, etc.
62 int next, index; // killough 1/31/98: used in hashing algorithm
63 // CPhipps - moved arrays with per-texture entries to elements here
64 unsigned widthmask;
65 size_t compositesize;
66 byte *composite;
67 short *columnlump;
68 unsigned *columnofs;
69 // CPhipps - end of additions
70 short width, height;
71 short patchcount; // All the patches[patchcount] are drawn
72 texpatch_t patches[1]; // back-to-front into the cached texture.
73}
74texture_t;
75
76// Retrieve column data for span blitting.
77const byte*
78R_GetColumn
79( int tex,
80 int col );
81
82
83// I/O, setting up the stuff.
84void R_InitData (void);
85void R_PrecacheLevel (void);
86
87
88// Retrieval.
89// Floor/ceiling opaque texture tiles,
90// lookup by name. For animation?
91int R_FlatNumForName (const char* name); // killough -- const added
92
93
94// Called by P_Ticker for switches and animations,
95// returns the texture number for the texture name.
96int R_TextureNumForName (const char *name); // killough -- const added
97int R_CheckTextureNumForName (const char *name);
98
99void R_InitTranMap(int); // killough 3/6/98: translucency initialization
100int R_ColormapNumForName(const char *name); // killough 4/4/98
101
102extern const byte *main_tranmap, *tranmap;
103
104/* Proff - Added for OpenGL - cph - const char* param */
105void R_SetPatchNum(patchnum_t *patchnum, const char *name);
106
107#endif