| 656 | } |
| 657 | |
| 658 | void triggerWaveRipple() { |
| 659 | // Create a ripple at a random position within the central area |
| 660 | float perc = 0.15f; // 15% margin from edges |
| 661 | int width = corkscrew.cylinderWidth(); |
| 662 | int height = corkscrew.cylinderHeight(); |
| 663 | |
| 664 | int min_x = perc * width; |
| 665 | int max_x = (1 - perc) * width; |
| 666 | int min_y = perc * height; |
| 667 | int max_y = (1 - perc) * height; |
| 668 | |
| 669 | int x = random8(min_x, max_x); |
| 670 | int y = random8(min_y, max_y); |
| 671 | |
| 672 | // Trigger a 2x2 wave ripple for more punch (compensates for blur reduction) |
| 673 | float ripple_strength = 1.5f; // Higher value for more impact |
| 674 | waveFx->setf(x, y, ripple_strength); |
| 675 | waveFx->setf(x + 1, y, ripple_strength); |
| 676 | waveFx->setf(x, y + 1, ripple_strength); |
| 677 | waveFx->setf(x + 1, y + 1, ripple_strength); |
| 678 | |
| 679 | FL_WARN("Wave ripple triggered at (" << x << ", " << y << ") with 2x2 pattern"); |
| 680 | } |
| 681 | |
| 682 | void processWaveAutoTrigger(uint32_t now) { |
| 683 | // Handle automatic wave triggering |
no test coverage detected