| 766 | } |
| 767 | |
| 768 | void DrawRainbow(int bright, float bkgd_step, vis_pixels *pixels) |
| 769 | { |
| 770 | bright = (int)(bright * (255.0f / 100.0f)); |
| 771 | for (int x = 0; x < 256; x++) |
| 772 | { |
| 773 | for (int y = 0; y < 64; y++) |
| 774 | { |
| 775 | int hsv_h = ((int)(bkgd_step + (256 - x)) % 360); |
| 776 | hsv_t hsv = { 0, 0, 0 }; |
| 777 | hsv.hue = hsv_h; |
| 778 | hsv.saturation = 255; |
| 779 | hsv.value = (unsigned char)bright; |
| 780 | pixels->pixels[y][x] = hsv2rgb(&hsv); |
| 781 | } |
| 782 | } |
| 783 | } |
| 784 | |
| 785 | void DrawColorWheel(int bright, float bkgd_step, int center_x, int center_y, vis_pixels *pixels) |
| 786 | { |