MCPcopy Create free account
hub / github.com/diasurgical/devilution / ProcessLightList

Function ProcessLightList

Source/lighting.cpp:1117–1157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1115}
1116
1117void ProcessLightList()
1118{
1119 int i, j;
1120 BYTE temp;
1121
1122 if (lightflag) {
1123 return;
1124 }
1125
1126 if (dolighting) {
1127 for (i = 0; i < numlights; i++) {
1128 j = lightactive[i];
1129 if (LightList[j]._ldel) {
1130 DoUnLight(LightList[j]._lx, LightList[j]._ly, LightList[j]._lradius);
1131 }
1132 if (LightList[j]._lunflag) {
1133 DoUnLight(LightList[j]._lunx, LightList[j]._luny, LightList[j]._lunr);
1134 LightList[j]._lunflag = 0;
1135 }
1136 }
1137 for (i = 0; i < numlights; i++) {
1138 j = lightactive[i];
1139 if (!LightList[j]._ldel) {
1140 DoLighting(LightList[j]._lx, LightList[j]._ly, LightList[j]._lradius, j);
1141 }
1142 }
1143 i = 0;
1144 while (i < numlights) {
1145 if (LightList[lightactive[i]]._ldel) {
1146 numlights--;
1147 temp = lightactive[numlights];
1148 lightactive[numlights] = lightactive[i];
1149 lightactive[i] = temp;
1150 } else {
1151 i++;
1152 }
1153 }
1154 }
1155
1156 dolighting = FALSE;
1157}
1158
1159void SavePreLighting()
1160{

Callers 3

LoadGameFunction · 0.85
LoadGameLevelFunction · 0.85
game_logicFunction · 0.85

Calls 2

DoUnLightFunction · 0.85
DoLightingFunction · 0.85

Tested by

no test coverage detected