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

Function xFXRingCreate

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

Source from the content-addressed store, hash-verified

119}
120
121xFXRing* xFXRingCreate(const xVec3* pos, const xFXRing* params)
122{
123 xFXRing* ring = &ringlist[0];
124
125 if (!pos || !params)
126 {
127 return NULL;
128 }
129
130 for (S32 i = 0; i < RING_COUNT; i++, ring++)
131 {
132 if (ring->time <= 0.0f)
133 {
134 // non-matching: 1.0f is only loaded once
135
136 memcpy(ring, params, sizeof(xFXRing));
137
138 ring->time = 0.001f;
139 ring->pos = *pos;
140 ring->ring_radius_delta *= 1.0f / ring->lifetime;
141 ring->ring_height_delta *= 1.0f / ring->lifetime;
142 ring->ring_tilt_delta *= 1.0f / ring->lifetime;
143
144 return ring;
145 }
146 }
147
148 return NULL;
149}
150
151static void xFXRingUpdate(F32 dt)
152{

Callers 4

zFXPatrickStunFunction · 0.50
zFXHammerFunction · 0.50
zFXPorterWaveFunction · 0.50
zFXMuscleArmWaveFunction · 0.50

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected