* Copy history data to new array, scaling as needed. * @param hist Source history data. * @param s Destination byte array. * @param scale Scale factor. * @todo Figure out why we copy data. */
| 94 | * @todo Figure out why we copy data. |
| 95 | */ |
| 96 | void Micropolis::drawMonth(short *hist, unsigned char *s, float scale) |
| 97 | { |
| 98 | int val, x; |
| 99 | |
| 100 | for (x = 0; x < 120; x++) { |
| 101 | val = (int)(hist[x] * scale); |
| 102 | s[119 - x] = (unsigned char)clamp(val, 0, 255); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | |
| 107 | /** |