Devilution
Diablo devolved - magic behind the 1996 computer game
lighting.h
Go to the documentation of this file.
1 
6 #ifndef __LIGHTING_H__
7 #define __LIGHTING_H__
8 
10 extern BYTE lightactive[MAXLIGHTS];
12 extern int numlights;
13 extern BYTE lightradius[16][128];
14 extern BOOL dovision;
15 extern int numvision;
16 extern char lightmax;
17 extern BOOL dolighting;
18 extern BYTE lightblock[64][16][16];
19 extern int visionid;
20 extern BYTE *pLightTbl;
21 extern BOOL lightflag;
22 
23 void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by);
24 void DoLighting(int nXPos, int nYPos, int nRadius, int Lnum);
25 void DoUnLight(int nXPos, int nYPos, int nRadius);
26 void DoUnVision(int nXPos, int nYPos, int nRadius);
27 void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible);
28 void FreeLightTable();
29 void InitLightTable();
30 void MakeLightTable();
31 #ifdef _DEBUG
32 void ToggleLighting();
33 #endif
34 void InitLightMax();
35 void InitLighting();
36 int AddLight(int x, int y, int r);
37 void AddUnLight(int i);
38 void ChangeLightRadius(int i, int r);
39 void ChangeLightXY(int i, int x, int y);
40 void ChangeLightOff(int i, int x, int y);
41 void ChangeLight(int i, int x, int y, int r);
42 void ProcessLightList();
43 void SavePreLighting();
44 void InitVision();
45 int AddVision(int x, int y, int r, BOOL mine);
46 void ChangeVisionRadius(int id, int r);
47 void ChangeVisionXY(int id, int x, int y);
48 void ProcessVisionList();
50 
51 /* rdata */
52 
53 extern char CrawlTable[2749];
54 extern char *pCrawlTable[19];
55 extern BYTE vCrawlTable[23][30];
56 extern BYTE byte_49463C[18][18];
57 extern BYTE RadiusAdj[23];
58 
59 #endif /* __LIGHTING_H__ */
CrawlTable
char CrawlTable[2749]
CrawlTable specifies X- and Y-coordinate deltas from a missile target coordinate.
Definition: lighting.cpp:47
RotateRadius
void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by)
Definition: lighting.cpp:484
DoUnVision
void DoUnVision(int nXPos, int nYPos, int nRadius)
Definition: lighting.cpp:666
DoLighting
void DoLighting(int nXPos, int nYPos, int nRadius, int Lnum)
Definition: lighting.cpp:511
dovision
BOOL dovision
Definition: lighting.cpp:15
visionid
int visionid
Definition: lighting.cpp:20
ProcessLightList
void ProcessLightList()
Definition: lighting.cpp:1116
dolighting
BOOL dolighting
Definition: lighting.cpp:18
ProcessVisionList
void ProcessVisionList()
Definition: lighting.cpp:1229
pLightTbl
BYTE * pLightTbl
Definition: lighting.cpp:21
numlights
int numlights
Definition: lighting.cpp:13
SavePreLighting
void SavePreLighting()
Definition: lighting.cpp:1158
InitVision
void InitVision()
Definition: lighting.cpp:1163
ChangeVisionXY
void ChangeVisionXY(int id, int x, int y)
Definition: lighting.cpp:1212
AddLight
int AddLight(int x, int y, int r)
Definition: lighting.cpp:1021
lighting_color_cycling
void lighting_color_cycling()
Definition: lighting.cpp:1274
MAXVISION
#define MAXVISION
Definition: defs.h:39
MAXLIGHTS
#define MAXLIGHTS
Definition: defs.h:29
ChangeLightXY
void ChangeLightXY(int i, int x, int y)
Definition: lighting.cpp:1070
lightradius
BYTE lightradius[16][128]
Definition: lighting.cpp:14
pCrawlTable
char * pCrawlTable[19]
pCrawlTable maps from circle radius to the X- and Y-coordinate deltas from the center of a circle.
Definition: lighting.cpp:412
VisionList
LightListStruct VisionList[MAXVISION]
Definition: lighting.cpp:10
RadiusAdj
BYTE RadiusAdj[23]
RadiusAdj maps from vCrawlTable index to lighting vision radius adjustment.
Definition: lighting.cpp:482
ChangeVisionRadius
void ChangeVisionRadius(int id, int r)
Definition: lighting.cpp:1196
InitLightMax
void InitLightMax()
Definition: lighting.cpp:999
AddUnLight
void AddUnLight(int i)
Definition: lighting.cpp:1046
numvision
int numvision
Definition: lighting.cpp:16
lightmax
char lightmax
Definition: lighting.cpp:17
FreeLightTable
void FreeLightTable()
Definition: lighting.cpp:787
DoVision
void DoVision(int nXPos, int nYPos, int nRadius, BOOL doautomap, BOOL visible)
Definition: lighting.cpp:696
AddVision
int AddVision(int x, int y, int r, BOOL mine)
Definition: lighting.cpp:1176
InitLighting
void InitLighting()
Definition: lighting.cpp:1008
MakeLightTable
void MakeLightTable()
Definition: lighting.cpp:798
LightListStruct
Definition: structs.h:1178
lightactive
BYTE lightactive[MAXLIGHTS]
Definition: lighting.cpp:11
byte_49463C
BYTE byte_49463C[18][18]
unused
Definition: lighting.cpp:460
ChangeLightRadius
void ChangeLightRadius(int i, int r)
Definition: lighting.cpp:1056
ChangeLight
void ChangeLight(int i, int x, int y, int r)
Definition: lighting.cpp:1100
lightblock
BYTE lightblock[64][16][16]
Definition: lighting.cpp:19
vCrawlTable
BYTE vCrawlTable[23][30]
vCrawlTable specifies the X- Y-coordinate offsets of lighting visions.
Definition: lighting.cpp:434
ChangeLightOff
void ChangeLightOff(int i, int x, int y)
Definition: lighting.cpp:1085
InitLightTable
void InitLightTable()
Definition: lighting.cpp:792
lightflag
BOOL lightflag
Definition: lighting.cpp:22
LightList
LightListStruct LightList[MAXLIGHTS]
Definition: lighting.cpp:12
DoUnLight
void DoUnLight(int nXPos, int nYPos, int nRadius)
Definition: lighting.cpp:634