5 * Created by guillaum on Tue Aug 14 2001.
6 * Copyright (c) 2001 __CompanyName__. All rights reserved.
17 extern unsigned int resolx,resoly;
19 inline unsigned char lighten(unsigned char value,unsigned char power)
22 for (i=0;i < power; i++) value += (255-value)/5;
26 void goom_lines(gint16 data [2][512], unsigned int ID,unsigned int* p, guint32 power)
30 unsigned char * color = 1 + (unsigned char *) &color1;
34 case 0: /* Horizontal stereo lines */
41 case 1: /* Stereo circles */
48 *color = lighten(*color,power);
50 * color = lighten(*color,power);
52 * color = lighten(*color,power);
53 color = 1 + (unsigned char *) &color2;
54 * color = lighten(*color,power);
56 * color = lighten(*color,power);
58 * color = lighten(*color,power);
62 case 0: /* Horizontal stereo lines */
68 plot = i * resolx / 512 + (resoly / 4 + data[0][i] / 1600) * resolx;
71 plot = i * resolx / 512 + (resoly * 3 / 4 - data[1][i] / 1600) * resolx;
78 case 1: /* Stereo circles */
81 unsigned int monX = resolx/2;
82 float monY = resoly/4;
83 float monY2 = resoly/2;
84 for (z=0;z<6.2832f; z+=1.0f/monY)
86 /* float offset1 = 128+data[1][(unsigned int)(z*81.33f)])/200000; */
87 p[ monX + (unsigned int)( (monY + ((float)resoly) * (128+data[1][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY + ((float)resoly)*(128+data[1][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color1;
88 p[ monX + (unsigned int)((monY - ((float)resoly) * (128+data[0][(unsigned int)(z*81.33f)])/200000) * cos (z) + resolx * (unsigned int)( monY2 + (monY - ((float)resoly)*(128+data[0][(unsigned int)(z*81.33f)])/400000) * sin (z)))] = color2;