| 519 | } |
| 520 | } |
| 521 | void DoDynamicRisingEmber(int handle, dynamic_proc_element *proc) { |
| 522 | PlaceProcPoint(FixToInt(proc->x1), FixToInt(proc->y1), proc->color); |
| 523 | proc->frames_left--; |
| 524 | if (proc->frames_left < 1) |
| 525 | ProcElementUnlink(proc - DynamicProcElements, handle); |
| 526 | else { |
| 527 | proc->color--; |
| 528 | if (proc->color == 0) |
| 529 | ProcElementUnlink(proc - DynamicProcElements, handle); |
| 530 | else { |
| 531 | int speed_adjust = 1 + ((proc->speed / 255.0) * 2.0); |
| 532 | proc->dx = FloatToFix(((prand() % 3) - 1) * speed_adjust); |
| 533 | proc->dy = FloatToFix(((prand() % 3) - 2) * speed_adjust); |
| 534 | proc->x1 += proc->dx; |
| 535 | proc->y1 += proc->dy; |
| 536 | } |
| 537 | } |
| 538 | } |
| 539 | void AddProcSpinners(int handle, static_proc_element *proc) { |
| 540 | if (proc->frequency == 0 || (FrameCount % proc->frequency) == 0) { |
| 541 |
no test coverage detected