| 1 |
#include <config.h> |
| 2 |
|
| 3 |
#include <stdlib.h> |
| 4 |
#include <stdio.h> |
| 5 |
|
| 6 |
#include "renderer.h" |
| 7 |
|
| 8 |
t_effect _inf_effects[] = { |
| 9 |
{ |
| 10 |
.num_effect = 6, |
| 11 |
.x_curve = 1842944, |
| 12 |
.curve_color = 0, |
| 13 |
.curve_amplitude = 59, |
| 14 |
.spectral_amplitude = 14, |
| 15 |
.spectral_color = 255, |
| 16 |
.mode_spectre = 4, |
| 17 |
.spectral_shift = 82 |
| 18 |
}, |
| 19 |
{ |
| 20 |
.num_effect = 6, |
| 21 |
.x_curve = 1824128, |
| 22 |
.curve_color = 0, |
| 23 |
.curve_amplitude = 59, |
| 24 |
.spectral_amplitude = 11, |
| 25 |
.spectral_color = 255, |
| 26 |
.mode_spectre = 1, |
| 27 |
.spectral_shift = 40 |
| 28 |
}, |
| 29 |
{ |
| 30 |
.num_effect = 6, |
| 31 |
.x_curve = 1676608, |
| 32 |
.curve_color = 0, |
| 33 |
.curve_amplitude = 59, |
| 34 |
.spectral_amplitude = 29, |
| 35 |
.spectral_color = 255, |
| 36 |
.mode_spectre = 4, |
| 37 |
.spectral_shift = 0 |
| 38 |
}, |
| 39 |
{ |
| 40 |
.num_effect = 6, |
| 41 |
.x_curve = 1635200, |
| 42 |
.curve_color = 0, |
| 43 |
.curve_amplitude = 59, |
| 44 |
.spectral_amplitude = 4, |
| 45 |
.spectral_color = 255, |
| 46 |
.mode_spectre = 3, |
| 47 |
.spectral_shift = 73 |
| 48 |
}, |
| 49 |
{ |
| 50 |
.num_effect = 6, |
| 51 |
.x_curve = 1598592, |
| 52 |
.curve_color = 255, |
| 53 |
.curve_amplitude = 75, |
| 54 |
.spectral_amplitude = 4, |
| 55 |
.spectral_color = 0, |
| 56 |
.mode_spectre = 3, |
| 57 |
.spectral_shift = 113 |
| 58 |
}, |
| 59 |
{ |
| 60 |
.num_effect = 5, |
| 61 |
.x_curve = 1545728, |
| 62 |
.curve_color = 255, |
| 63 |
.curve_amplitude = 59, |
| 64 |
.spectral_amplitude = 4, |
| 65 |
.spectral_color = 255, |
| 66 |
.mode_spectre = 1, |
| 67 |
.spectral_shift = 98 |
| 68 |
}, |
| 69 |
{ |
| 70 |
.num_effect = 3, |
| 71 |
.x_curve = 1471744, |
| 72 |
.curve_color = 255, |
| 73 |
.curve_amplitude = 82, |
| 74 |
.spectral_amplitude = 41, |
| 75 |
.spectral_color = 0, |
| 76 |
.mode_spectre = 4, |
| 77 |
.spectral_shift = 397 |
| 78 |
}, |
| 79 |
{ |
| 80 |
.num_effect = 4, |
| 81 |
.x_curve = 1466816, |
| 82 |
.curve_color = 255, |
| 83 |
.curve_amplitude = 82, |
| 84 |
.spectral_amplitude = 41, |
| 85 |
.spectral_color = 0, |
| 86 |
.mode_spectre = 4, |
| 87 |
.spectral_shift = 397 |
| 88 |
}, |
| 89 |
{ |
| 90 |
.num_effect = 3, |
| 91 |
.x_curve = 1405824, |
| 92 |
.curve_color = 0, |
| 93 |
.curve_amplitude = 51, |
| 94 |
.spectral_amplitude = 36, |
| 95 |
.spectral_color = 255, |
| 96 |
.mode_spectre = 4, |
| 97 |
.spectral_shift = 0 |
| 98 |
}, |
| 99 |
{ |
| 100 |
.num_effect = 4, |
| 101 |
.x_curve = 1360256, |
| 102 |
.curve_color = 0, |
| 103 |
.curve_amplitude = 51, |
| 104 |
.spectral_amplitude = 15, |
| 105 |
.spectral_color = 255, |
| 106 |
.mode_spectre = 4, |
| 107 |
.spectral_shift = 82 |
| 108 |
}, |
| 109 |
{ |
| 110 |
.num_effect = 4, |
| 111 |
.x_curve = 1345600, |
| 112 |
.curve_color = 0, |
| 113 |
.curve_amplitude = 51, |
| 114 |
.spectral_amplitude = 9, |
| 115 |
.spectral_color = 255, |
| 116 |
.mode_spectre = 3, |
| 117 |
.spectral_shift = 61 |
| 118 |
}, |
| 119 |
{ |
| 120 |
.num_effect = 3, |
| 121 |
.x_curve = 1265344, |
| 122 |
.curve_color = 0, |
| 123 |
.curve_amplitude = 51, |
| 124 |
.spectral_amplitude = 9, |
| 125 |
.spectral_color = 255, |
| 126 |
.mode_spectre = 1, |
| 127 |
.spectral_shift = 73 |
| 128 |
}, |
| 129 |
{ |
| 130 |
.num_effect = 3, |
| 131 |
.x_curve = 1239040, |
| 132 |
.curve_color = 0, |
| 133 |
.curve_amplitude = 51, |
| 134 |
.spectral_amplitude = 9, |
| 135 |
.spectral_color = 255, |
| 136 |
.mode_spectre = 4, |
| 137 |
.spectral_shift = 76 |
| 138 |
}, |
| 139 |
{ |
| 140 |
.num_effect = 3, |
| 141 |
.x_curve = 1108480, |
| 142 |
.curve_color = 0, |
| 143 |
.curve_amplitude = 51, |
| 144 |
.spectral_amplitude = 9, |
| 145 |
.spectral_color = 255, |
| 146 |
.mode_spectre = 4, |
| 147 |
.spectral_shift = 77 |
| 148 |
}, |
| 149 |
{ |
| 150 |
.num_effect = 3, |
| 151 |
.x_curve = 1084736, |
| 152 |
.curve_color = 0, |
| 153 |
.curve_amplitude = 51, |
| 154 |
.spectral_amplitude = 6, |
| 155 |
.spectral_color = 255, |
| 156 |
.mode_spectre = 3, |
| 157 |
.spectral_shift = 63 |
| 158 |
}, |
| 159 |
{ |
| 160 |
.num_effect = 3, |
| 161 |
.x_curve = 1000000, |
| 162 |
.curve_color = 0, |
| 163 |
.curve_amplitude = 51, |
| 164 |
.spectral_amplitude = 6, |
| 165 |
.spectral_color = 255, |
| 166 |
.mode_spectre = 2, |
| 167 |
.spectral_shift = 56 |
| 168 |
}, |
| 169 |
{ |
| 170 |
.num_effect = 2, |
| 171 |
.x_curve = 814848, |
| 172 |
.curve_color = 0, |
| 173 |
.curve_amplitude = 51, |
| 174 |
.spectral_amplitude = 6, |
| 175 |
.spectral_color = 255, |
| 176 |
.mode_spectre = 4, |
| 177 |
.spectral_shift = 82 |
| 178 |
}, |
| 179 |
{ |
| 180 |
.num_effect = 0, |
| 181 |
.x_curve = 715328, |
| 182 |
.curve_color = 255, |
| 183 |
.curve_amplitude = 51, |
| 184 |
.spectral_amplitude = 6, |
| 185 |
.spectral_color = 255, |
| 186 |
.mode_spectre = 4, |
| 187 |
.spectral_shift = 102 |
| 188 |
}, |
| 189 |
{ |
| 190 |
.num_effect = 2, |
| 191 |
.x_curve = 706112, |
| 192 |
.curve_color = 255, |
| 193 |
.curve_amplitude = 51, |
| 194 |
.spectral_amplitude = 6, |
| 195 |
.spectral_color = 255, |
| 196 |
.mode_spectre = 4, |
| 197 |
.spectral_shift = 102 |
| 198 |
}, |
| 199 |
{ |
| 200 |
.num_effect = 2, |
| 201 |
.x_curve = 657408, |
| 202 |
.curve_color = 255, |
| 203 |
.curve_amplitude = 58, |
| 204 |
.spectral_amplitude = 29, |
| 205 |
.spectral_color = 0, |
| 206 |
.mode_spectre = 4, |
| 207 |
.spectral_shift = 397 |
| 208 |
}, |
| 209 |
{ |
| 210 |
.num_effect = 2, |
| 211 |
.x_curve = 655808, |
| 212 |
.curve_color = 255, |
| 213 |
.curve_amplitude = 58, |
| 214 |
.spectral_amplitude = 29, |
| 215 |
.spectral_color = 0, |
| 216 |
.mode_spectre = 4, |
| 217 |
.spectral_shift = 397 |
| 218 |
}, |
| 219 |
{ |
| 220 |
.num_effect = 2, |
| 221 |
.x_curve = 612416, |
| 222 |
.curve_color = 0, |
| 223 |
.curve_amplitude = 84, |
| 224 |
.spectral_amplitude = 29, |
| 225 |
.spectral_color = 255, |
| 226 |
.mode_spectre = 4, |
| 227 |
.spectral_shift = 0 |
| 228 |
}, |
| 229 |
{ |
| 230 |
.num_effect = 1, |
| 231 |
.x_curve = 566272, |
| 232 |
.curve_color = 0, |
| 233 |
.curve_amplitude = 84, |
| 234 |
.spectral_amplitude = 23, |
| 235 |
.spectral_color = 255, |
| 236 |
.mode_spectre = 4, |
| 237 |
.spectral_shift = 0 |
| 238 |
}, |
| 239 |
{ |
| 240 |
.num_effect = 1, |
| 241 |
.x_curve = 516736, |
| 242 |
.curve_color = 255, |
| 243 |
.curve_amplitude = 84, |
| 244 |
.spectral_amplitude = 10, |
| 245 |
.spectral_color = 255, |
| 246 |
.mode_spectre = 4, |
| 247 |
.spectral_shift = 0 |
| 248 |
}, |
| 249 |
{ |
| 250 |
.num_effect = 1, |
| 251 |
.x_curve = 495296, |
| 252 |
.curve_color = 255, |
| 253 |
.curve_amplitude = 84, |
| 254 |
.spectral_amplitude = 10, |
| 255 |
.spectral_color = 255, |
| 256 |
.mode_spectre = 4, |
| 257 |
.spectral_shift = 0 |
| 258 |
}, |
| 259 |
{ |
| 260 |
.num_effect = 0, |
| 261 |
.x_curve = 375616, |
| 262 |
.curve_color = 255, |
| 263 |
.curve_amplitude = 84, |
| 264 |
.spectral_amplitude = 4, |
| 265 |
.spectral_color = 0, |
| 266 |
.mode_spectre = 3, |
| 267 |
.spectral_shift = 45 |
| 268 |
}, |
| 269 |
{ |
| 270 |
.num_effect = 0, |
| 271 |
.x_curve = 297280, |
| 272 |
.curve_color = 0, |
| 273 |
.curve_amplitude = 0, |
| 274 |
.spectral_amplitude = 11, |
| 275 |
.spectral_color = 255, |
| 276 |
.mode_spectre = 3, |
| 277 |
.spectral_shift = 62 |
| 278 |
}, |
| 279 |
{ |
| 280 |
.num_effect = 0, |
| 281 |
.x_curve = 253888, |
| 282 |
.curve_color = 0, |
| 283 |
.curve_amplitude = 0, |
| 284 |
.spectral_amplitude = 11, |
| 285 |
.spectral_color = 255, |
| 286 |
.mode_spectre = 4, |
| 287 |
.spectral_shift = 76 |
| 288 |
}, |
| 289 |
{ |
| 290 |
.num_effect = 0, |
| 291 |
.x_curve = 151488, |
| 292 |
.curve_color = 0, |
| 293 |
.curve_amplitude = 0, |
| 294 |
.spectral_amplitude = 43, |
| 295 |
.spectral_color = 255, |
| 296 |
.mode_spectre = 0, |
| 297 |
.spectral_shift = 0 |
| 298 |
}, |
| 299 |
}; |
| 300 |
|
| 301 |
void _inf_load_random_effect(InfinitePrivate *priv, t_effect *effect) |
| 302 |
{ |
| 303 |
const size_t effect_count = sizeof(_inf_effects) / sizeof(_inf_effects[0]); |
| 304 |
const int index = visual_random_context_int(priv->rcontext) % effect_count; |
| 305 |
*effect = _inf_effects[index]; |
| 306 |
} |