void UpdateLlights(ShaderLight lights[], int & lightsCount, const Vec3f pos, bool forPlayerColor) { boost::array<EERIE_LIGHT *, llightsSize> llights; llights.fill(NULL); boost::array<float, llightsSize> values; values.fill(999999999.f); for(size_t i = 0; i < TOTIOPDL; i++) { Insertllight(llights, values, IO_PDL[i], pos, forPlayerColor); } for(size_t i = 0; i < TOTPDL; i++) { Insertllight(llights, values, PDL[i], pos, forPlayerColor); } lightsCount = 0; for(int i = 0; i < MAX_LLIGHTS; i++) { if(llights[i]) { EERIE_LIGHT * el = llights[i]; ShaderLight & sl = lights[i]; sl.pos = el->pos; sl.fallstart = el->fallstart; sl.fallend = el->fallend; sl.falldiffmul = el->falldiffmul; sl.intensity = el->intensity; sl.rgb = el->rgb; sl.rgb255 = el->rgb255; lightsCount = i + 1; } else { break; } } }
void UpdateLlights(const Vec3f pos, bool forPlayerColor) { llightsInit(); for(size_t i = 0; i < TOTIOPDL; i++) { Insertllight(IO_PDL[i], pos, forPlayerColor); } for(size_t i = 0; i < TOTPDL; i++) { Insertllight(PDL[i], pos, forPlayerColor); } }