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

Function DoDynamicFallLeft

Descent3/procedurals.cpp:794–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792 }
793}
794void DoDynamicFallLeft(int handle, dynamic_proc_element *proc) {
795 PlaceProcPoint(FixToInt(proc->x1), FixToInt(proc->y1), proc->color);
796 proc->frames_left--;
797 if (proc->frames_left < 1)
798 ProcElementUnlink(proc - DynamicProcElements, handle);
799 else {
800 proc->color--;
801 if (proc->color == 0)
802 ProcElementUnlink(proc - DynamicProcElements, handle);
803 else {
804 if (FixToInt(proc->dx) < 0)
805 proc->dx += FloatToFix(((ps_rand() % 100) / 2000.0));
806 if (FixToInt(proc->dy) < 2)
807 proc->dy += FloatToFix(((ps_rand() % 100) / 1000.0));
808 proc->x1 += proc->dx;
809 proc->y1 += proc->dy;
810 }
811 }
812}
813void CalcWater2(int handle, int density) {
814 int newh;
815 int count = PROC_SIZE + 1;

Callers 1

EvaluateFireProceduralFunction · 0.85

Calls 3

PlaceProcPointFunction · 0.85
ProcElementUnlinkFunction · 0.85
ps_randFunction · 0.85

Tested by

no test coverage detected