|
|
|
|
@ -994,7 +994,7 @@ void ToggleLighting()
|
|
|
|
|
|
|
|
|
|
lightflag ^= TRUE; |
|
|
|
|
|
|
|
|
|
if (lightflag) { |
|
|
|
|
if (lightflag != 0) { |
|
|
|
|
memset(dLight, 0, sizeof(dLight)); |
|
|
|
|
} else { |
|
|
|
|
memcpy(dLight, dPreLight, sizeof(dLight)); |
|
|
|
|
@ -1033,7 +1033,7 @@ int AddLight(int x, int y, int r)
|
|
|
|
|
{ |
|
|
|
|
int lid; |
|
|
|
|
|
|
|
|
|
if (lightflag) { |
|
|
|
|
if (lightflag != 0) { |
|
|
|
|
return -1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1046,8 +1046,8 @@ int AddLight(int x, int y, int r)
|
|
|
|
|
LightList[lid]._lradius = r; |
|
|
|
|
LightList[lid]._xoff = 0; |
|
|
|
|
LightList[lid]._yoff = 0; |
|
|
|
|
LightList[lid]._ldel = 0; |
|
|
|
|
LightList[lid]._lunflag = 0; |
|
|
|
|
LightList[lid]._ldel = FALSE; |
|
|
|
|
LightList[lid]._lunflag = FALSE; |
|
|
|
|
dolighting = TRUE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1060,7 +1060,7 @@ void AddUnLight(int i)
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LightList[i]._ldel = 1; |
|
|
|
|
LightList[i]._ldel = TRUE; |
|
|
|
|
dolighting = TRUE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1070,7 +1070,7 @@ void ChangeLightRadius(int i, int r)
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LightList[i]._lunflag = 1; |
|
|
|
|
LightList[i]._lunflag = TRUE; |
|
|
|
|
LightList[i]._lunx = LightList[i]._lx; |
|
|
|
|
LightList[i]._luny = LightList[i]._ly; |
|
|
|
|
LightList[i]._lunr = LightList[i]._lradius; |
|
|
|
|
@ -1084,7 +1084,7 @@ void ChangeLightXY(int i, int x, int y)
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LightList[i]._lunflag = 1; |
|
|
|
|
LightList[i]._lunflag = TRUE; |
|
|
|
|
LightList[i]._lunx = LightList[i]._lx; |
|
|
|
|
LightList[i]._luny = LightList[i]._ly; |
|
|
|
|
LightList[i]._lunr = LightList[i]._lradius; |
|
|
|
|
@ -1099,7 +1099,7 @@ void ChangeLightOff(int i, int x, int y)
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LightList[i]._lunflag = 1; |
|
|
|
|
LightList[i]._lunflag = TRUE; |
|
|
|
|
LightList[i]._lunx = LightList[i]._lx; |
|
|
|
|
LightList[i]._luny = LightList[i]._ly; |
|
|
|
|
LightList[i]._lunr = LightList[i]._lradius; |
|
|
|
|
@ -1114,7 +1114,7 @@ void ChangeLight(int i, int x, int y, int r)
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
LightList[i]._lunflag = 1; |
|
|
|
|
LightList[i]._lunflag = TRUE; |
|
|
|
|
LightList[i]._lunx = LightList[i]._lx; |
|
|
|
|
LightList[i]._luny = LightList[i]._ly; |
|
|
|
|
LightList[i]._lunr = LightList[i]._lradius; |
|
|
|
|
@ -1129,7 +1129,7 @@ void ProcessLightList()
|
|
|
|
|
int i, j; |
|
|
|
|
BYTE temp; |
|
|
|
|
|
|
|
|
|
if (lightflag) { |
|
|
|
|
if (lightflag != 0) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1141,7 +1141,7 @@ void ProcessLightList()
|
|
|
|
|
} |
|
|
|
|
if (LightList[j]._lunflag) { |
|
|
|
|
DoUnLight(LightList[j]._lunx, LightList[j]._luny, LightList[j]._lunr); |
|
|
|
|
LightList[j]._lunflag = 0; |
|
|
|
|
LightList[j]._lunflag = FALSE; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (i = 0; i < numlights; i++) { |
|
|
|
|
@ -1210,7 +1210,7 @@ void ChangeVisionRadius(int id, int r)
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < numvision; i++) { |
|
|
|
|
if (VisionList[i]._lid == id) { |
|
|
|
|
VisionList[i]._lunflag = 1; |
|
|
|
|
VisionList[i]._lunflag = TRUE; |
|
|
|
|
VisionList[i]._lunx = VisionList[i]._lx; |
|
|
|
|
VisionList[i]._luny = VisionList[i]._ly; |
|
|
|
|
VisionList[i]._lunr = VisionList[i]._lradius; |
|
|
|
|
@ -1226,7 +1226,7 @@ void ChangeVisionXY(int id, int x, int y)
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < numvision; i++) { |
|
|
|
|
if (VisionList[i]._lid == id) { |
|
|
|
|
VisionList[i]._lunflag = 1; |
|
|
|
|
VisionList[i]._lunflag = TRUE; |
|
|
|
|
VisionList[i]._lunx = VisionList[i]._lx; |
|
|
|
|
VisionList[i]._luny = VisionList[i]._ly; |
|
|
|
|
VisionList[i]._lunr = VisionList[i]._lradius; |
|
|
|
|
@ -1249,7 +1249,7 @@ void ProcessVisionList()
|
|
|
|
|
} |
|
|
|
|
if (VisionList[i]._lunflag) { |
|
|
|
|
DoUnVision(VisionList[i]._lunx, VisionList[i]._luny, VisionList[i]._lunr); |
|
|
|
|
VisionList[i]._lunflag = 0; |
|
|
|
|
VisionList[i]._lunflag = FALSE; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for (i = 0; i < TransVal; i++) { |
|
|
|
|
|