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

Function DoDynamicFountain

Descent3/procedurals.cpp:678–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676 }
677}
678void DoDynamicFountain(int handle, dynamic_proc_element *proc) {
679 PlaceProcPoint(FixToInt(proc->x1), FixToInt(proc->y1), proc->color);
680 proc->frames_left--;
681 if (proc->frames_left < 1)
682 ProcElementUnlink(proc - DynamicProcElements, handle);
683 else {
684 proc->color--;
685 if (proc->color == 0)
686 ProcElementUnlink(proc - DynamicProcElements, handle);
687 else {
688 proc->x1 += proc->dx;
689 proc->y1 += proc->dy;
690 }
691 }
692}
693void AddProcCone(int handle, static_proc_element *proc) {
694 if (proc->frequency == 0 || (FrameCount % proc->frequency) == 0) {
695 // Add a new fizzle

Callers 1

EvaluateFireProceduralFunction · 0.85

Calls 2

PlaceProcPointFunction · 0.85
ProcElementUnlinkFunction · 0.85

Tested by

no test coverage detected