MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DoDynamicSpinners

Function DoDynamicSpinners

Descent3/procedurals.cpp:561–575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559 }
560}
561void DoDynamicSpinners(int handle, dynamic_proc_element *proc) {
562 PlaceProcPoint(FixToInt(proc->x1), FixToInt(proc->y1), proc->color);
563 proc->frames_left--;
564 if (proc->frames_left < 1)
565 ProcElementUnlink(proc - DynamicProcElements, handle);
566 else {
567 proc->color--;
568 if (proc->color == 0)
569 ProcElementUnlink(proc - DynamicProcElements, handle);
570 else {
571 proc->x1 += proc->dx;
572 proc->y1 += proc->dy;
573 }
574 }
575}
576void AddProcRandomEmber(int handle, static_proc_element *proc) {
577 if (proc->frequency == 0 || (FrameCount % proc->frequency) == 0) {
578 // Add a new fizzle

Callers 1

EvaluateFireProceduralFunction · 0.85

Calls 2

PlaceProcPointFunction · 0.85
ProcElementUnlinkFunction · 0.85

Tested by

no test coverage detected