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

Function xFXRingUpdate

src/SB/Core/x/xFX.cpp:151–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static void xFXRingUpdate(F32 dt)
152{
153 xFXRing* ring = &ringlist[0];
154
155 if ((F32)iabs(dt) < 0.001f)
156 {
157 return;
158 }
159
160 for (S32 i = 0; i < RING_COUNT; i++, ring++)
161 {
162 if (ring->time <= 0.0f)
163 {
164 continue;
165 }
166
167 F32 lifetime = ring->lifetime;
168
169 if (lifetime < dt)
170 {
171 lifetime = dt;
172 }
173
174 ring->time += dt;
175
176 F32 t = ring->time / lifetime;
177
178 // non-matching: float scheduling
179
180 if (t > 1.0f)
181 {
182 ring->time = 0.0f;
183
184 if (ring->parent)
185 {
186 *ring->parent = NULL;
187 }
188
189 ring->parent = NULL;
190 }
191 }
192}
193
194void xFXRingRender()
195{

Callers 1

xFXUpdateFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected