| 3848 | } |
| 3849 | |
| 3850 | static void charge_cap (int joy, int idx, int charge) |
| 3851 | { |
| 3852 | if (charge < -1 || charge > 1) |
| 3853 | charge = charge * 80; |
| 3854 | pot_cap[joy][idx] += charge; |
| 3855 | if (pot_cap[joy][idx] < 0) |
| 3856 | pot_cap[joy][idx] = 0; |
| 3857 | if (pot_cap[joy][idx] > 511) |
| 3858 | pot_cap[joy][idx] = 511; |
| 3859 | } |
| 3860 | |
| 3861 | static void cap_check(bool hsync) |
| 3862 | { |