MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / zLightEffectCauldron

Function zLightEffectCauldron

src/SB/Game/zLightEffect.cpp:172–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void zLightEffectCauldron(_zLight* zlight, F32 seconds)
173{
174 iLight* l = &zlight->light;
175
176 F32* reg = zlight->reg;
177 *reg -= seconds;
178
179 if (*reg <= 0.0f)
180 {
181 reg[0] = 0.25f;
182 reg[1] = (leGetRandom() * 0.5f);
183 reg[2] = (leGetRandom() * 0.4f + 0.6f);
184 reg[3] = (leGetRandom() * 0.5f);
185 }
186
187 F32 amount = (seconds * 3.0f);
188 l->color.r = leBlendToCol(l->color.r, reg[1], amount);
189 l->color.g = leBlendToCol(l->color.g, reg[2], amount);
190 l->color.b = leBlendToCol(l->color.b, reg[3], amount);
191
192 iLightSetColor(l, &l->color);
193}

Callers

nothing calls this directly

Calls 3

leGetRandomFunction · 0.85
leBlendToColFunction · 0.85
iLightSetColorFunction · 0.85

Tested by

no test coverage detected