| 733 | } |
| 734 | } |
| 735 | void AddProcFallRight(int handle, static_proc_element *proc) { |
| 736 | if (proc->frequency == 0 || (FrameCount % proc->frequency) == 0) { |
| 737 | // Add a new fizzle |
| 738 | int num = (prand() % 2) + 1; |
| 739 | for (int i = 0; i < num; i++) { |
| 740 | int index = ProcElementAllocate(); |
| 741 | if (index > -1) { |
| 742 | ProcElementLink(index, handle); |
| 743 | DynamicProcElements[index].type = proc->type; |
| 744 | |
| 745 | DynamicProcElements[index].x1 = IntToFix(proc->x1 + ((ps_rand() % 5) - 2)); |
| 746 | DynamicProcElements[index].y1 = IntToFix(proc->y1 + ((ps_rand() % 5) - 2)); |
| 747 | DynamicProcElements[index].color = BRIGHT_COLOR; |
| 748 | DynamicProcElements[index].dx = IntToFix(1); |
| 749 | DynamicProcElements[index].dy = FloatToFix((-(prand() % 100)) / 300.0); |
| 750 | DynamicProcElements[index].frames_left = (prand() % 15) + 25; |
| 751 | } |
| 752 | } |
| 753 | } |
| 754 | } |
| 755 | void DoDynamicFallRight(int handle, dynamic_proc_element *proc) { |
| 756 | PlaceProcPoint(FixToInt(proc->x1), FixToInt(proc->y1), proc->color); |
| 757 | proc->frames_left--; |
no test coverage detected