| 772 | } |
| 773 | } |
| 774 | void AddProcFallLeft(int handle, static_proc_element *proc) { |
| 775 | if (proc->frequency == 0 || (FrameCount % proc->frequency) == 0) { |
| 776 | // Add a new fizzle |
| 777 | int num = (prand() % 2) + 1; |
| 778 | for (int i = 0; i < num; i++) { |
| 779 | int index = ProcElementAllocate(); |
| 780 | if (index > -1) { |
| 781 | ProcElementLink(index, handle); |
| 782 | DynamicProcElements[index].type = proc->type; |
| 783 | |
| 784 | DynamicProcElements[index].x1 = IntToFix(proc->x1 + ((ps_rand() % 5) - 2)); |
| 785 | DynamicProcElements[index].y1 = IntToFix(proc->y1 + ((ps_rand() % 5) - 2)); |
| 786 | DynamicProcElements[index].color = BRIGHT_COLOR; |
| 787 | DynamicProcElements[index].dx = IntToFix(-1); |
| 788 | DynamicProcElements[index].dy = FloatToFix((-(prand() % 100)) / 300.0); |
| 789 | DynamicProcElements[index].frames_left = (prand() % 15) + 25; |
| 790 | } |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | void DoDynamicFallLeft(int handle, dynamic_proc_element *proc) { |
| 795 | PlaceProcPoint(FixToInt(proc->x1), FixToInt(proc->y1), proc->color); |
| 796 | proc->frames_left--; |
no test coverage detected