2012-10-12, 23:09
i know that it isn't liked to ask dumb questions about coding c, if oneself has no clue about coding c (or in that case angelscript), but if someone has mercy on me:
how would i add a simple plain white background to this visualisation preset for vortex?
how would i add a simple plain white background to this visualisation preset for vortex?
Code:
// SimpleSpectum.vtx
// Author : vanMiez
float[] vl(256);
float time = 0;
int x;
void Render()
{
time += TIMEPASS;
gfxSetAspect(0);
gfxTranslate(-0.3, -1.5, 2.414);
//gfxColour(0, 0, 0, 0);
/*
// calculate spectrum
for (x=0;x<256;x=x+1)
vl[x] = 0;
for (x=0;x<512;x=x+1)
vl[x/2] = vl[x/2] + GetSpecLeft(x)+GetSpecRight(x);
*/
// now draw spectrum
gfxTranslate(-1,0,1);
gfxBegin(PRIM_QUADLIST);
gfxSetTexture(NULL);
for (x = 0; x < 256; x++)
{
/*
vl[x] = vl[x]/8;
if (vl[x]>1.0) vl[x]=1.0;
*/
float spec = GetSpec(x);
float xPos = x / 100.0f;
gfxColour(0.3,0.5,0.4,1);
gfxVertex(xPos+(1/128.0f),0,0);
gfxVertex(xPos,0,0);
gfxColour(spec*MIDDLE,spec*TREBLE,spec*BASS,1);
gfxVertex(xPos,spec*0.6,0);
gfxVertex(xPos+(1/128.0f),spec*0.6,0);
}
gfxEnd();
}