File: rt_draw.h

package info (click to toggle)
rott 1.0%2Bdfsg-2
  • links: PTS
  • area: contrib
  • in suites: lenny
  • size: 3,640 kB
  • ctags: 11,676
  • sloc: ansic: 76,379; sh: 4,983; asm: 1,300; makefile: 88
file content (127 lines) | stat: -rw-r--r-- 3,289 bytes parent folder | download | duplicates (7)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*
Copyright (C) 1994-1995 Apogee Software, Ltd.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*/
#ifndef _rt_draw_public
#define _rt_draw_public

//***************************************************************************
//
//    RT_DRAW.C - Draw-o-rama
//
//***************************************************************************


#define MAXVISIBLE              256

extern int whereami;

extern byte * shadingtable;            // Shading table for DrawPost

typedef struct
{
int viewheight;
int viewx;
int shapenum;
int altshapenum;
int shapesize;
int x1,x2,h1,h2;
int texturestart;
int textureend;
byte * colormap;

} visobj_t;


extern  word             tilemap[MAPSIZE][MAPSIZE];    // wall values only
extern  byte             spotvis[MAPSIZE][MAPSIZE];

extern int tics;
extern int wstart;
extern int fandc;

//
// math tables
//
extern short    tantable[FINEANGLES];
extern fixed    sintable[FINEANGLES+FINEANGLEQUAD+1];
extern fixed    *costable;

//
// refresh variables
//

extern fixed   viewx,viewy;             // the focal point
extern int     viewangle;
extern fixed   viewsin,viewcos;

//
// ray tracing variables
//

extern visobj_t vislist[MAXVISIBLE];
extern visobj_t *visptr,*visstep,*farthest;

extern long     xintercept,yintercept;
extern byte     mapseen[MAPSIZE][MAPSIZE];
extern unsigned long * lights;

extern int hp_startfrac;
extern int hp_srcstep;
extern int levelheight;
extern int maxheight;
extern int nominalheight;

extern int actortime;
extern int drawtime;
extern int c_startx;
extern int c_starty;

extern const int dirangle8[9];
extern const int dirangle16[16];
extern  int firstcoloffset;

//=========================== macros =============================

#define LightSourceAt(x,y)    (*(lights+((x)<<7)+(y)))
#define SetLight(x,y,level)   (LightSourceAt((x),(y))|=(unsigned long)(level))

//=========================== functions =============================

void  BuildTables (void);
void  CalcTics (void);
void  ThreeDRefresh (void);
void  FlipPage ( void );
void  TurnShakeOff( void );
void  AdaptDetail ( void );
int   CalcHeight (void);
void  DoLoadGameSequence( void );
void RotateBuffer (int startangle, int endangle, int startscale, int endscale, int time);
void ApogeeTitle (void);
void DopefishTitle (void);
void RotationFun (void);
void GetRainBoundingBox (int * xmin, int * xmax, int * ymin, int * ymax);
void StartupScreenSaver ( void );
void ShutdownScreenSaver ( void );
void UpdateScreenSaver ( void );
void DoEndCinematic ( void );
void DoCreditScreen ( void );
void DoMicroStoryScreen ( void );
void DoInBetweenCinematic (int yoffset, int lump, int delay, char * string );

#endif