aboutsummaryrefslogtreecommitdiff
path: root/addons/visualization.vortex
diff options
context:
space:
mode:
authorWiSo <wiso@xbmc.org>2013-12-07 22:29:04 +0100
committerwsoltys <wiso@no.way>2013-12-10 23:23:01 +0100
commitc938c7734762e42daf6ccc16be0a71f4ceed0003 (patch)
tree477c6774736a160e02a18d12a54c97f690df8721 /addons/visualization.vortex
parentfd184b6c89a57d4b00b5f9ed608c06c7b9c09ca6 (diff)
[WIN32] added vortex visualizations data (from xbox package), a settings.xml, addon.xml and strings.po to our repo
Diffstat (limited to 'addons/visualization.vortex')
-rw-r--r--addons/visualization.vortex/addon.xml13
-rw-r--r--addons/visualization.vortex/icon.pngbin0 -> 108450 bytes
-rw-r--r--addons/visualization.vortex/resources/Presets/AlbumArtCube.vtx28
-rw-r--r--addons/visualization.vortex/resources/Presets/AlbumArtCubeRain.vtx71
-rw-r--r--addons/visualization.vortex/resources/Presets/AlbumArtStretch.vtx52
-rw-r--r--addons/visualization.vortex/resources/Presets/AlbumArtWaveSpectrum.vtx102
-rw-r--r--addons/visualization.vortex/resources/Presets/AlbumArtZoomer.vtx66
-rw-r--r--addons/visualization.vortex/resources/Presets/Awakenings.vtx125
-rw-r--r--addons/visualization.vortex/resources/Presets/Block.tra88
-rw-r--r--addons/visualization.vortex/resources/Presets/ChessMania.vtx90
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeBlowOut.tra160
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeGrid.vtx69
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeGridStrobe.vtx74
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeGridWire.vtx75
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeRain.vtx70
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeSlide.vtx69
-rw-r--r--addons/visualization.vortex/resources/Presets/CubeTunnel.vtx66
-rw-r--r--addons/visualization.vortex/resources/Presets/Cubes.tra162
-rw-r--r--addons/visualization.vortex/resources/Presets/DynamicCubeTunnel.vtx176
-rw-r--r--addons/visualization.vortex/resources/Presets/FlipBoth.tra54
-rw-r--r--addons/visualization.vortex/resources/Presets/HamsterMatic.vtx104
-rw-r--r--addons/visualization.vortex/resources/Presets/MentalHangover.vtx143
-rw-r--r--addons/visualization.vortex/resources/Presets/MeteorShower.vtx73
-rw-r--r--addons/visualization.vortex/resources/Presets/MiddleGrid.tra67
-rw-r--r--addons/visualization.vortex/resources/Presets/SingingSkull.vtx72
-rw-r--r--addons/visualization.vortex/resources/Presets/Slide.tra52
-rw-r--r--addons/visualization.vortex/resources/Presets/SpaceHarrier.vtx91
-rw-r--r--addons/visualization.vortex/resources/Presets/Speakers.vtx95
-rw-r--r--addons/visualization.vortex/resources/Presets/SpectrumCylinder.vtx91
-rw-r--r--addons/visualization.vortex/resources/Presets/SpectrumField.vtx73
-rw-r--r--addons/visualization.vortex/resources/Presets/SpectrumSphere.vtx186
-rw-r--r--addons/visualization.vortex/resources/Presets/Sphere.tra65
-rw-r--r--addons/visualization.vortex/resources/Presets/Square.tra66
-rw-r--r--addons/visualization.vortex/resources/Presets/StereoSpectrum.vtx128
-rw-r--r--addons/visualization.vortex/resources/Presets/VoicePrintDonut.vtx74
-rw-r--r--addons/visualization.vortex/resources/Presets/WalkingCube.vtx151
-rw-r--r--addons/visualization.vortex/resources/Presets/WarpDrive.vtx73
-rw-r--r--addons/visualization.vortex/resources/Presets/WarpDriveTwist.vtx74
-rw-r--r--addons/visualization.vortex/resources/Presets/Wave.vtx26
-rw-r--r--addons/visualization.vortex/resources/Presets/WaveRing.vtx59
-rw-r--r--addons/visualization.vortex/resources/Presets/WaveScope.vtx99
-rw-r--r--addons/visualization.vortex/resources/Presets/WaveZoomer.vtx90
-rw-r--r--addons/visualization.vortex/resources/Presets/Woofer.vtx65
-rw-r--r--addons/visualization.vortex/resources/Presets/XBMCRain.vtx95
-rw-r--r--addons/visualization.vortex/resources/Presets/tunnel.tra56
-rw-r--r--addons/visualization.vortex/resources/Textures/Plasma_edge.jpgbin0 -> 10783 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD1.pngbin0 -> 54779 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD2.pngbin0 -> 54943 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD3.pngbin0 -> 55171 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD4.pngbin0 -> 55342 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD5.pngbin0 -> 55408 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD6.pngbin0 -> 55653 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD7.pngbin0 -> 55746 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Skull_JawUD8.pngbin0 -> 55843 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Smiley.pngbin0 -> 14046 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Speaker.pngbin0 -> 44547 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Tex_Edge.pngbin0 -> 14706 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/Vortex_Credits.pngbin0 -> 123157 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/alien.pngbin0 -> 29281 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/aqua_ravines.jpgbin0 -> 6908 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/bluestrip.ddsbin0 -> 8320 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/checker.pngbin0 -> 2387 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/checker_transp.pngbin0 -> 3466 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/env2.jpgbin0 -> 26460 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/env3.pngbin0 -> 24953 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/env3_darker.pngbin0 -> 9376 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/huemap.jpgbin0 -> 19159 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/skull.pngbin0 -> 45529 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/sky.ddsbin0 -> 65664 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/skybox.ddsbin0 -> 131200 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/splash_original.ddsbin0 -> 34688 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/trail2.ddsbin0 -> 16512 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/vortex-v.jpgbin0 -> 46703 bytes
-rw-r--r--addons/visualization.vortex/resources/Textures/xbmc_icon.pngbin0 -> 40059 bytes
-rw-r--r--addons/visualization.vortex/resources/language/English/strings.po65
-rw-r--r--addons/visualization.vortex/resources/settings.xml12
76 files changed, 3855 insertions, 0 deletions
diff --git a/addons/visualization.vortex/addon.xml b/addons/visualization.vortex/addon.xml
new file mode 100644
index 0000000000..9a975ffd42
--- /dev/null
+++ b/addons/visualization.vortex/addon.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<addon
+ id="visualization.vortex"
+ version="1.0.0"
+ name="Vortex"
+ provider-name="Team XBMC">
+ <extension
+ point="xbmc.player.musicviz"
+ library_windx="Vortex_win32dx.vis"/>
+ <extension point="xbmc.addon.metadata">
+ <platform>windx</platform>
+ </extension>
+</addon>
diff --git a/addons/visualization.vortex/icon.png b/addons/visualization.vortex/icon.png
new file mode 100644
index 0000000000..c8d07f5e46
--- /dev/null
+++ b/addons/visualization.vortex/icon.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Presets/AlbumArtCube.vtx b/addons/visualization.vortex/resources/Presets/AlbumArtCube.vtx
new file mode 100644
index 0000000000..44bf7a8d42
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/AlbumArtCube.vtx
@@ -0,0 +1,28 @@
+// AlbumArtCube.vtx
+// Author - MrC
+
+float time = 0;
+float rx,rxamt,ry,ryamt;
+
+void Render()
+{
+ time += TIMEPASS;
+
+ gfxSetTexture(TEXTURE_ALBUMART);
+ gfxTranslate(0, 0, 2.0f - (TREBLE * 0.5));
+
+ if (BASS>0.3) rxamt = 1;
+ if (BASS<-0.3) rxamt = -1;
+ if (TREBLE>0.3) ryamt = 1;
+ if (TREBLE<-0.3) ryamt = -1;
+ rx = rx + (rxamt*TIMEPASS);
+ ry = ry + (ryamt*TIMEPASS);
+
+ gfxRotate(-70+(Sin(time)*12),1,0,0);
+ gfxRotate(rx*90,0,0,1);
+ gfxRotate(ry*90,0,1,0);
+
+ gfxColour(1, 1, 1, 1);
+ gfxCube(-0.25f, -0.25f, -0.25f, 0.25f, 0.25f, 0.25f);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/AlbumArtCubeRain.vtx b/addons/visualization.vortex/resources/Presets/AlbumArtCubeRain.vtx
new file mode 100644
index 0000000000..86c4d23ad4
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/AlbumArtCubeRain.vtx
@@ -0,0 +1,71 @@
+// AlbumArtCubeRain.vtx
+// Author - MrC
+// Based on CubeRain.r4 by Gordon Williams
+
+int x,y;
+float c,tm,tn,td;
+float[] c_x(256),c_y(256),c_z(256),c_vz(256),c_rx(256),c_ry(256),c_sx(256),c_sy(256),c_sz(256);
+
+float counter;
+
+void MakeNew(int n)
+{
+ c_x[n]=c_y[n]=0;
+ while (Mag(c_x[n],c_y[n])<1)
+ {
+ c_x[n] = (Rand()*10.0)-5.0;
+ c_y[n] = (Rand()*10.0)-5.0;
+ }
+
+ c_z[n] = 10;
+ c_vz[n] = (1.0+Rand())*4;
+ c_rx[n] = (1.0+Rand())*80;
+ c_ry[n] = (1.0+Rand())*80;
+ c_sx[n] = (0.5+Rand())*0.5;
+ c_sy[n] = (0.5+Rand())*0.15;
+ c_sz[n] = (0.5+Rand())*0.15;
+}
+
+void Init()
+{
+ counter = 0;
+
+ for (x=0;x<256;x=x+1)
+ {
+ MakeNew(x);
+ c_z[x] = Rand()*10;
+ }
+ tm = tn = 0;
+}
+
+void Render()
+{
+ td = ((TREBLE+1.0f)*TIMEPASS);
+ tm = tm + td;
+ tn = tn + ((BASS+1.5)*TIMEPASS*2);
+
+ gfxTranslate(Cos(tn * 1.23f) * 0.5f, Sin(tn) * 0.5f, 0.0f);
+ gfxRotate(Cos(tn*0.6734f)*20.0f, 1.0f, 0.0f, 0.0f);
+ gfxRotate(Sin(tn*0.2143f)*20.0f, 0.0f, 1.0f, 0.0f);
+
+ gfxSetTexture(TEXTURE_ALBUMART);
+
+ for (x=0;x<20;x=x+1)
+ {
+ c_z[x] = c_z[x] - (td*c_vz[x]);
+ if (c_z[x]<0)
+ {
+ MakeNew(x);
+ }
+
+ c = Cos(c_z[x]*0.05*3.1416);
+ gfxColour(c,c,c,1);
+ gfxPushMatrix();
+ gfxTranslate(c_x[x],c_y[x],c_z[x]);
+ gfxRotate(c_rx[x]*tm, 1, 0, 0);
+ gfxRotate(c_ry[x]*tm, 0, 1, 0);
+ gfxCube(-c_sx[x],-c_sx[x],-c_sx[x],c_sx[x],c_sx[x],c_sx[x]);
+ gfxPopMatrix();
+ }
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/AlbumArtStretch.vtx b/addons/visualization.vortex/resources/Presets/AlbumArtStretch.vtx
new file mode 100644
index 0000000000..b92d2c1c61
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/AlbumArtStretch.vtx
@@ -0,0 +1,52 @@
+// AlbumArtStretch.vtx
+// Author - MrC
+
+Map map;
+float time = 0;
+
+void Init()
+{
+ map.SetTimed();
+}
+
+void Render()
+{
+ if (BASS > 0)
+ time += (BASS)* TIMEPASS;
+
+ float myX = Sin(time);
+ float myY = Cos(time);
+
+ float dx, dy;
+
+ for (int y = 0; y < 24; y++)
+ {
+ for (int x = 0; x < 32; x++)
+ {
+ dx = x-15.5;
+ dy = y-11.5;
+ float mx = dx + myX*10;
+ float my = dy + myY*10;
+
+ map.SetValues(x,y, mx, my, -2, -2, -2);
+ }
+ }
+
+ map.Render();
+ gfxSetRenderTarget(map);
+
+ gfxSetTexture(TEXTURE_ALBUMART);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+
+ float x = (MIDDLE + 1) / 2;
+ float y = (TREBLE+ 1) / 2;
+
+ gfxTexRect(-1 * x, 1 * y, 1 * x, -1 * y);
+
+ gfxSetRenderTarget(0);
+ gfxSetTexture(map);
+
+ gfxTexRect(-1, 1, 1, -1);
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/AlbumArtWaveSpectrum.vtx b/addons/visualization.vortex/resources/Presets/AlbumArtWaveSpectrum.vtx
new file mode 100644
index 0000000000..bb90cbaeb3
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/AlbumArtWaveSpectrum.vtx
@@ -0,0 +1,102 @@
+// AlbumArtWaveSpectum.vtx
+// Author : MrC
+
+float[] vl(256);
+int x;
+float[] cubeRot(3);
+float[] cubePos(3);
+
+void Init()
+{
+ for (int i=0; i<9;i++)
+ {
+ cubePos[i] = 0.0f;
+ cubeRot[i] = 0.0f;
+ }
+
+}
+
+void Render()
+{
+
+ gfxSetTexture(TEXTURE_ALBUMART);
+
+ for (int i=0; i<3;i++)
+ {
+ cubePos[i] = cubePos[i] + cubeRot[i];
+ cubeRot[i] = cubeRot[i] * 0.95;
+ if (cubeRot[i] > 1)
+ cubeRot[i] = 1;
+ if (cubeRot[i] < -1)
+ cubeRot[i] = -1;
+ }
+
+ cubeRot[0] += BASS;
+ cubeRot[1] += MIDDLE;
+ cubeRot[2] += TREBLE;
+
+
+ gfxPushMatrix();
+ gfxTranslate(-0.8, 0.25, 2);
+
+ gfxRotate(cubePos[0],1,0,0);
+ gfxRotate(cubePos[1],0,0,1);
+ gfxRotate(cubePos[2],0,1,0);
+
+ gfxCube(-0.25f, -0.25f, -0.25f, 0.25f, 0.25f, 0.25f);
+ gfxPopMatrix();
+
+ gfxSetTexture(NULL);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+
+ gfxColour(1, 1, 1, 1);
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x<256; x=x+1)
+ {
+ float r = WaveLeft(x);
+ gfxVertex((x-128) / 256.0f + 0.3, r * 0.2f + 0.5f, 0);
+ }
+ gfxEnd();
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x<256; x=x+1)
+ {
+ float r = WaveRight(x);
+ gfxVertex((x-128) / 256.0f + 0.3, r * 0.2f + 0.1f, 0);
+ }
+ gfxEnd();
+
+ // 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.9,0);
+ 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 xPos = x / 128.0f;
+
+ gfxColour(1,0,0,1);
+ gfxVertex(xPos+(1/128.0f),0,0);
+ gfxVertex(xPos,0,0);
+ gfxColour(1,vl[x],0, 1);
+ gfxVertex(xPos,vl[x]*0.4,0);
+ gfxVertex(xPos+(1/128.0f),vl[x]*0.4,0);
+ }
+ gfxEnd();
+
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/AlbumArtZoomer.vtx b/addons/visualization.vortex/resources/Presets/AlbumArtZoomer.vtx
new file mode 100644
index 0000000000..a7facdba75
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/AlbumArtZoomer.vtx
@@ -0,0 +1,66 @@
+// AlbumArtZoomer.vtx
+// Author - MrC
+
+float rot;
+float zoom;
+float dxx,dxy,dyx,dyy;
+
+float t;
+float px = 16;
+float py = 12;
+float pdx = 1.342;
+float pdy = 1;
+float basstime = 0;
+
+void Init()
+{
+ zoom = 0;
+ rot=Rand();
+ px = 16;
+ py = 12;
+ pdx = 1.342;
+ pdy = 1;
+ basstime = 0;
+}
+
+void Quad(float rt, float sz)
+{
+ dxx = Cos(rt)*sz;
+ dxy = Sin(rt)*sz;
+ dyx = Sin(rt)*sz;
+ dyy = 0.0f-Cos(rt)*sz;
+
+ gfxTexCoord((0.0f-dxx)+(0.0f+dyx),(0.0f-dxy)+(0.0f+dyy));
+ gfxVertex(-1 * 2,1 * 2,0);
+ gfxTexCoord((0.0f+dxx)+(0.0f+dyx),(0.0f+dxy)+(0.0f+dyy));
+ gfxVertex(1 * 2,1 * 2,0);
+ gfxTexCoord((0.0f+dxx)+(0.0f-dyx),(0.0f+dxy)+(0.0f-dyy));
+ gfxVertex(1 * 2,-1 * 2,0);
+ gfxTexCoord((0.0f-dxx)+(0.0f-dyx),(0.0f-dxy)+(0.0f-dyy));
+ gfxVertex(-1 * 2,-1 * 2,0);
+}
+
+void Render()
+{
+ zoom += BASS * 2 * TIMEPASS;
+ rot += TREBLE * 4* TIMEPASS;
+
+ t = TIMEPASS*(BASS+0.25) * 20;
+ px = px + (pdx*t);
+ if (px>28) { pdx = -Abs(pdx); px = 28; }
+ if (px<4) { pdx = Abs(pdx); px = 4; }
+ py = py + (pdy*t);
+ if (py>20) { pdy = -Abs(pdy); py=20; }
+ if (py<4) { pdy = Abs(pdy); py = 4; }
+
+ // draw
+ gfxSetTexture(TEXTURE_ALBUMART);
+ gfxSetAspect(0);
+ gfxTranslate(((px / 28.0f) - 0.5f), (py / 20.0f) - 0.5f, 2.414f);
+ gfxBegin(PRIM_QUADLIST);
+
+ gfxColour(1.0f, 1.0f, 1.0f, 1);
+ Quad(Sin(rot),(Fabs(Sin(zoom)) + 0.25)*5);
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/Awakenings.vtx b/addons/visualization.vortex/resources/Presets/Awakenings.vtx
new file mode 100644
index 0000000000..e052516855
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Awakenings.vtx
@@ -0,0 +1,125 @@
+// Awakenings.vtx
+// Author - MrC
+// Based on Awakenings_remix.r4 by John Baker and Gordon Williams
+
+int x,y;
+float c,tm,tn,td;
+float[] c_x(256),c_y(256),c_z(256),c_vz(256),c_rx(256),c_ry(256),c_sx(256),c_sy(256),c_sz(256);
+float d;
+
+Texture envTexture;
+
+void MakeNew(int n)
+{
+ c_x[n]=c_y[n]=0;
+ while (Mag(c_x[n],c_y[n])<1)
+ {
+ c_x[n] = (Rand()*8.0)-4.0;
+ c_y[n] = (Rand()*8.0)-4.0;
+ }
+
+ c_z[n] = 10;
+ c_vz[n] = (1.0+Rand())*4;
+ c_rx[n] = (1.0+Rand())*80;
+ c_ry[n] = (1.0+Rand())*80;
+ c_sx[n] = (0.5+Rand())*0.5;
+ c_sy[n] = (0.5+Rand())*0.5;
+ c_sz[n] = (0.5+Rand())*0.05;
+}
+
+
+void Init()
+{
+ envTexture.LoadTexture("xbmc_icon.png");
+
+ for (x=0;x<256;x=x+1)
+ {
+ MakeNew(x);
+ c_z[x] = Rand()*10;
+ }
+ tm = tn = 0;
+}
+
+void mything(float x,float y,float z)
+{
+ gfxBegin(PRIM_QUADLIST);
+ gfxTexCoord(0,0);
+ gfxVertex(-x,y,0);
+ gfxTexCoord(1,0);
+ gfxVertex(x,y,0);
+ gfxTexCoord(1,1);
+ gfxVertex(x,-y,0);
+ gfxTexCoord(0,1);
+ gfxVertex(-x,-y,0);
+
+ gfxTexCoord(0,0);
+ gfxVertex(-x,0,z);
+ gfxTexCoord(1,0);
+ gfxVertex(x,0,z);
+ gfxTexCoord(1,1);
+ gfxVertex(x,0,-z);
+ gfxTexCoord(0,1);
+ gfxVertex(-x,0,-z);
+
+ gfxTexCoord(0,0);
+ gfxVertex(0,-y,z);
+ gfxTexCoord(1,0);
+ gfxVertex(0,y,z);
+ gfxTexCoord(1,1);
+ gfxVertex(0,y,-z);
+ gfxTexCoord(0,1);
+ gfxVertex(0,-y,-z);
+ gfxEnd();
+}
+
+void Render()
+{
+ td = ((TREBLE+1.5f) * TIMEPASS);
+ tm = tm + td;
+ tn = tn + ((BASS+1.0) * TIMEPASS * 2);
+
+ gfxTranslate(Cos(tn * 1.23f) * 0.25f, Sin(tn) * 0.25f, 0.0f);
+ gfxRotate(Cos(tn*0.6734f)*20.0f, 1.0f, 0.0f, 0.0f);
+ gfxRotate(Sin(tn*0.2143f)*20.0f, 0.0f, 1.0f, 0.0f);
+
+ gfxSetBlendMode(BLEND_MOD);
+ gfxSetTexture(envTexture);
+ gfxTranslate(0, 0, 3+BASS);
+ gfxBegin(PRIM_QUADLIST);
+ gfxTexCoord(0, 0);
+ gfxVertex(-1.5, 1,0);
+ gfxTexCoord(1, 0);
+ gfxVertex(1.5, 1,0);
+ gfxTexCoord(1, 1);
+ gfxVertex(1.5, -1,0);
+ gfxTexCoord(0, 1);
+ gfxVertex(-1.5, -1,0);
+ gfxEnd();
+ gfxTranslate(0, 0, -3-BASS);
+
+ gfxSetTexture(envTexture);
+ gfxSetBlendMode(BLEND_ADD);
+
+ for (x=255;x>0;x=x-1)
+ {
+ c_z[x] = c_z[x] - (td*c_vz[x]);
+ if (c_z[x]<0) MakeNew(x);
+
+ c = (5.0-(c_z[x]*0.5))*0.1;
+ if (c>1.75) c=(2-c)*4;
+ if (c>1) c=1;
+
+ d = (20.0-(c_z[x]*2.0))*0.1;
+ if (d>1.75) d=(2-c)*4;
+ if (d>1) c=1;
+
+ gfxColour(c,d*(TREBLE+1)*0.5,c,1);
+ gfxPushMatrix();
+ gfxTranslate(c_x[x],c_y[x],c_z[x]);
+ gfxRotate(c_rx[x]*tm,1.0f,0.0f,0.0f);
+ gfxRotate(c_ry[x]*tm,0.0f,1.0f,0.0f);
+ mything(c_sx[x],c_sy[x],c_sz[x]);
+ gfxPopMatrix();
+ }
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/Block.tra b/addons/visualization.vortex/resources/Presets/Block.tra
new file mode 100644
index 0000000000..6f3526bfbe
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Block.tra
@@ -0,0 +1,88 @@
+// Block.tra
+// Author - MrC
+// Based on FadeBlocks.r4 by Gordon Williams
+
+int i,x,y;
+float dx,dy,sx,sy,dd,a,b,mytime;
+float[] d(64);
+Texture mix;
+
+void Init()
+{
+ mix.CreateTexture();
+ for (x=0;x<64;x=x+1)
+ d[x] = Rand()-0.5;
+ mytime = 0;
+}
+
+void Rect(float x0, float y0, float x1, float y1)
+{
+ gfxBegin(PRIM_QUADLIST);
+
+ gfxTexCoord(0,1);
+ gfxVertex(x0, y0, 0.0);
+ gfxTexCoord(1, 1);
+ gfxVertex(x1, y0, 0.0);
+ gfxTexCoord(1, 0);
+ gfxVertex(x1, y1, 0.0);
+ gfxTexCoord(0, 0);
+ gfxVertex(x0, y1, 0.0);
+
+ gfxEnd();
+
+}
+void Render()
+{
+ mytime = mytime + (TIMEPASS*0.25);
+ FINISHED = mytime>=1.0;
+ b = (1.0-Cos(mytime*3.14159))*0.5;
+
+
+ gfxSetRenderTarget(mix);
+ gfxClear(0);
+ gfxSetAspect(0);
+ a = -2.414;
+ gfxTranslate(0, 0, -a);
+ gfxSetBlendMode(BLEND_MOD);
+ gfxColour(1, 1, 1, 1-b);
+ gfxSetTexture(TEXTURE_CURRPRESET);
+ gfxTexRect(-1, 1, 1, -1);
+ gfxColour(1, 1, 1, b);
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxTexRect(-1, -1, 1, 1);
+
+ gfxSetRenderTarget(TEXTURE_FRAMEBUFFER);
+ gfxSetBlendMode(BLEND_OFF);
+
+
+ gfxSetAspect((1.0-Cos(b*3.14159*2.0))*0.5);
+
+ gfxRotate(b*180, 0, 1, 0);
+ gfxRotate(b*180, 0, 0, 1);
+ gfxColour(1, 1, 1, 1);
+
+ gfxSetTexture(mix);
+
+ gfxBegin(PRIM_QUADLIST);
+
+ for (i=0;i<64;i=i+1)
+ {
+ x = i%8;
+ y = i/8;
+ dx = (x/8.0);
+ dy = (y/8.0);
+ sx = ((x+1.0)/8.0);
+ sy = ((y+1.0)/8.0);
+ dd = 0.83*(a-((0.5-b)*2*d[i]));
+ gfxTexCoord(1.0-dx,dy);
+ gfxVertex(dd*(dx-0.5),dd*(dy-0.5),d[i]);
+ gfxTexCoord(1.0-sx,dy);
+ gfxVertex(dd*(sx-0.5),dd*(dy-0.5),d[i]);
+ gfxTexCoord(1.0-sx,sy);
+ gfxVertex(dd*(sx-0.5),dd*(sy-0.5),d[i]);
+ gfxTexCoord(1.0-dx,sy);
+ gfxVertex(dd*(dx-0.5),dd*(sy-0.5),d[i]);
+ }
+ gfxEnd();
+
+}
diff --git a/addons/visualization.vortex/resources/Presets/ChessMania.vtx b/addons/visualization.vortex/resources/Presets/ChessMania.vtx
new file mode 100644
index 0000000000..278d36c612
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/ChessMania.vtx
@@ -0,0 +1,90 @@
+// ChessMania.vtx
+// Author - MrC
+// Based on Rovastar - Chessmania.r4 by John Baker
+
+Texture checker;
+Texture tex1;
+Texture tex2;
+
+float[] cubeRot(3*3);
+float[] cubePos(3*3);
+
+void Init()
+{
+ checker.LoadTexture("checker.png");
+ tex1.CreateTexture();
+ tex2.CreateTexture();
+
+ for (int i=0; i<9;i++)
+ {
+ cubePos[i] = 0.0f;
+ cubeRot[i] = 0.0f;
+ }
+
+}
+
+void RenderCube(int cube, float dist)
+{
+ gfxPushMatrix();
+ gfxTranslate(0, 0, dist);
+
+ gfxRotate(cubePos[0+cube*3],1,0,0);
+ gfxRotate(cubePos[1+cube*3],0,0,1);
+ gfxRotate(cubePos[2+cube*3],0,1,0);
+
+ gfxCube(-0.25f, -0.25f, -0.25f, 0.25f, 0.25f, 0.25f);
+ gfxPopMatrix();
+}
+
+void Render()
+{
+ gfxSetTexture(checker);
+
+ gfxTranslate(0,0,2.414);
+
+ for (int i=0; i<9;i++)
+ {
+ cubePos[i] = cubePos[i] + cubeRot[i];
+ cubeRot[i] = cubeRot[i] * 0.95;
+ if (cubeRot[i] > 1)
+ cubeRot[i] = 1;
+ if (cubeRot[i] < -1)
+ cubeRot[i] = -1;
+ }
+
+ cubeRot[0] += BASS;
+ cubeRot[1] += MIDDLE;
+ cubeRot[2] += TREBLE;
+
+ cubeRot[4] += BASS;
+ cubeRot[5] += MIDDLE;
+ cubeRot[3] += TREBLE;
+
+ cubeRot[8] += BASS;
+ cubeRot[6] += MIDDLE;
+ cubeRot[7] += TREBLE;
+
+ gfxSetRenderTarget(tex1);
+ gfxClear(0);
+ gfxSetTexture(checker);
+ gfxSetAspect(0);
+ gfxTexRect(-1, -1, 1, 1);
+ RenderCube(2, -1.0);
+
+ gfxSetRenderTarget(tex2);
+ gfxClear(0);
+ gfxSetTexture(checker);
+ gfxSetAspect(0);
+ gfxTexRect(-1, -1, 1, 1);
+ gfxSetTexture(tex1);
+ RenderCube(1, -1.0);
+
+ gfxSetRenderTarget(TEXTURE_FRAMEBUFFER);
+ gfxSetTexture(checker);
+ gfxSetAspect(0);
+ gfxTexRect(-1, -1, 1, 1);
+ gfxSetTexture(tex2);
+ gfxSetAspect(1);
+ RenderCube(0, -1.15);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/CubeBlowOut.tra b/addons/visualization.vortex/resources/Presets/CubeBlowOut.tra
new file mode 100644
index 0000000000..4674c0972e
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeBlowOut.tra
@@ -0,0 +1,160 @@
+// CubeBlowOut.tra
+// Author - MrC
+// Based on FadeCubeBlowOut.r4 by Gordon Williams
+
+int x,y;
+float c,tm,td,ftime,fric;
+float[] c_tx(64),c_ty(64),c_x(64),c_y(64),c_z(64),c_vx(64),c_vy(64),c_vz(64),c_rx(64),c_ry(64);
+const float dx = 0.125;
+const float dy = 0.125;
+
+void Init()
+{
+ reset();
+}
+
+void makenew(int n)
+{
+ c_tx[n]=(n%8)/8.0;
+ c_ty[n]=(n-(n%8))/64.0;
+ c_x[n] = (c_tx[n]-0.5)*2+dx;
+ c_y[n] = (c_ty[n]-0.5)*2+dy;
+ c_z[n] = 0;
+ c_vx[n] = (c_x[n]+Rand()-0.5);
+ c_vy[n] = (c_y[n]+Rand());
+ c_vz[n] = (1.0+Rand());
+ c_rx[n] = (1.0+Rand())*160;
+ c_ry[n] = (1.0+Rand())*160;
+}
+
+void drawcube(int n)
+{
+ gfxBegin(PRIM_QUADLIST);
+ // FRONT FACE
+ gfxTexCoord(c_tx[n],c_ty[n]);
+ gfxVertex(-1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(1,1,-1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,-1);
+ // BACK
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(-1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,1);
+ // LEFT
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(-1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(-1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(-1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,-1);
+ // RIGHT
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(1,1,-1);
+ // UP
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(-1,-1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,-1,-1);
+ // DOWN
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(1,1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(-1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,-1);
+
+ gfxEnd();
+}
+
+void reset()
+{
+ for (x=0;x<64;x=x+1)
+ {
+ makenew(x);
+ }
+ tm = 0;
+ ftime = 0;
+}
+
+void Render()
+{
+ gfxPushMatrix();
+ gfxTranslate(0, 0, 2.414);
+ gfxSetAspect(0);
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+ gfxPopMatrix();
+ gfxSetAspect(1);
+ gfxSetTexture(TEXTURE_CURRPRESET);
+
+
+ if (ftime<0.1)
+ td = TIMEPASS*(ftime*10);
+ else
+ td = TIMEPASS;
+ tm = tm+td;
+
+ ftime = ftime + (TIMEPASS*0.225);
+ if (ftime>0.6)
+ {
+ ftime=1;
+ FINISHED = true;
+ return;
+ }
+
+ gfxPushMatrix();
+
+ gfxSetAspect(0);
+ gfxScale(-1,1,1);
+ gfxTranslate(0,0,2.414);
+ gfxTranslate(0,0,-dx);
+ gfxRotate(180,0,1,0);
+
+ fric = Pow(0.75,td);
+
+ for (x=0;x<64;x=x+1)
+ {
+ c_vy[x] = c_vy[x] - (td*2);
+ c_x[x] = c_x[x] + (td*c_vx[x]);
+ c_y[x] = c_y[x] + (td*c_vy[x]);
+ c_z[x] = c_z[x] + (td*c_vz[x]);
+ c_vx[x] = c_vx[x]*fric;
+ c_vy[x] = c_vy[x]*fric;
+ c_vz[x] = c_vz[x]*fric;
+
+ gfxPushMatrix();
+ gfxTranslate(c_x[x],c_y[x],c_z[x]);
+ gfxRotate(c_rx[x]*tm,1,0,0);
+ gfxRotate(c_ry[x]*tm,0,1,0);
+ gfxScale(dx,dx,dx);
+ drawcube(x);
+
+ gfxPopMatrix();
+
+ }
+
+ gfxPopMatrix();
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/CubeGrid.vtx b/addons/visualization.vortex/resources/Presets/CubeGrid.vtx
new file mode 100644
index 0000000000..bbceb82676
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeGrid.vtx
@@ -0,0 +1,69 @@
+// CubeGrid.vtx
+// Author - MrC
+// Based on CubeGrid.r4 by Gordon Williams
+
+int x,y,z;
+float t,c;
+float bt,bs;
+float time;
+
+const int XMAX = 3;
+const int YMAX = 3;
+const int ZMAX = 5;
+
+Texture envTexture;
+
+void Init()
+{
+ t = 0;
+ bt = 0;
+ bs = 0;
+ time = 0;
+ envTexture.LoadTexture("env3.png");
+}
+
+void Render()
+{
+ bt = bt + (TIMEPASS*(MIDDLE+0.5f));
+ bs = bs + (TIMEPASS*(TREBLE+0.5f));
+ t = t + (TIMEPASS*2.5);
+ while (t>1.0)
+ {
+ t=t-1.0;
+ }
+
+ time = time + TIMEPASS;
+
+ gfxRotate(time*60.0f, 0.0f, 0.0f, 1.0f);
+ gfxRotate(bt*53.0f, 1.0f, 0.0f, 1.0f);
+ gfxRotate(bs*62.0f, 0.0f, 1.0f, 0.0f);
+
+ gfxSetEnvTexture(envTexture);
+
+ gfxTranslate(-XMAX*0.5f, -YMAX*0.5f, -3.0f+t);
+ for (z=0;z<=ZMAX;z=z+1)
+ {
+ c=1;
+ if (z==0)
+ c = t;
+ if (z==ZMAX)
+ c = 1.0f - t;
+ gfxColour(c,c,c,1);
+ for (y=0;y<=YMAX;y=y+1)
+ {
+ for (x=0;x<=XMAX;x=x+1)
+ {
+ gfxCube(x-0.15f, y-0.15f, z-0.15f, x+0.15f, y+0.15f, z+0.15f);
+ if (x<XMAX)
+ {
+ gfxCube(x+0.15f, y-0.05f, z-0.05f, x+0.85f, y+0.05f, z+0.05f);
+ }
+ if (y<YMAX)
+ {
+ gfxCube(x-0.05f, y+0.15f, z-0.05f, x+0.05f, y+0.85f, z+0.05f);
+ }
+ gfxCube(x-0.05f, y-0.05f, z+0.15f, x+0.05f, y+0.05f, z+0.85f);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/CubeGridStrobe.vtx b/addons/visualization.vortex/resources/Presets/CubeGridStrobe.vtx
new file mode 100644
index 0000000000..5180032c17
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeGridStrobe.vtx
@@ -0,0 +1,74 @@
+// CubeGridStrobe.vtx
+// Author - Pike
+// Based on CubeGrid.r4 by Gordon Williams
+
+int x,y,z;
+float t,c;
+float bt,bs;
+float time;
+
+const int XMAX = 3;
+const int YMAX = 3;
+const int ZMAX = 5;
+
+Texture envTexture;
+Texture envTexture1;
+
+void Init()
+{
+ t = 0;
+ bt = 0;
+ bs = 0;
+ time = 0;
+ envTexture.LoadTexture("env2.jpg");
+ envTexture1.LoadTexture("env3_darker.png");
+}
+
+void Render()
+{
+ bt = bt + (TIMEPASS*(MIDDLE+0.5f));
+ bs = bs + (TIMEPASS*(TREBLE+0.5f));
+ t = t + (TIMEPASS*2.5);
+ while (t>1.0)
+ {
+ t=t-1.0;
+ }
+
+ time = time + TIMEPASS;
+
+ gfxRotate(time*60.0f, 0.0f, 0.0f, 1.0f);
+ gfxRotate(bt*53.0f, 1.0f, 0.0f, 1.0f);
+ gfxRotate(bs*62.0f, 0.0f, 1.0f, 0.0f);
+
+ if (TREBLE > 0.5)
+ gfxSetEnvTexture(envTexture);
+ else
+ gfxSetEnvTexture(envTexture1);
+
+ gfxTranslate(-XMAX*0.5f, -YMAX*0.5f, -3.0f+t);
+ for (z=0;z<=ZMAX;z=z+1)
+ {
+ c=1;
+ if (z==0)
+ c = t;
+ if (z==ZMAX)
+ c = 1.0f - t;
+ gfxColour(c,c,c,1);
+ for (y=0;y<=YMAX;y=y+1)
+ {
+ for (x=0;x<=XMAX;x=x+1)
+ {
+ gfxCube(x-0.15f, y-0.15f, z-0.15f, x+0.15f, y+0.15f, z+0.15f);
+ if (x<XMAX)
+ {
+ gfxCube(x+0.15f, y-0.05f, z-0.05f, x+0.85f, y+0.05f, z+0.05f);
+ }
+ if (y<YMAX)
+ {
+ gfxCube(x-0.05f, y+0.15f, z-0.05f, x+0.05f, y+0.85f, z+0.05f);
+ }
+ gfxCube(x-0.05f, y-0.05f, z+0.15f, x+0.05f, y+0.05f, z+0.85f);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/CubeGridWire.vtx b/addons/visualization.vortex/resources/Presets/CubeGridWire.vtx
new file mode 100644
index 0000000000..18d848d0f6
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeGridWire.vtx
@@ -0,0 +1,75 @@
+// CubeGridWire.vtx
+// Author - MrC
+// Based on CubeGrid.r4 by Gordon Williams
+
+int x,y,z;
+float t,c;
+float bt,bs;
+float time;
+
+const int XMAX = 3;
+const int YMAX = 3;
+const int ZMAX = 5;
+
+Texture envTexture;
+
+void Init()
+{
+ t = 0;
+ bt = 0;
+ bs = 0;
+ time = 0;
+ envTexture.LoadTexture("env2.jpg");
+}
+
+void Render()
+{
+ bt = bt + (TIMEPASS*(MIDDLE+0.5f));
+ bs = bs + (TIMEPASS*(TREBLE+0.5f));
+ t = t + (TIMEPASS*2.5);
+ while (t>1.0)
+ {
+ t=t-1.0;
+ }
+
+ time = time + TIMEPASS;
+
+ gfxRotate(time*60.0f, 0.0f, 0.0f, 1.0f);
+ gfxRotate(bt*53.0f, 1.0f, 0.0f, 1.0f);
+ gfxRotate(bs*62.0f, 0.0f, 1.0f, 0.0f);
+
+ if (TREBLE < 0.5)
+ {
+ gfxSetTexture(NULL);
+ gfxSetFillMode(FILLMODE_WIREFRAME);
+ }
+ else
+ gfxSetEnvTexture(envTexture);
+
+ gfxTranslate(-XMAX*0.5f, -YMAX*0.5f, -3.0f+t);
+ for (z=0;z<=ZMAX;z=z+1)
+ {
+ c=1;
+ if (z==0)
+ c = t;
+ if (z==ZMAX)
+ c = 1.0f - t;
+ gfxColour(c,c,c,1);
+ for (y=0;y<=YMAX;y=y+1)
+ {
+ for (x=0;x<=XMAX;x=x+1)
+ {
+ gfxCube(x-0.15f, y-0.15f, z-0.15f, x+0.15f, y+0.15f, z+0.15f);
+ if (x<XMAX)
+ {
+ gfxCube(x+0.15f, y-0.05f, z-0.05f, x+0.85f, y+0.05f, z+0.05f);
+ }
+ if (y<YMAX)
+ {
+ gfxCube(x-0.05f, y+0.15f, z-0.05f, x+0.05f, y+0.85f, z+0.05f);
+ }
+ gfxCube(x-0.05f, y-0.05f, z+0.15f, x+0.05f, y+0.05f, z+0.85f);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/CubeRain.vtx b/addons/visualization.vortex/resources/Presets/CubeRain.vtx
new file mode 100644
index 0000000000..5ddbae8e55
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeRain.vtx
@@ -0,0 +1,70 @@
+// CubeRain.vtx
+// Author - MrC
+// Based on CubeRain.r4 By Gordon Williams
+int x,y;
+float c,tm,tn,td;
+float[] c_x(256),c_y(256),c_z(256),c_vz(256),c_rx(256),c_ry(256),c_sx(256),c_sy(256),c_sz(256);
+
+float counter;
+Texture envTexture;
+
+void MakeNew(int n)
+{
+ c_x[n]=c_y[n]=0;
+ while (Mag(c_x[n],c_y[n])<1)
+ {
+ c_x[n] = (Rand()*8.0)-4.0;
+ c_y[n] = (Rand()*8.0)-4.0;
+ }
+
+ c_z[n] = 10;
+ c_vz[n] = (1.0+Rand())*4;
+ c_rx[n] = (1.0+Rand())*80;
+ c_ry[n] = (1.0+Rand())*80;
+ c_sx[n] = (0.5+Rand())*0.15;
+ c_sy[n] = (0.5+Rand())*0.15;
+ c_sz[n] = (0.5+Rand())*0.15;
+}
+
+void Init()
+{
+ envTexture.LoadTexture("env2.jpg");
+ counter = 0;
+
+ for (x=0;x<256;x=x+1)
+ {
+ MakeNew(x);
+ c_z[x] = Rand()*10;
+ }
+ tm = tn = 0;
+}
+
+void Render()
+{
+ td = ((TREBLE+1.0f)*TIMEPASS);
+ tm = tm + td;
+ tn = tn + ((BASS+1.5)*TIMEPASS*2);
+
+ gfxTranslate(Cos(tn * 1.23f) * 0.5f, Sin(tn) * 0.5f, 0.0f);
+ gfxRotate(Cos(tn*0.6734f)*20.0f, 1.0f, 0.0f, 0.0f);
+ gfxRotate(Sin(tn*0.2143f)*20.0f, 0.0f, 1.0f, 0.0f);
+
+ gfxSetEnvTexture(envTexture);
+
+ for (x=0;x<256;x=x+1)
+ {
+ c_z[x] = c_z[x] - (td*c_vz[x]);
+ if (c_z[x]<0)
+ {
+ MakeNew(x);
+ }
+ c = Cos(c_z[x]*0.05*3.1416);
+ gfxColour(c,c,c,1);
+ gfxPushMatrix();
+ gfxTranslate(c_x[x],c_y[x],c_z[x]);
+ gfxRotate(c_rx[x]*tm, 1, 0, 0);
+ gfxRotate(c_ry[x]*tm, 0, 1, 0);
+ gfxCube(-c_sx[x],-c_sy[x],-c_sz[x],c_sx[x],c_sy[x],c_sz[x]);
+ gfxPopMatrix();
+ }
+}
diff --git a/addons/visualization.vortex/resources/Presets/CubeSlide.vtx b/addons/visualization.vortex/resources/Presets/CubeSlide.vtx
new file mode 100644
index 0000000000..09beb21c3c
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeSlide.vtx
@@ -0,0 +1,69 @@
+// CubeSlide.vtx
+// Author - MrC
+// Based on CubeSlide.r4 by Gordon Williams
+
+Texture env;
+Texture skybox;
+
+int x,y;
+float tm,tn,ofs,c;
+
+void Init()
+{
+ skybox.LoadTexture("skybox.dds");
+ env.LoadTexture("tex_edge.png");
+}
+
+void reset()
+{
+ tm = 0;
+ tn = 0;
+}
+
+float tiltfunc(float p)
+{
+ return (Sin((ofs+p)*0.1)+Cos((ofs+p)*0.123))*10.0;
+}
+
+void Render()
+{
+ tm = tm + 1 * TIMEPASS * 8;
+
+ if (TREBLE > 0.0)
+ tm = tm + ((TREBLE) * TIMEPASS * 20);
+
+ while (tm>1)
+ {
+ tm = tm-1;
+ ofs = ofs + 1;
+ }
+
+ tn = tn + ((BASS+1.5)*TIMEPASS);
+
+
+ gfxSetAspect(0);
+ gfxLookAt(Cos(tn*1.23)*5,Sin(tn)*5,(tm*2)-1,Cos(tn*0.6734)*2,Sin(tn*0.2143)*2,(tm*2)+8,0,1,0);
+ gfxRotate(-tiltfunc(0)*tm,0,0,1);
+
+ gfxSetTexture(skybox);
+ gfxPushMatrix();
+ gfxTranslate(0,0,tm*2);
+ gfxRotate(tiltfunc(0)*tm,0,0,1);
+ gfxCube(-400,-400,-400,400,400,400);
+ gfxPopMatrix();
+ gfxSetTexture(env);
+
+ gfxSetBlendMode(BLEND_ADD);
+
+ for (y=0;y<15;y=y+1)
+ {
+ c = 1.0 - ((y-tm)/15.0);
+ for (x=-3;x<4;x=x+1)
+ {
+ gfxColour(c,c,c,1);
+ gfxCube((x*2)-0.75,-0.375,(y*2)-0.75, (x*2)+0.75,0.375,(y*2)+0.75);
+ }
+ gfxRotate(tiltfunc(y),0,0,1);
+ }
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/CubeTunnel.vtx b/addons/visualization.vortex/resources/Presets/CubeTunnel.vtx
new file mode 100644
index 0000000000..9bb7a69940
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/CubeTunnel.vtx
@@ -0,0 +1,66 @@
+// CubeTunnel.vtx
+// Author - MrC
+// Based on CubeTunnel.r4 By Gordon Williams
+
+Texture texture;
+Texture sky;
+
+int x,y;
+float tm,tn,ofs,c,ox,oy,stretch;
+
+void Init()
+{
+ sky.LoadTexture("skybox.dds");
+ texture.LoadTexture("plasma_edge.jpg");
+
+ tm = 0;
+ tn = 0;
+}
+
+float tiltfunc(float p)
+{
+ float a = (Sin((ofs+p)*0.1) + Cos((ofs+p)*0.423))*15.0;
+ return a;
+}
+
+void Render()
+{
+ tm = tm + ((TREBLE+1.5)*TIMEPASS*8);
+ while (tm>1)
+ {
+ tm = tm-1;
+ ofs = ofs + 1;
+ }
+
+
+ tn = tn + ((BASS+1.5)*TIMEPASS);
+
+ stretch = 3.5+(Sin(tn*1.23)*2);
+
+ gfxSetAspect(0);
+ gfxLookAt(Cos(tn*1.23)*2.5, Sin(tn)*2.5,(tm*stretch)-1,Cos(tn*0.6734)*2,Sin(tn*0.2143)*2,(tm*stretch)+6,0.0,1.0,0.0);
+ gfxRotate(-tiltfunc(0)*tm,0,0,1);
+
+ gfxSetTexture(sky);
+ gfxPushMatrix();
+ gfxTranslate(0, 0, tm*stretch);
+ gfxRotate(tiltfunc(0)*tm,0,0,1);
+ gfxCube(-400,-400,-400,400,400,400);
+ gfxPopMatrix();
+
+ gfxSetTexture(texture);
+
+ gfxSetBlendMode(BLEND_ADD);
+ for (y=0;y<15;y=y+1)
+ {
+ c = 1.0 - ((y-tm)/15.0);
+ for (x=0;x<8;x=x+1)
+ {
+ gfxColour(c,c,c,1);
+ ox = Sin(x*3.14159*0.25)*5;
+ oy = Cos(x*3.14159*0.25)*5;
+ gfxCube(ox-0.75,oy-0.75,(y*stretch)-(0.75*stretch), 0.75+ox,oy+0.75,(y*stretch)+(0.75*stretch));
+ }
+ gfxRotate(tiltfunc(y),0,0,1);
+ }
+}
diff --git a/addons/visualization.vortex/resources/Presets/Cubes.tra b/addons/visualization.vortex/resources/Presets/Cubes.tra
new file mode 100644
index 0000000000..c66439a597
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Cubes.tra
@@ -0,0 +1,162 @@
+// Cube.tra
+// Author - MrC
+// Based on FadeCube.r4 By Gordon Williams
+
+int x,y;
+float c,tm,td,ftime,fric;
+float[] c_tx(64),c_ty(64),c_x(64),c_y(64),c_z(64),c_vx(64),c_vy(64),c_vz(64),c_rx(64),c_ry(64);
+const float dx = 0.125;
+const float dy = 0.125;
+
+void Init()
+{
+ reset();
+}
+
+void makenew(int n)
+{
+ c_tx[n]=(n%8)/8.0;
+ c_ty[n]=(n-(n%8))/64.0;
+ c_x[n] = (c_tx[n]-0.5)*2+dx;
+ c_y[n] = (c_ty[n]-0.5)*2+dy;
+ c_z[n] = 0;
+ c_vx[n] = (c_x[n]+Rand()-0.5);
+ c_vy[n] = (c_y[n]+Rand());
+ c_vz[n] = -(1.0+Rand());
+ c_rx[n] = (1.0+Rand())*160;
+ c_ry[n] = (1.0+Rand())*160;
+}
+
+void drawcube(int n)
+{
+ gfxBegin(PRIM_QUADLIST);
+ // FRONT FACE
+ gfxTexCoord(c_tx[n],c_ty[n]);
+ gfxVertex(-1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(1,1,-1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,-1);
+ // BACK
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(-1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,1);
+ // LEFT
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(-1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(-1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(-1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,-1);
+ // RIGHT
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(1,1,-1);
+ // UP
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(1,-1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,-1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(-1,-1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,-1,-1);
+ // DOWN
+ gfxTexCoord(c_tx[n],1-(c_ty[n]));
+ gfxVertex(1,1,-1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]));
+ gfxVertex(1,1,1);
+ gfxTexCoord(c_tx[n]+dx,1-(c_ty[n]+dy));
+ gfxVertex(-1,1,1);
+ gfxTexCoord(c_tx[n],1-(c_ty[n]+dy));
+ gfxVertex(-1,1,-1);
+
+ gfxEnd();
+}
+
+void reset()
+{
+ for (x=0;x<64;x=x+1)
+ {
+ makenew(x);
+ }
+ tm = 0;
+ ftime = 0;
+}
+
+void Render()
+{
+ gfxPushMatrix();
+ gfxTranslate(0, 0, 2.414);
+ gfxSetAspect(0);
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+ gfxPopMatrix();
+ gfxSetAspect(1);
+ gfxSetTexture(TEXTURE_CURRPRESET);
+
+ if (ftime<0.1)
+ td = TIMEPASS*(ftime*10);
+ else
+ td = TIMEPASS;
+ tm = tm+td;
+
+ ftime = ftime + (TIMEPASS*0.225);
+ if (ftime>1)
+ {
+ ftime=1;
+ FINISHED = true;
+ return;
+ }
+
+ gfxPushMatrix();
+
+ gfxSetAspect(0);
+ gfxScale(-1,1,1);
+ gfxTranslate(0,0,2.414);
+ gfxTranslate(0,0,dx);
+
+ gfxRotate(180,0,1,0);
+
+
+ fric = Pow(0.75,td);
+
+
+ for (x=0;x<64;x=x+1)
+ {
+ c_vy[x] = c_vy[x] - (td*2);
+ c_x[x] = c_x[x] + (td*c_vx[x]);
+ c_y[x] = c_y[x] + (td*c_vy[x]);
+ c_z[x] = c_z[x] + (td*c_vz[x]);
+ c_vx[x] = c_vx[x]*fric;
+ c_vy[x] = c_vy[x]*fric;
+ c_vz[x] = c_vz[x]*fric;
+
+ gfxPushMatrix();
+ gfxTranslate(c_x[x],c_y[x],c_z[x]);
+ gfxRotate(c_rx[x]*tm,1,0,0);
+ gfxRotate(c_ry[x]*tm,0,1,0);
+ gfxScale(dx,dx,dx);
+ drawcube(x);
+
+ gfxPopMatrix();
+
+ }
+
+ gfxPopMatrix();
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/DynamicCubeTunnel.vtx b/addons/visualization.vortex/resources/Presets/DynamicCubeTunnel.vtx
new file mode 100644
index 0000000000..1f78e1c3e1
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/DynamicCubeTunnel.vtx
@@ -0,0 +1,176 @@
+// DynamicCubeTunnel.vtx
+// Author - MrC
+// Based on DynamicCubeTunnel.r4 by Gordon Williams
+
+Texture env;
+Texture skybox;
+Map map;
+
+
+int x,y;
+float tm,tn,ofs,c;
+float btime,ctime;
+float[] v(32*24),o(32*24),va(32*24),oa(32*24);
+float[] pv(4),po(4);
+int sx,sy,i;
+float wa,txa,txb,tya,tyb;
+
+
+void Init()
+{
+ skybox.LoadTexture("skybox.dds");
+ env.LoadTexture("huemap.jpg");
+ map.SetTimed();
+ reset();
+}
+
+void reset()
+{
+ tm = 0;
+ tn = 0;
+ btime = 0;
+ ctime = 0;
+
+ for (sy=0;sy<24;sy=sy+1)
+ {
+ for (sx=0;sx<32;sx=sx+1)
+ {
+ v[sy*32 + sx] = Rand()+1.0;
+ o[sy*32 + sx] = Rand()*6.3;
+ va[sy*32 + sx] = (Rand()+1.0)*3.0;
+ oa[sy*32 + sx] = Rand()*6.3;
+ }
+ }
+
+
+ for (i=0;i<4;i=i+1)
+ {
+ pv[i] = Rand()+1.0;
+ po[i] = Rand()*6.3;
+ }
+
+}
+
+float tiltfunc(float p)
+{
+ return (Sin((ofs+p)*0.1)+Cos((ofs+p)*0.123))*10.0;
+}
+
+void Render()
+{
+
+ btime = btime + (TIMEPASS*(TREBLE+0.5)*2.0);
+ ctime = ctime + (TIMEPASS*(BASS+0.5)*0.5);
+
+ for (sy=0;sy<24;sy=sy+1)
+ for (sx=0;sx<32;sx=sx+1)
+ {
+ float tu = ((sx-15.5)/16) + Sin(oa[sy * 32 + sx] + (va[sy * 32 + sx]*btime));
+ float tv = ((sy-11.5)/12) + Sin(o[sy * 32 + sx] + (v[sy * 32 + sx]*btime));
+ map.SetValues(sx, sy, tu, tv, -1.5, -1.5, -1.5);
+ }
+
+ map.Render();
+
+ gfxPushMatrix();
+ gfxSetAspect(0);
+ gfxTranslate(0,0,2.414);
+
+ gfxSetTexture(env);
+ gfxSetBlendMode(BLEND_MOD);
+
+ gfxSetRenderTarget(map);
+
+ txa = (Sin(po[0]+(ctime*pv[0]))*2.0);
+ tya = (Sin(po[1]+(ctime*pv[1]))*2.0);
+ txb = (Sin(po[2]+(ctime*pv[2]))*2.0);
+ tyb = (Sin(po[3]+(ctime*pv[3]))*2.0);
+
+ gfxBegin(PRIM_QUADLIST);
+ // bottom
+ gfxColour(1,1,1,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(-1,-0.9,0);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(1,-0.9,0);
+ gfxColour(1,1,1,1);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(1,-1.0,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(-1,-1.0,0);
+
+ // top
+ gfxColour(1,1,1,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(-1,0.9,0);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(1,0.9,0);
+ gfxColour(1,1,1,1);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(1,1.0,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(-1,1.0,0);
+
+ // left
+ gfxColour(1,1,1,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(-0.9,-1,0);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(-0.9,1,0);
+ gfxColour(1,1,1,1);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(-1,1,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(-1,-1,0);
+
+ // right
+ gfxColour(1,1,1,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(0.9,-1,0);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(0.9,1,0);
+ gfxColour(1,1,1,1);
+ gfxTexCoord(txb,tyb);
+ gfxVertex(1,1,0);
+ gfxTexCoord(txa,tya);
+ gfxVertex(1,-1,0);
+ gfxEnd();
+
+ gfxSetRenderTarget(0);
+ gfxSetTexture(map);
+ gfxPopMatrix();
+
+
+ tm = tm + ((TREBLE+1.5)*TIMEPASS*8);
+ while (tm>1)
+ {
+ tm = tm-1;
+ ofs = ofs + 1;
+ }
+
+ tn = tn + ((BASS+1.5)*TIMEPASS);
+
+ gfxSetAspect(0);
+ gfxLookAt(Cos(tn*1.23)*3.5,Sin(tn)*3.5,(tm*2)-1,Cos(tn*0.6734)*2,Sin(tn*0.2143)*2,(tm*2)+8,0,1,0);
+ gfxRotate(-tiltfunc(0)*tm,0,0,1);
+ gfxSetTexture(skybox);
+ gfxPushMatrix();
+ gfxTranslate(0,0,tm*2);
+ gfxRotate(tiltfunc(0)*tm,0,0,1);
+ gfxCube(-400,-400,-400,400,400,400);
+ gfxPopMatrix();
+ gfxSetTexture(map);
+
+ gfxSetBlendMode(BLEND_ADD);
+
+ for (y=0;y<15;y=y+1)
+ {
+ c = 1.0 - ((y-tm)/15.0);
+ gfxColour(c,c,c,1);
+ gfxCube(-4,-4,(y*2)-0.75, 4,-4.5,(y*2)+0.75);
+ gfxCube(-4,4,(y*2)-0.75, 4,4.5,(y*2)+0.75);
+ gfxCube(-4,-4,(y*2)-0.75, -4.5,4,(y*2)+0.75);
+ gfxCube(4,-4,(y*2)-0.75, 4.5,4,(y*2)+0.75);
+ gfxRotate(tiltfunc(y),0,0,1);
+ }
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/FlipBoth.tra b/addons/visualization.vortex/resources/Presets/FlipBoth.tra
new file mode 100644
index 0000000000..5e44bf848d
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/FlipBoth.tra
@@ -0,0 +1,54 @@
+// FlipBoth.tra
+// Author - MrC
+// Based on FadeFlipBoth.r4 by Gordon Williams
+float myTime = 0;
+float d;
+
+void Init()
+{
+
+}
+
+void Rect(float x0, float y0, float x1, float y1)
+{
+ gfxBegin(PRIM_QUADLIST);
+
+ gfxTexCoord(0,1);
+ gfxVertex(x0, y0, 0.0);
+ gfxTexCoord(1, 1);
+ gfxVertex(x1, y0, 0.0);
+ gfxTexCoord(1, 0);
+ gfxVertex(x1, y1, 0.0);
+ gfxTexCoord(0, 0);
+ gfxVertex(x0, y1, 0.0);
+
+ gfxEnd();
+
+}
+void Render()
+{
+ myTime = myTime + (TIMEPASS/1.5);
+
+ FINISHED = myTime>=1.0;
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+
+ d = 0.0-Cos(myTime*3.14159);
+
+ gfxSetTexture(TEXTURE_CURRPRESET);
+ gfxSetBlendMode(BLEND_ADD);
+ gfxColour(1, 1, 1, 0.25);
+
+ Rect(-1.0, -1.0, 0.0 - d, 1.0);
+ Rect(d, -1.0, 1.0, 1.0);
+ Rect(-1.0, -1.0, 1.0, 0 - d);
+ Rect(-1.0, d, 1.0, 1.0);
+
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ Rect(0.0 - d, -1.0, 1.0, 1.0);
+ Rect(-1.0, -1.0, d, 1.0);
+ Rect(-1.0, 0.0 - d, 1.0, 1.0);
+ Rect(-1.0, -1.0, 1.0, d);
+
+}
diff --git a/addons/visualization.vortex/resources/Presets/HamsterMatic.vtx b/addons/visualization.vortex/resources/Presets/HamsterMatic.vtx
new file mode 100644
index 0000000000..7e8cd8d9ec
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/HamsterMatic.vtx
@@ -0,0 +1,104 @@
+// HamsterMatic.vtx
+// Author - MrC
+// Based on HamsterMatic.r4 by Gordon Williams
+
+Texture tex;
+float btime;
+float[] rot(8);
+float[] rots(8);
+int x;
+float dxx,dxy,dyx,dyy;
+// colours
+float ar,ag,ab,br,bg,bb;
+float colamt,coltime;
+
+void Init()
+{
+ int id = Rand() * 3;
+ if (id == 0)
+ tex.LoadTexture("Alien.png");
+ else if (id == 1)
+ tex.LoadTexture("Smiley.png");
+ else
+ tex.LoadTexture("skull.png");
+
+ btime = 0;
+ for (x=0;x<8;x=x+1)
+ {
+ rot[x]=Rand();
+ rots[x]=Rand()+1.0f;
+ }
+ colamt = 1;
+ br = 0.0;
+ bg = 0.0;
+ bb = 0.5;
+ coltime = 1+(Rand()*5);
+}
+
+void quad(float rt, float sz)
+{
+ dxx = Cos(rt)*sz;
+ dxy = Sin(rt)*sz;
+ dyx = Sin(rt)*sz;
+ dyy = 0.0f-Cos(rt)*sz;
+
+ gfxTexCoord((0.0f-dxx)+(0.0f+dyx),(0.0f-dxy)+(0.0f+dyy));
+ gfxVertex(1.0,-1,0);
+ gfxTexCoord((0.0f+dxx)+(0.0f+dyx),(0.0f+dxy)+(0.0f+dyy));
+ gfxVertex(-1.0,-1,0);
+ gfxTexCoord((0.0f+dxx)+(0.0f-dyx),(0.0f+dxy)+(0.0f-dyy));
+ gfxVertex(-1.0,1,0);
+ gfxTexCoord((0.0f-dxx)+(0.0f-dyx),(0.0f-dxy)+(0.0f-dyy));
+ gfxVertex(1.0,1,0);
+}
+
+void Render()
+{
+ gfxSetBlendMode(BLEND_MOD);
+
+ // keep moving
+ btime = btime + TIMEPASS;
+ while (btime>1)
+ {
+ btime = btime - 1;
+ for (x=6;x>=0;x=x-1)
+ {
+ rot[x+1]=rot[x];
+ rots[x+1]=rots[x];
+ }
+ rot[0] = 0;
+ rots[0] = Rand()+1.0f;
+ }
+
+ coltime = coltime - TIMEPASS;
+ if (coltime<0)
+ {
+ coltime = 1+(Rand()*5);
+ ar = br; ag = bg; ab = bb;
+ colamt = 0;
+ x = (Rand()*6.0)+1.0;
+ br = x%2;
+ bg = ((x%4)-br)/2;
+ bb = ((x%8)-(bg*2)-br)/4;
+ br = br/2.0;
+ bg = bg/2.0;
+ bb = bb/2.0;
+ }
+ colamt = colamt + TIMEPASS;
+ if (colamt>1) colamt=1;
+ gfxClear( ((1.0f-colamt)*ar)+(colamt*br), ((1.0f-colamt)*ag)+(colamt*bg), ((1.0f-colamt)*ab)+(colamt*bb) );
+
+ // draw
+ gfxSetTexture(tex);
+ gfxSetAspect(0);
+ gfxTranslate(0.0f, 0.0f, 2.414f);
+ gfxBegin(PRIM_QUADLIST);
+ for (x=7;x>=0;x=x-1)
+ {
+ rot[x] = rot[x] + (TIMEPASS*rots[x]*(0.5+BASS)*1.5f);
+ gfxColour(1.0f, 1.0f, 1.0f, 0.0f-((x+btime)/8.0f));
+ quad(rot[x],0.2f+((x+btime)/2.0));
+ }
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/MentalHangover.vtx b/addons/visualization.vortex/resources/Presets/MentalHangover.vtx
new file mode 100644
index 0000000000..b7014e2d75
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/MentalHangover.vtx
@@ -0,0 +1,143 @@
+// MentalHangover.vtx
+// Author - MrC
+
+Texture checker;
+Texture ball;
+float ty;
+
+float d = 0;
+float c;
+
+// colours
+float ar,ag,ab,br,bg,bb;
+float colamt,coltime;
+
+// balls
+float[] c_z(64),c_vz(64),c_sx(64),c_sy(64), c_vy(64);
+
+void Init()
+{
+ checker.LoadTexture("checker_transp.png");
+ ball.LoadTexture("smiley.png");
+
+ ty = 0;
+ coltime = 0;
+
+ for (int x=0;x<64;x=x+1)
+ {
+ MakeNew(x);
+ c_z[x] = (Rand()*6) - 2;
+ c_vy[x] = Rand()*2 - 1;
+ }
+}
+
+void MakeNew(int n)
+{
+ c_z[n] = 4;
+ c_vz[n] = Rand()* 1.0f + 1.0;
+ c_vy[n] = (Rand()*1.0 + 0.5);
+ c_sx[n] = (-0.5+Rand())*2.5;
+ c_sy[n] = 0.0f;
+}
+
+
+void Sprite(float x, float y, float z, float sz)
+{
+ gfxTexCoord(0,0);
+ gfxVertex(x-sz,y+sz,z);
+ gfxTexCoord(1,0);
+ gfxVertex(x+sz,y+sz,z);
+ gfxTexCoord(1,1);
+ gfxVertex(x+sz,y-sz,z);
+ gfxTexCoord(0,1);
+ gfxVertex(x-sz,y-sz,z);
+}
+
+void Render()
+{
+ d = (TIMEPASS*6 + (TREBLE * 4 * TIMEPASS)) * 0.25;
+
+ ty -= d;
+
+ if (ty > 2)
+ ty -= 1.0f;
+
+ if (ty < 2)
+ ty += 1.0f;
+
+ // Floor
+
+ coltime = coltime - TIMEPASS;
+ if (coltime<0)
+ {
+ coltime = 1+(Rand()*5);
+ ar = br; ag = bg; ab = bb;
+ colamt = 0;
+ float x = (Rand()*5.0)+1.0;
+ br = x%2;
+ bg = ((x%4)-br)/2;
+ bb = ((x%8)-(bg*2)-br)/4;
+ br = br/2.0;
+ bg = bg/2.0;
+ bb = bb/2.0;
+ }
+ colamt = colamt + TIMEPASS;
+ if (colamt>1) colamt=1;
+
+ gfxRotate(-5.0,1,0,0);
+
+ gfxSetTexture(NULL);
+ gfxTranslate(0, -0.245, 2.0f);
+ gfxSetBlendMode(BLEND_MOD);
+
+ gfxBegin(PRIM_QUADLIST);
+ gfxColour( ((1.0f-colamt)*ag)+(colamt*bg), ((1.0f-colamt)*ab)+(colamt*bb), ((1.0f-colamt)*ar)+(colamt*br), 1 );
+ gfxVertex(-5, 0, 2.5);
+ gfxVertex(5, 0, 2.5);
+ gfxVertex(5, 0, -2.5);
+ gfxVertex(-5, 0, -2.5);
+ gfxEnd();
+
+ gfxSetTexture(checker);
+ gfxSetBlendMode(BLEND_MOD);
+
+ gfxBegin(PRIM_QUADLIST);
+ gfxColour(0, 0, 0, 0.4);
+ gfxColour( ((1.0f-colamt)*ar)+(colamt*br), ((1.0f-colamt)*ag)+(colamt*bg), ((1.0f-colamt)*ab)+(colamt*bb), 1 );
+ gfxTexCoord(0, 0 + ty);
+ gfxVertex(-10, 0, 2.5);
+ gfxTexCoord(20, 0 + ty);
+ gfxVertex(10, 0, 2.5);
+ gfxTexCoord(20, 5 + ty);
+ gfxVertex(10, 0, -2.5);
+ gfxTexCoord(0, 5 + ty);
+ gfxVertex(-10, 0, -2.5);
+ gfxEnd();
+
+ gfxSetTexture(ball);
+
+ gfxSetBlendMode(BLEND_MOD);
+
+ gfxBegin(PRIM_QUADLIST);
+ for (int x=0;x<32;x++)
+ {
+
+ c_z[x] = c_z[x] - (d*c_vz[x]);
+ c_vy[x] = c_vy[x] + 1 * TIMEPASS*2;
+ c_sy[x] = c_sy[x] - (c_vy[x] * d);
+ if (c_sy[x] < 0.025)
+ {
+ c_sy[x] = 0.025;
+ c_vy[x] = - (c_vy[x]* 0.9);
+ }
+ if (c_z[x]<-2)
+ MakeNew(x);
+
+ c = (7.0-(c_z[x]+2))*0.11;
+ gfxColour(1,1,1,1);
+ Sprite(c_sx[x],c_sy[x],c_z[x], 0.0350);
+ }
+
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/MeteorShower.vtx b/addons/visualization.vortex/resources/Presets/MeteorShower.vtx
new file mode 100644
index 0000000000..d636aaa809
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/MeteorShower.vtx
@@ -0,0 +1,73 @@
+// MeteorShower.vtx
+// Author - MrC
+// Based on MeteorShower.r4 by Gordon Williams
+Texture trail;
+Texture sky;
+
+float[] pvel(256),ppos(256),ptheta(256),prad(256),plen(256),psnd(256);
+int x;
+float f,g,bt;
+const int cnt = 256;
+float time;
+
+void Init()
+{
+ sky.LoadTexture("skybox.dds");
+ trail.LoadTexture("trail2.dds");
+
+ for (x=0;x<cnt;x=x+1) newpt(x);
+ bt = 0;
+ time = 0;
+}
+
+void drawit(float ax,float ay,float bx, float by,float r)
+{
+ gfxTexCoord(0,0);
+ gfxVertex(r*Cos(ax),r*Sin(ax),ay);
+ gfxTexCoord(0,1);
+ gfxVertex(r*Cos(bx),r*Sin(bx),ay);
+ gfxTexCoord(1,1);
+ gfxVertex(r*Cos(bx),r*Sin(bx),by);
+ gfxTexCoord(1,0);
+ gfxVertex(r*Cos(ax),r*Sin(ax),by);
+}
+
+void newpt(int p)
+{
+ pvel[p] = (Rand()+0.5)*2.0;
+ ppos[p] = 0.0;
+ ptheta[p] = Rand()*3.14159*2.0;
+ prad[p] = (Rand()*2.0)+0.25;
+ plen[p] = 1.5+Rand();
+ psnd[p] = Rand();
+}
+
+void Render()
+{
+ gfxClear(0.1, 0, 0);
+
+ bt = bt + (TIMEPASS*(0.5+BASS));
+ time += TIMEPASS;
+ gfxSetBlendMode(BLEND_ADD);
+
+ f = Sin(bt+Sin(time*1.353));
+ g=f;
+ gfxTranslate(0,0,3);
+ gfxRotate(90*(g+1.0),Sin(time*0.4),Cos(time*0.4),0);
+ gfxSetTexture(sky);
+
+ gfxCube(-20,-20,-20,20,20,20);
+ gfxSetTexture(trail);
+ gfxTranslate((Sin(bt*1.61))*0.3,(Sin(bt*1.23))*0.3,-8+(g*5.0));
+ gfxBegin(PRIM_QUADLIST);
+ for (x=0;x<cnt;x=x+1)
+ {
+ ppos[x] = ppos[x] + (pvel[x]*TIMEPASS*(0.5+(psnd[x]*BASS)+((1.0-psnd[x])*TREBLE)));
+ if (ppos[x]<0) ppos[x] = 0;
+ if (ppos[x]>1.0) newpt(x);
+ gfxColour(1,1,1,(1.0-Cos(ppos[x]*3.14159*2.0))*0.5);
+ drawit(ptheta[x],(ppos[x]*16.0)+plen[x],ptheta[x]+0.08+(prad[x]*0.025),(ppos[x]*16.0),prad[x]);
+ }
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/MiddleGrid.tra b/addons/visualization.vortex/resources/Presets/MiddleGrid.tra
new file mode 100644
index 0000000000..dfff79e903
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/MiddleGrid.tra
@@ -0,0 +1,67 @@
+// MiddleGrid.tra
+// Author - MrC
+// Based on FadeMiddleGrid.r4 By Gordon Williams
+
+int x,y,mx,my,hx,hy;
+float dx,dy,sx,sy,a,b,mytime;
+
+void Init()
+{
+
+}
+
+void Render()
+{
+ mytime = mytime + (TIMEPASS*0.40);
+
+
+ gfxSetAspect(0);
+ gfxTranslate(-1, -1, 2.414);
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(0, 2, 2, 0);
+
+ mx = 16;
+ my = 12;
+ hx = 8;
+ hy = 6;
+
+ gfxScale(2.0/mx,2.0/my,1.0);
+ sx = 1.0/mx;
+ sy = 1.0/my;
+
+ gfxSetTexture(TEXTURE_CURRPRESET);
+ gfxColour(1, 1, 1, 1);
+
+ gfxBegin(PRIM_QUADLIST);
+
+ FINISHED = true;
+
+ dx = 0;
+ for (x=0;x<mx;x=x+1)
+ {
+ dy = 0;
+ for (y=0;y<my;y=y+1)
+ {
+ a = (mytime*10.0)-((Abs(x-hx)+Abs(y-hy))*0.25);
+ if (a<0) a=0;
+ if (a<3.14159)
+ {
+ a = (Cos(a)*0.25)+0.25;
+ gfxTexCoord(dx,1.0f - dy);
+ gfxVertex(x+0.5-a,y+0.5-a,0.0);
+ gfxTexCoord(dx+sx,1.0f-dy);
+ gfxVertex(x+0.5+a,y+0.5-a,0.0);
+ gfxTexCoord(dx+sx,1.0f-(dy+sy));
+ gfxVertex(x+0.5+a,y+0.5+a,0.0);
+ gfxTexCoord(dx,1.0f - (dy+sy));
+ gfxVertex(x+0.5-a,y+0.5+a,0.0);
+ FINISHED = false;
+ }
+ dy = dy + sy;
+ }
+ dx = dx + sx;
+ }
+ gfxEnd();
+
+}
diff --git a/addons/visualization.vortex/resources/Presets/SingingSkull.vtx b/addons/visualization.vortex/resources/Presets/SingingSkull.vtx
new file mode 100644
index 0000000000..c7cac906f0
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/SingingSkull.vtx
@@ -0,0 +1,72 @@
+// AlbumArtZoomer.vtx
+// Author - MrC
+
+Texture skull1;
+Texture skull2;
+Texture skull3;
+Texture skull4;
+Texture skull5;
+Texture skull6;
+Texture skull7;
+Texture skull0;
+
+float bt,bump,n;
+
+void Init()
+{
+ skull0.LoadTexture("skull_jawud1.png");
+ skull1.LoadTexture("skull_jawud2.png");
+ skull2.LoadTexture("skull_jawud3.png");
+ skull3.LoadTexture("skull_jawud4.png");
+ skull4.LoadTexture("skull_jawud5.png");
+ skull5.LoadTexture("skull_jawud6.png");
+ skull6.LoadTexture("skull_jawud7.png");
+ skull7.LoadTexture("skull_jawud8.png");
+ bt = 0;
+}
+
+float time = 0;
+
+void Render()
+{
+ time += TIMEPASS*10;
+ bt = bt + (TIMEPASS*(0.5+BASS));
+ n = 1.0-(TIMEPASS*4);
+ bump = (bump*n)+(BASS*(1.0-n));
+
+ int tex = 0;
+ if (MIDDLE > 0)
+ tex = MIDDLE * 10;
+ if (tex == 0)
+ gfxSetTexture(skull0);
+ else if (tex == 1)
+ gfxSetTexture(skull1);
+ else if (tex == 2)
+ gfxSetTexture(skull2);
+ else if (tex == 3)
+ gfxSetTexture(skull3);
+ else if (tex == 4)
+ gfxSetTexture(skull4);
+ else if (tex == 5)
+ gfxSetTexture(skull5);
+ else if (tex == 6)
+ gfxSetTexture(skull6);
+ else if (tex >= 7)
+ gfxSetTexture(skull7);
+// gfxSetAspect(0);
+ gfxSetBlendMode(BLEND_MOD);
+ gfxTranslate(0,0,2.5);
+
+ float x = (Sin(bt*6.43)+Cos(bt*4.23))*0.25;
+ float y = (Cos(bt*6.43)+Sin(bt*4.23))*0.25;
+
+
+ gfxTexRect(x - 0.5, y + 0.5, x + 0.5, y -0.5);
+
+ float col = 0;
+ if (BASS > 0)
+ col = BASS;
+
+ col = Fabs(Sin(time));
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/Slide.tra b/addons/visualization.vortex/resources/Presets/Slide.tra
new file mode 100644
index 0000000000..e73e20944e
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Slide.tra
@@ -0,0 +1,52 @@
+// Slide.tra
+// Author - MrC
+
+int direction;
+float position;
+
+void Init()
+{
+ position = 0;
+ direction = Rand() * 4;
+}
+
+void Render()
+{
+ position += TIMEPASS*0.75;
+ if (position >= 1.0f)
+ FINISHED = true;
+
+ gfxSetTexture(TEXTURE_CURRPRESET);
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+
+ if (direction == 0)
+ {
+ // Top to bottom
+ float i = -3 + position * 2;
+ gfxTexRect(-1, i+2, 1, i);
+ }
+ else if (direction == 1)
+ {
+ // Bottom to top
+ float i = 1 - (position * 2);
+ gfxTexRect(-1, i+2, 1, i);
+ }
+ else if (direction == 2)
+ {
+ // Left to right
+ float i = -3 + position * 2;
+ gfxTexRect(i, 1, i+2, -1);
+ }
+ else
+ {
+ // Right to left
+ float i = 1 - position * 2;
+ gfxTexRect(i, 1, i+2, -1);
+ }
+
+}
diff --git a/addons/visualization.vortex/resources/Presets/SpaceHarrier.vtx b/addons/visualization.vortex/resources/Presets/SpaceHarrier.vtx
new file mode 100644
index 0000000000..60ffd09dd6
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/SpaceHarrier.vtx
@@ -0,0 +1,91 @@
+/*
+
+SCENE (
+"name" = "Space Harrier 2";
+"author" = "Gordon Williams";
+SOLID bg();
+TEXTURE texa();
+TEXTURE texb();
+GL gl(bg,texa,texb);
+)
+*/
+Texture checker;
+
+int x;
+float bt,bump,n;
+float time;
+
+//- ---------------------------
+void drawit(float ox,float oy)
+{
+ gfxColour(1, 1, 1, 1);
+ gfxTexCoord(0+ox,0+oy);
+ gfxVertex(-10,0,-5);
+ gfxTexCoord(20+ox,0+oy);
+ gfxVertex(10,0,-5);
+
+ gfxColour(0, 0, 0, 0);
+ gfxTexCoord(20+ox,10+oy);
+ gfxVertex(10,0,5);
+ gfxTexCoord(0+ox,10+oy);
+ gfxVertex(-10,0,5);
+}
+//- ---------------------------
+
+void Init()
+{
+ checker.LoadTexture("checker.png");
+ bt = 0;
+// bg.col = rgb(0,0,0);
+// strcpy(texa.filename,"dots.png");
+// strcpy(texb.filename,"grid.png");
+// strcpy(gl.shader,"T0;BAa;");
+}
+
+void Render()
+{
+ time += TIMEPASS;
+ bt = bt + (TIMEPASS*(0.5+BASS));
+ n = 1.0-(TIMEPASS*4);
+ bump = (bump*n)+(BASS*(1.0-n));
+
+// gl.clear();
+
+ gfxRotate(bump*40.0,1,0,0);
+ gfxRotate((Sin(bt*6.43)+Cos(bt*4.23))*15,0,1,0);
+
+ gfxRotate((Sin(bt*2)+Cos(bt*4.23))*30,0,0,1);
+
+ gfxSetTexture(checker);
+ gfxTranslate(0,0.3,5);
+ gfxColour(1,1,1,1);
+ gfxBegin(PRIM_QUADLIST);
+ drawit(0,bt);
+ gfxEnd();
+
+// gl.glbindtexture(2);
+ gfxTranslate(0,-0.6,0);
+// gl.glcolor(1,1,1,1);
+ gfxBegin(PRIM_QUADLIST);
+ drawit(0,bt+time);
+ gfxEnd();
+
+ gfxSetTexture(NULL);
+ gfxTranslate(0, 0.3, -2 );
+ gfxScale(5,0.35,1);
+ gfxColour(1,1,1,1);
+ gfxSetLineWidth(2);
+ gfxBegin(PRIM_LINESTRIP);
+
+ gfxColour(1, 1, 0, 1);
+ for (x=0;x<256;x=x+1)
+ gfxVertex((x-128.0)/128.0,WaveLeft(x),0);
+ gfxEnd();
+
+ gfxColour(0, 1, 1, 1);
+ gfxBegin(PRIM_LINESTRIP);
+ for (x=0;x<256;x=x+1)
+ gfxVertex((x-128.0)/128.0,WaveRight(x),0);
+ gfxEnd();
+
+}
diff --git a/addons/visualization.vortex/resources/Presets/Speakers.vtx b/addons/visualization.vortex/resources/Presets/Speakers.vtx
new file mode 100644
index 0000000000..e7e4af1957
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Speakers.vtx
@@ -0,0 +1,95 @@
+// Speakers.vtx
+// Author - MrC
+
+float[] x(15), y(15), vx(15), vy(15);
+
+Texture speaker;
+
+void Init()
+{
+ speaker.LoadTexture("speaker.png");
+
+ for (int i = 0; i < 15; i++)
+ {
+ x[i] = (Rand()-0.5) * 2;
+ y[i] = (Rand()-0.5) * 2;
+ vx[i] = (Rand()-0.5) * 0.05;
+ vy[i] = (Rand()-0.5) * 0.05;
+ }
+}
+
+void quad(float x, float y, float sz)
+{
+ gfxTexCoord(0,0);
+ gfxVertex(x-sz,y+sz,0);
+ gfxTexCoord(1,0);
+ gfxVertex(x+sz,y+sz,0);
+ gfxTexCoord(1,1);
+ gfxVertex(x+sz,y-sz,0);
+ gfxTexCoord(0,1);
+ gfxVertex(x-sz,y-sz,0);
+}
+
+float time = 0;
+
+void Render()
+{
+ time += TIMEPASS * 30;
+
+ for (int i = 0; i < 15; i++)
+ {
+ float value;
+ if (i < 5)
+ value = BASS;
+ else if (i < 10)
+ value = MIDDLE;
+ else
+ value = TREBLE;
+
+
+ x[i] = x[i] + vx[i] * value;
+ if (x[i] < -1)
+ {
+ x[i] = -1;
+ vx[i] = -vx[i];
+ }
+ else if (x[i] > 1)
+ {
+ x[i] = 1;
+ vx[i] = -vx[i];
+ }
+ y[i] = y[i] + vy[i] * value;
+ if (y[i] < -1)
+ {
+ y[i] = -1;
+ vy[i] = -vy[i];
+ }
+ else if (y[i] > 1)
+ {
+ y[i] = 1;
+ vy[i] = -vy[i];
+ }
+ }
+
+
+ gfxSetTexture(speaker);
+ gfxSetAspect(1);
+ gfxTranslate(0, 0, 2.0);
+ gfxBegin(PRIM_QUADLIST);
+ gfxColour(1.0f, 1.0f, 1.0f, 1);
+ gfxSetBlendMode(BLEND_MOD);
+ for (int i=0; i < 5; i++)
+ {
+ quad(x[i], y[i], 0.1 + (1+BASS)*0.2);
+ }
+ for (int i=5; i < 10; i++)
+ {
+ quad(x[i], y[i], 0.1 + (1+MIDDLE)*0.2);
+ }
+ for (int i=10; i < 15; i++)
+ {
+ quad(x[i], y[i], 0.1 + (1+TREBLE)*0.2);
+ }
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/SpectrumCylinder.vtx b/addons/visualization.vortex/resources/Presets/SpectrumCylinder.vtx
new file mode 100644
index 0000000000..3d588754f8
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/SpectrumCylinder.vtx
@@ -0,0 +1,91 @@
+// SpectrumCylinder.vtx
+// Author - MrC
+// Based on SpectrumCylinder.r4 by Gordon Williams
+
+float time = 0;
+
+float tm;
+int x,y;
+
+float rx,rxamt,ry,ryamt;
+int currBuffer;
+
+float[] buffers(12*12);
+
+float[] savr(12);
+int[] sn(12);
+float[] sp(12);
+
+
+Map map;
+Texture envTexture;
+
+void Init()
+{
+ envTexture.LoadTexture("env3.png");
+ currBuffer = 0;
+
+ for (y=0;y<24;y=y+1)
+ {
+ for (x=0;x<32;x=x+1)
+ {
+ map.SetValues(x, y, Sin((x-15.5)*3)*0.01, Sin((y-11.5)*3)*0.01, 1, 1, 1);
+ }
+ }
+ rxamt = 1;
+ ryamt = -1;
+}
+
+void Render()
+{
+ time += TIMEPASS;
+
+ map.Render();
+
+ gfxSetRenderTarget(map);
+
+ gfxPushMatrix();
+
+ gfxTranslate(0,0,17.5f);
+ gfxRotate(-70+(Sin(time)*12),1,0,0);
+
+ if (BASS>0.3) rxamt = 1;
+ if (BASS<-0.3) rxamt = -1;
+ if (TREBLE>0.3) ryamt = 1;
+ if (TREBLE<-0.3) ryamt = -1;
+ rx = rx + (rxamt*TIMEPASS);
+ ry = ry + (ryamt*TIMEPASS);
+
+ gfxRotate(rx*90,0,0,1);
+ gfxRotate(ry*90,0,1,0);
+
+
+ for (x = 0; x < 12; x++)
+ {
+ sp[x] = GetSpec(x*2);
+ }
+ gfxSetEnvTexture(envTexture);
+
+ // draw buffer out of cubes
+ for (y=0;y<12;y=y+1)
+ {
+ for (x=0;x<12;x=x+1)
+ {
+ gfxColour(x/12.0,y/12.0,1.0-(y/12.0),1.0); // fade colour
+ gfxCube(-5.5+x,-0.25f,1.0,-5.5+x+0.5f,0.25f,1.0+(sp[x]*1.5));
+ }
+ gfxRotate(360.0/12.0,1,0,0);
+ }
+
+ gfxPopMatrix();
+
+ gfxSetRenderTarget(0);
+ gfxSetEnvTexture(NULL);
+ gfxSetTexture(map);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/SpectrumField.vtx b/addons/visualization.vortex/resources/Presets/SpectrumField.vtx
new file mode 100644
index 0000000000..9b421b4ae8
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/SpectrumField.vtx
@@ -0,0 +1,73 @@
+// SpectrumFile.vtx
+// Author - MrC
+
+const int STEP = 5;
+float time = 0;
+
+float tm;
+int x,y;
+
+float rx,ry,ryamt;
+int currBuffer;
+
+float[] buffers(24*32);
+int counter = 0;
+
+void Init()
+{
+ currBuffer = 0;
+ counter = 0;
+ for (int i=0; i<24*32; i++)
+ {
+ buffers[i]=0;
+ }
+
+ ryamt = -25.0f;
+ ry = Rand() * 360.0f;
+
+}
+
+void Render()
+{
+
+ time += TIMEPASS;
+
+ gfxTranslate(0,-2,30.0f);
+ counter++;
+
+ ryamt = (BASS) * 40;
+
+ ry = ry + (ryamt*TIMEPASS);
+
+
+ gfxRotate(-20,1,0,0);
+ gfxRotate(ry,0,1,0);
+
+ gfxSetBlendMode(BLEND_ADD);
+
+ if (counter == 5)
+ {
+ currBuffer = (currBuffer+1) % 24;
+ for (int i=0; i<32; i++)
+ {
+ buffers[currBuffer*32 + i] = GetSpec(i) * 4;
+ }
+ counter = 0;
+ }
+
+ gfxColour(1, 1, 1, 1);
+ gfxSetLineWidth(5);
+
+ for (int i=0; i<24;i++)
+ {
+ int index = (i+currBuffer+1) % 24;
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x<32; x++)
+ {
+ gfxColour(i/24.0,x/32.0,1.0-(x/32.0),1.0); // fade colour
+ gfxVertex(-12+i-(counter/5.0f), buffers[index*32 + x], -16+x);
+ }
+ gfxEnd();
+ }
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/SpectrumSphere.vtx b/addons/visualization.vortex/resources/Presets/SpectrumSphere.vtx
new file mode 100644
index 0000000000..8ff226c786
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/SpectrumSphere.vtx
@@ -0,0 +1,186 @@
+// SpectrumSphere.vtx
+// Author - morte0815
+
+float time = 0;
+float rx,rxamt,ry,ryamt;
+
+float[] org_coordsX(70);
+float[] org_coordsY(70);
+float[] org_coordsZ(70);
+float[] org_colorR(70);
+float[] org_colorG(70);
+float[] org_colorB(70);
+
+float stacks = 8;
+float segments = 8;
+
+float velX,velY,velZ;
+float posX,posY,posZ;
+float signX,signY,signZ;
+Map map;
+
+int x,y;
+
+void Init()
+{
+ velX= 0;
+ velY= 0;
+ velZ = 0;
+ posX= 0;
+ posY= 0;
+ posZ = 0;
+ posX= 0;
+ posY= 0;
+ posZ = 0;
+ signX= 1;
+ signY= 1;
+ signZ = 1;
+
+ if(BASS < 0.2f){signZ = 1;}
+ if(MIDDLE < 0.2f){signY = -1;}
+ if(TREBLE < 0.2f){signX = -1;}
+
+ for (int i = 0; i< stacks; i++)
+ {
+ float temp = Cos(3.14159f/6.0f*i-3.14159f/2.0f);
+ for (int j = 0; j < segments; j++)
+ {
+ org_coordsY[Fabs(i*segments+j)] = Sin(3.14159f/6.0f*i-3.14159f/2.0f);
+ org_coordsX[Fabs(i*segments+j)] = Cos(2*3.14159f/segments*j) * temp;
+ org_coordsZ[Fabs(i*segments+j)] = Sin(2*3.14159f/segments*j) * temp;
+ }
+ }
+ for (int i = 0; i< stacks; i++)
+ {
+ for (int j = 0; j< segments; j++)
+ {
+ org_colorR[i*segments+j] = Sin(i);
+ org_colorG[i*segments+j] = Sin(j);
+ org_colorB[i*segments+j] = 1-Sin(j);
+ }
+ }
+
+
+
+
+
+}
+
+void RenderSphere()
+{
+ float addX=0;
+ float addY=0;
+ float addZ=0;
+ float scale = 0.5f;
+ float colorVal = 0;
+ gfxBegin(PRIM_TRIANGLELIST);
+ for (int i = 0; i< stacks-2; i++)
+ {
+ for (int j = 0; j< segments; j++)
+ {
+ float temp = i*segments+j;
+ addX = GetSpec(Fabs(temp/2)) * org_coordsX[temp]*scale;
+ addY = GetSpec(Fabs(temp/2)) * org_coordsY[temp]*scale;
+ addZ = GetSpec(Fabs(temp/2)) * org_coordsZ[temp]*scale;
+ colorVal = GetSpec(Fabs(temp/2));
+
+
+ gfxColour(org_colorR[temp],org_colorG[temp] ,org_colorB[temp] ,1);
+ gfxVertex(org_coordsX[temp] + addX,org_coordsY[temp] + addY,org_coordsZ[temp] + addZ);
+
+ temp = (i+1)*segments+((j+1)%segments);
+ gfxVertex(org_coordsX[temp] + addX,org_coordsY[temp] + addY,org_coordsZ[temp] + addZ);
+
+ temp = i*segments+((j+1)%segments);
+ gfxVertex(org_coordsX[temp] + addX,org_coordsY[temp] + addY,org_coordsZ[temp] + addZ);
+
+ temp = i*segments+j;
+ addX = GetSpec(Fabs(temp/2)) * org_coordsX[temp]*scale;
+ addY = GetSpec(Fabs(temp/2)) * org_coordsY[temp]*scale;
+ addZ = GetSpec(Fabs(temp/2)) * org_coordsZ[temp]*scale;
+ colorVal = GetSpec(Fabs(temp/2));
+
+ gfxColour(org_colorR[temp],org_colorG[temp],org_colorB[temp],1);
+ gfxVertex(org_coordsX[temp] + addX,org_coordsY[temp] + addY,org_coordsZ[temp] + addZ);
+
+ temp = (i+1)*segments+j;
+ gfxVertex(org_coordsX[temp] + addX,org_coordsY[temp] + addY,org_coordsZ[temp] + addZ);
+
+ temp = (i+1)*segments+((j+1)%segments);
+ gfxVertex(org_coordsX[temp] + addX,org_coordsY[temp] + addY,org_coordsZ[temp] + addZ);
+ }
+ }
+ gfxEnd();
+}
+
+void PushAround()
+{
+ if (Abs(BASS) > 0.3f){velZ += BASS*3.0f;}
+ if (Abs(BASS) < 0.3f){velZ -= BASS*3.0f;}
+ if (Abs(MIDDLE) > 0.3f){velY += MIDDLE*3.0f;}
+ if (Abs(MIDDLE) < 0.3f){velY -= MIDDLE*3.0f;}
+ if (Abs(TREBLE) > 0.3f){velX += TREBLE*3.0f;}
+ if (Abs(TREBLE) < 0.3f){velX -= TREBLE*3.0f;}
+
+ velX = Clamp(velX,-3.0f,3.0f);
+ velY = Clamp(velY,-3.0f,3.0f);
+ velZ = Clamp(velZ,-3.0f,3.0f);
+
+ posX += signX*velX*TIMEPASS;
+ posY += signY*velY*TIMEPASS;
+ posZ += signZ*velZ*TIMEPASS;
+
+ if (posX < -4 || posX > 4){signX = -signX;}
+ if (posY < -4 || posY > 4){signY = -signY;}
+ if (posZ < -4 || posZ > 4){signZ = -signZ;}
+
+ gfxTranslate(posX,posY,posZ);
+
+}
+
+void Render()
+{
+ time += TIMEPASS;
+ for (y=0;y<24;y=y+1)
+ {
+ for (x=0;x<32;x=x+1)
+ {
+ float dx = (x-16);
+ float dy = (y-12);
+ float s = Mag(dx,dy)/Mag(16,12);
+ if (s == 0)
+ {
+ map.SetValues(x, y, 0.1, 0.1, 0.8,0.8, 0.8);
+ }
+ map.SetValues(x, y, dx*s*0.1*Fabs(BASS), dy*s*0.1*Fabs(BASS), 0.8,0.8, 0.8);
+ }
+
+ }
+ map.Render();
+
+ gfxSetRenderTarget(map);
+ gfxPushMatrix();
+ gfxTranslate(0,0,15);
+
+ PushAround();
+
+ if (BASS>0.3) ryamt = 1;
+ if (BASS<-0.3) ryamt = -1;
+ ry = ry + (ryamt*TIMEPASS);
+
+ gfxRotate(ry*90,0,1,0);
+
+
+ RenderSphere();
+
+ gfxPopMatrix();
+
+ gfxSetRenderTarget(0);
+ gfxSetEnvTexture(NULL);
+ gfxSetTexture(map);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+}
diff --git a/addons/visualization.vortex/resources/Presets/Sphere.tra b/addons/visualization.vortex/resources/Presets/Sphere.tra
new file mode 100644
index 0000000000..ef0df6489d
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Sphere.tra
@@ -0,0 +1,65 @@
+// Sphere.tra
+// Author - MrC
+// Based on FadeSphere.r4 by Gordon Williams
+
+const int stripx = 32;
+const int stripy = 16;
+
+int x,y;
+float dx,da,db,sa,sb,a,b,mytime;
+
+void Init()
+{
+}
+
+void Render()
+{
+ mytime = mytime + (TIMEPASS * 0.25);
+ FINISHED = (mytime>1);
+
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxSetAspect(0);
+ gfxTranslate(0,0,2.414);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+ gfxTranslate(0,0,-2.414);
+
+ a = mytime*2;
+ if (a>1.0) a=1.0;
+ a = (1.0-Cos(a*3.14159))/2.0;
+
+ gfxSetAspect(a);
+
+ b = (mytime*2)-1.0;
+ if (b<0.0) b=0.0;
+ b = (1.0-Cos(b*3.14159))/2.0;
+
+ gfxTranslate(b*6,0,2.414+(a*1.5));
+
+ gfxRotate(mytime*720,1,1,1);
+
+ gfxSetTexture(TEXTURE_CURRPRESET);
+
+ gfxColour(1,1,1,1);
+ for (y=0;y<stripy;y=y+1)
+ {
+ da = (1.0*y)/stripy;
+ db = (1.0*(y+1))/stripy;
+ sa = Sin(da*3.14159);
+ sb = Sin(db*3.14159);
+ da = -Cos(da*3.14159);
+ db = -Cos(db*3.14159);
+ gfxBegin(PRIM_QUADSTRIP);
+ for (x=0;x<=stripx;x=x+1)
+ {
+ dx = (1.0*x)/stripx;
+ gfxTexCoord(dx,(da*-0.5)+0.5);
+ gfxVertex(((dx*2.0)-1.0)*(1.0-a)+(Cos(3.14159*2.0*dx)*a*sa),da,(Sin(3.14159*2.0*dx)*a*sa));
+ gfxTexCoord(dx,(db*-0.5)+0.5);
+ gfxVertex(((dx*2.0)-1.0)*(1.0-a)+(Cos(3.14159*2.0*dx)*a*sb),db,(Sin(3.14159*2.0*dx)*a*sb));
+ }
+ gfxEnd();
+ }
+
+}
+
diff --git a/addons/visualization.vortex/resources/Presets/Square.tra b/addons/visualization.vortex/resources/Presets/Square.tra
new file mode 100644
index 0000000000..e44ed91665
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Square.tra
@@ -0,0 +1,66 @@
+// Square.tra
+// Author - MrC
+// Based on FadeGrid.r4 by Gordon Williams
+
+int x,y,mx,my;
+float dx,dy,sx,sy,a,b,mytime;
+
+void Init()
+{
+
+}
+
+void Render()
+{
+ mytime = mytime + (TIMEPASS*0.40);
+
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+
+ gfxSetAspect(0);
+ gfxTranslate(-1, -1, 0);
+
+ mx = 16;
+ my = 12;
+
+ gfxScale(2.0/mx,2.0/my,1.0);
+ sx = 1.0/mx;
+ sy = 1.0/my;
+
+ gfxSetTexture(TEXTURE_CURRPRESET);
+ gfxColour(1, 1, 1, 1);
+
+ gfxBegin(PRIM_QUADLIST);
+
+ FINISHED = true;
+
+ dx = 0;
+ for (x=0;x<mx;x=x+1)
+ {
+ dy = 0;
+ for (y=0;y<my;y=y+1)
+ {
+ a = (mytime*10.0)-((my+1.0+x-y)*0.25);
+ if (a<0) a=0;
+ if (a<3.14159)
+ {
+ a = (Cos(a)*0.25)+0.25;
+ gfxTexCoord(dx,1.0f - dy);
+ gfxVertex(x+0.5-a,y+0.5-a,0.0);
+ gfxTexCoord(dx+sx,1.0f-dy);
+ gfxVertex(x+0.5+a,y+0.5-a,0.0);
+ gfxTexCoord(dx+sx,1.0f-(dy+sy));
+ gfxVertex(x+0.5+a,y+0.5+a,0.0);
+ gfxTexCoord(dx,1.0f - (dy+sy));
+ gfxVertex(x+0.5-a,y+0.5+a,0.0);
+ FINISHED = false;
+ }
+ dy = dy + sy;
+ }
+ dx = dx + sx;
+ }
+ gfxEnd();
+}
diff --git a/addons/visualization.vortex/resources/Presets/StereoSpectrum.vtx b/addons/visualization.vortex/resources/Presets/StereoSpectrum.vtx
new file mode 100644
index 0000000000..4f2483010c
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/StereoSpectrum.vtx
@@ -0,0 +1,128 @@
+// Author : paridox
+
+const int BUFFERS = 24;
+const int WIDTH = 128;
+
+int currBuffer;
+int rowRenderCount = 0;
+
+float[] buffers(256 * BUFFERS);
+float[] bounces(BUFFERS);
+float[] yaws(BUFFERS);
+
+int counter = 0;
+
+float m_prevValue = 0.0;
+
+void Init()
+{
+ currBuffer = 0;
+
+ for (int clear = 0; clear < 256 * BUFFERS; clear++)
+ {
+ buffers[clear] = 0.0;
+ }
+}
+
+void doRender(int bufferToUse, float Zpos)
+{
+ gfxPushMatrix();
+ gfxTranslate(0.0f, bounces[bufferToUse], 0.0f);
+
+ //gfxPushMatrix();
+ gfxRotate(yaws[currBuffer], 0, 0, 1);
+
+ for (int x = 0; x < WIDTH; x++)
+ {
+ float value = 0.0;
+
+ // get the current value
+ for (int calcAverage = 0; calcAverage < (256 / WIDTH); calcAverage++)
+ {
+ //if (x == (WIDTH / 2))
+ //{
+ //gfxPopMatrix();
+ //gfxPushMatrix();
+ //gfxRotate(-yaws[currBuffer], 0, 0, 1);
+ //}
+
+ int index = (bufferToUse * 256) + (x*(256/WIDTH)) + calcAverage;
+ if (index >= 0 && index < 256*BUFFERS)
+ value = value + buffers[index];
+ }
+// value = value / (256.0f / WIDTH);
+ value = value * 2.0;
+
+ float prevValue = value;
+
+ // get previous value
+ if (x != 0 && x != (WIDTH / 2)) prevValue = m_prevValue;
+
+ // remember for next time
+ m_prevValue = value;
+
+ value = (value + prevValue) / 2.0f;
+
+ if (rowRenderCount == BUFFERS)
+ gfxColour((x >= (WIDTH / 2) ? 1.0 - (x-(WIDTH/2.0f)) / (WIDTH * 2.0f / 3.0f) : 0.0), (x < (WIDTH / 2) ? 1.0 - (WIDTH/2-x) / (WIDTH * 2.0f / 3.0f) : 0.0), 0.0, 0.2); // front bright colour
+ else
+ gfxColour((x >= (WIDTH / 2) ? (0.8f - (x-(WIDTH/2.0f)) / (WIDTH * 2.0f / 3.0f)) / (Zpos+1) : 0.0), (x < (WIDTH / 2) ? (0.8f - (WIDTH/2-x) / (WIDTH * 2.0f / 3.0f)) / (Zpos+1) : 0.0), 0.0, 1.0); // fade colour
+ if (x == 0 || x == WIDTH / 2)
+ gfxBegin(PRIM_QUADSTRIP);
+
+ gfxVertex(-(WIDTH / 16.0f)+(x/8.0f)+(x < WIDTH / 2 ? 0.2f : 0.0) + (x < (WIDTH / 2) ? 0.0 : 0.0), value, Zpos + 0.3f);
+ gfxVertex(-(WIDTH / 16.0f)+(x/8.0f)+(x < WIDTH / 2 ? 0.0f : 0.2f) + (x < (WIDTH / 2) ? 0.0 : 0.0), value, Zpos);
+
+ if (x == WIDTH / 2 - 1 || x == WIDTH - 1)
+ gfxEnd();
+ }
+
+ //gfxPopMatrix();
+
+ gfxPopMatrix();
+}
+
+void Render()
+{
+ yaws[currBuffer] = Fabs(Sin(BASS) * 6);
+ counter++;
+
+ gfxTranslate(0.0, 0.0, 12.0f);
+ bounces[currBuffer] = -1.6 + Fabs((BASS + TREBLE) / 2.0f);
+
+ {
+ for (int i = 0; i < 256; i++)
+ {
+ int index = i + (currBuffer * 256);
+ int prevIndex = (index + 256) % (BUFFERS * 256);
+ int prevIndex2 = (index + 512) % (BUFFERS * 256);
+ float value = 0.0f;
+
+ if (i < 128)
+ {
+ buffers[index] = (GetSpecLeft(i * 4 + 0) + GetSpecLeft(i * 4 + 1) + GetSpecLeft(i * 4 + 2) + GetSpecLeft(i * 4 + 3)) / 4.0f;
+ }
+ else
+ {
+ buffers[index] = (GetSpecRight((256 - i) * 4 + 0) + GetSpecRight((256 - i) * 4 + 1) + GetSpecRight((256 - i) * 4 + 2) + GetSpecRight((256 - i) * 4 + 3)) / 4.0f;
+ }
+ }
+
+ currBuffer = (currBuffer + 1) % BUFFERS;
+ counter = 0;
+ }
+
+ rowRenderCount = 0;
+ int rendPos = BUFFERS;
+//doRender(currBuffer-1, 0 * 0.25f);
+ for (int rend=currBuffer; rend<BUFFERS; rend++)
+ {
+ rowRenderCount++;
+ doRender(rend, rendPos-- * 0.25f);
+ }
+ for (int rend=0; rend < currBuffer; rend++)
+ {
+ rowRenderCount++;
+ doRender(rend, rendPos-- * 0.25f);
+ }
+}
diff --git a/addons/visualization.vortex/resources/Presets/VoicePrintDonut.vtx b/addons/visualization.vortex/resources/Presets/VoicePrintDonut.vtx
new file mode 100644
index 0000000000..d144c85c05
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/VoicePrintDonut.vtx
@@ -0,0 +1,74 @@
+// VoicePrintDonut.vtx
+// Author - MrC
+// Based on VoicePrint.r4 by Gordon Williams
+
+VoicePrint vp;
+Map map;
+float time = 0;
+float minX;
+
+float rx,rxamt,ry,ryamt;
+
+void Init()
+{
+ vp.LoadColourMap("huemap.jpg");
+ vp.SetSpeed(0.5);
+
+ for (int y=0;y<24;y=y+1)
+ {
+ for (int x=0;x<32;x=x+1)
+ {
+ float dx = (x-16)/16.0;
+ float dy = (y-12)/12.0;
+ float s = (Mag(dx,dy))-1.5;
+ map.SetValues(x, y, dx*s, dy*s, 1, 1, 1);
+ }
+ }
+
+}
+
+void Render()
+{
+ gfxPushMatrix();
+ minX = 0.75f - BASS;
+ if (minX<0.5f) minX=0.5f;
+ if (minX>0.99f) minX=0.99f;
+
+ vp.SetRect(minX, 0, 0.5, 0.99);
+
+ vp.Render();
+
+ gfxSetRenderTarget(map);
+ gfxSetTexture(vp);
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxTexRect(-1, 1, 1, -1);
+
+ map.Render();
+ gfxSetRenderTarget(0);
+ gfxSetTexture(map);
+ gfxTexRect(-1, 1, 1, -1);
+
+ gfxPopMatrix();
+
+ time += TIMEPASS;
+
+ gfxSetTexture(vp);
+ gfxTranslate(0, 0, 2.0f-(BASS* 0.5f));
+
+ if (BASS>0.3) rxamt = 1;
+ if (BASS<-0.3) rxamt = -1;
+ if (TREBLE>0.3) ryamt = 1;
+ if (TREBLE<-0.3) ryamt = -1;
+ rx = rx + (rxamt*TIMEPASS);
+ ry = ry + (ryamt*TIMEPASS);
+
+ gfxRotate(-70+(Sin(time)*12),1,0,0);
+ gfxRotate(rx*90,0,0,1);
+ gfxRotate(ry*90,0,1,0);
+
+ gfxColour(1, 1, 1, 1);
+ gfxSetAspect(1);
+ gfxCube(-0.25f, -0.25f, -0.25f, 0.25f, 0.25f, 0.25f);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/WalkingCube.vtx b/addons/visualization.vortex/resources/Presets/WalkingCube.vtx
new file mode 100644
index 0000000000..98e88a7888
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/WalkingCube.vtx
@@ -0,0 +1,151 @@
+// WalkingCube.vtx
+// Author - MrC
+
+float time = 0;
+float rx,rxamt,ry,ryamt;
+float y = 0;
+Texture checker;
+Texture sky;
+float tx, ty;
+
+float d = 0;
+
+void Init()
+{
+ checker.LoadTexture("checker.png");
+ sky.LoadTexture("sky.dds");
+
+ tx = 0;
+ ty = 0;
+ ryamt = 0;
+
+}
+
+void Render()
+{
+
+ gfxPushMatrix();
+
+ d = TIMEPASS*((BASS + 1.5)*4);
+ d = TIMEPASS*6 + (BASS * 4 * TIMEPASS);
+
+ time += d;
+
+ ry += TIMEPASS * ryamt * 2;
+
+ gfxSetTexture(sky);
+
+ gfxSetBlendMode(BLEND_MOD);
+ gfxPushMatrix();
+ gfxSetAspect(0);
+ gfxTranslate(0,0,2.414);
+
+ gfxBegin(PRIM_QUADLIST);
+ gfxColour(1, 1, 1, 1);
+ gfxTexCoord(0, 0);
+ gfxVertex(-1, 1, 0);
+
+ gfxTexCoord(1, 0);
+ gfxVertex(1, 1, 0);
+
+ gfxTexCoord(1, 1);
+ gfxVertex(1, -0.2, 0);
+
+ gfxTexCoord(0, 1);
+ gfxVertex(-1, -0.2, 0);
+
+ gfxColour(0.7, 0.7, 0.7, 1);
+
+ gfxTexCoord(0, 1);
+ gfxVertex(-1, -0.2, 0);
+
+ gfxTexCoord(1, 1);
+ gfxVertex(1, -0.2, 0);
+
+ gfxTexCoord(1, 0);
+ gfxVertex(1, -1, 0);
+
+ gfxTexCoord(0, 0);
+ gfxVertex(-1, -1, 0);
+
+ gfxEnd();
+
+ gfxSetAspect(1);
+ gfxPopMatrix();
+
+ gfxSetTexture(TEXTURE_ALBUMART);
+
+ if (BASS>0.3) rxamt = 1;
+ if (BASS<-0.3) rxamt = -1;
+ if (TREBLE>0.4) ryamt = Rand()-0.5f;
+
+
+
+ gfxPushMatrix();
+ gfxSetBlendMode(BLEND_OFF);
+ gfxScale(1,-1,1);
+ gfxTranslate(0, 0.5 + Fabs(Sin(time * 2 *45 * 3.1415 / 180))* 0.125, 2.0f);
+ gfxRotate(ry*90,0,1,0);
+ gfxRotate(time*45,0,0,1);
+
+ gfxColour(1, 1, 1, 1);
+ gfxCube(-0.25f, -0.25f, -0.25f, 0.25f, 0.25f, 0.25f);
+
+ gfxPopMatrix();
+
+ gfxPushMatrix();
+
+ gfxTranslate(0, Fabs(Sin(time * 2 *45 * 3.1415 / 180))* 0.125, 2.0f);
+ gfxRotate(ry*90,0,1,0);
+ gfxRotate(time*45,0,0,1);
+
+ gfxColour(1, 1, 1, 1);
+ gfxCube(-0.25f, -0.25f, -0.25f, 0.25f, 0.25f, 0.25f);
+
+ gfxPopMatrix();
+
+
+ float c = Cos(ry*90 * 3.1415 / 180);
+ float s = Sin(ry * 90 * 3.1415 / 180);
+
+ ty -= d * 0.06f * s;
+ tx -= d * 0.06f * c;
+
+ if (ty > 2)
+ ty -= 1.0f;
+
+ if (ty < 2)
+ ty += 1.0f;
+
+ if (tx > 2)
+ tx -= 1.0f;
+
+ if (tx < 2)
+ tx += 1.0f;
+
+
+ // Floor
+
+
+ gfxSetTexture(checker);
+ gfxTranslate(0, -0.245, 2.0f);
+ gfxSetBlendMode(BLEND_MOD);
+
+ gfxBegin(PRIM_QUADLIST);
+ gfxColour(0, 0, 0, 0.4);
+ gfxTexCoord((0+tx)*2, (0+ty)*2);
+ gfxVertex(-2, 0, 2);
+ gfxTexCoord((1+tx)*2, (0+ty)*2);
+ gfxVertex(2, 0, 2);
+ gfxColour(1, 1, 1, 0.8);
+ gfxTexCoord((1+tx)*2, (1+ty)*2);
+ gfxVertex(2, 0, -2);
+ gfxTexCoord((0+tx)*2, (1+ty)*2);
+ gfxVertex(-2, 0, -2);
+ gfxEnd();
+
+
+ gfxPopMatrix();
+
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/WarpDrive.vtx b/addons/visualization.vortex/resources/Presets/WarpDrive.vtx
new file mode 100644
index 0000000000..95d8df2c14
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/WarpDrive.vtx
@@ -0,0 +1,73 @@
+// WarpDrive.vtx
+// Author - MrC
+// Based on WarpDrive.r4 by Gordon Williams
+
+Texture trail;
+Texture sky;
+
+float[] pvel(256),ppos(256),ptheta(256),prad(256),plen(256),psnd(256);
+int x;
+float f,g,bt;
+const int cnt = 256;
+float time;
+
+void Init()
+{
+ sky.LoadTexture("skybox.dds");
+ trail.LoadTexture("bluestrip.dds");
+
+ for (x=0;x<cnt;x=x+1) newpt(x);
+ bt = 0;
+ time = 0;
+}
+
+void drawit(float ax,float ay,float bx, float by,float r)
+{
+ gfxTexCoord(0,0);
+ gfxVertex(r*Cos(ax),r*Sin(ax),ay);
+ gfxTexCoord(0,1);
+ gfxVertex(r*Cos(bx),r*Sin(bx),ay);
+ gfxTexCoord(1,1);
+ gfxVertex(r*Cos(bx),r*Sin(bx),by);
+ gfxTexCoord(1,0);
+ gfxVertex(r*Cos(ax),r*Sin(ax),by);
+}
+
+void newpt(int p)
+{
+ pvel[p] = (Rand()+0.5)*2.0;
+ ppos[p] = 0.0;
+ ptheta[p] = Rand()*3.14159*2.0;
+ prad[p] = (Rand()*1.25)+0.25;
+ plen[p] = 1.0+Rand();
+ psnd[p] = Rand();
+}
+
+void Render()
+{
+ gfxClear(0, 0, 0.1);
+
+ bt = bt + (TIMEPASS*(0.2+BASS));
+ time += TIMEPASS;
+ gfxSetBlendMode(BLEND_ADD);
+
+ f = Sin(bt+Sin(time*1.353));
+ g = Sin(f*3.14159*0.5);
+ gfxTranslate(0,0,3);
+ gfxRotate(90*(g+1.0),Sin(time*0.4),Cos(time*0.4),0);
+ gfxSetTexture(sky);
+ gfxCube(-200,-200,-200,200,200,200);
+ gfxSetTexture(trail);
+ gfxTranslate((Sin(bt*1.61))*0.3,(Sin(bt*1.23))*0.3,-8+(g*6.0));
+ gfxBegin(PRIM_QUADLIST);
+ for (x=0;x<cnt;x=x+1)
+ {
+ ppos[x] = ppos[x] + (pvel[x]*TIMEPASS*(0.5+(psnd[x]*BASS)+((1.0-psnd[x])*TREBLE)));
+ if (ppos[x]<0) ppos[x] = 0;
+ if (ppos[x]>1.0) newpt(x);
+ gfxColour(1,1,1,(1.0-Cos(ppos[x]*3.14159*2.0))*0.5);
+ drawit(ptheta[x],(ppos[x]*16.0)+plen[x],ptheta[x]+0.08+(prad[x]*0.025),(ppos[x]*16.0),prad[x]);
+ }
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/WarpDriveTwist.vtx b/addons/visualization.vortex/resources/Presets/WarpDriveTwist.vtx
new file mode 100644
index 0000000000..fafcaf22b6
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/WarpDriveTwist.vtx
@@ -0,0 +1,74 @@
+// WarpDriveTwist.vtx
+// Author - MrC
+// Based on WarpDriveTwist.r4 by Gordon Williams
+
+Texture trail;
+
+float[] pvel(256),ppos(256),ptheta(256),prad(256),plen(256),psnd(256);
+int[] pval(256),vr(8),vg(8),vb(8);
+
+int x;
+float f,g,bt;
+const int cnt = 256;
+float time;
+
+void Init()
+{
+ trail.LoadTexture("bluestrip.dds");
+
+ for (x=0;x<cnt;x=x+1) newpt(x);
+ bt = 0;
+ time = 0;
+}
+
+void drawit(float ax,float ay,float bx, float by,float r)
+{
+ gfxTexCoord(0,0);
+ gfxVertex(r*Cos(ax),r*Sin(ax),ay);
+ gfxTexCoord(0,1);
+ gfxVertex(r*Cos(bx),r*Sin(bx),ay);
+ gfxTexCoord(1,1);
+ gfxVertex(r*Cos(bx),r*Sin(bx),by);
+ gfxTexCoord(1,0);
+ gfxVertex(r*Cos(ax),r*Sin(ax),by);
+}
+
+void newpt(int p)
+{
+ pvel[p] = (Rand()+0.5)*2.0;
+ ppos[p] = 0.0;
+ ptheta[p] = Rand()*3.14159*2.0;
+ prad[p] = (Rand()*1.25)+0.25;
+ plen[p] = 1.0+Rand();
+ psnd[p] = Rand() * 4;
+ pval[p] = Rand()*4;
+}
+
+void Render()
+{
+
+ gfxClear(0, 0, 0.1);
+
+ bt = bt + (TIMEPASS*(0.2+BASS));
+ time += TIMEPASS;
+ gfxSetBlendMode(BLEND_ADD);
+
+ f = Sin(bt+Sin(time*1.353));
+ g = Sin(f*3.14159*0.5);
+ gfxTranslate(0,0,3);
+ gfxRotate(90*(g+1.0),Sin(time*0.4),Cos(time*0.4),0);
+ gfxSetTexture(trail);
+ gfxTranslate((Sin(bt*1.61))*0.3,(Sin(bt*1.23))*0.3,-8+(g*6.0));
+ gfxBegin(PRIM_QUADLIST);
+ for (x=0;x<cnt;x=x+1)
+ {
+ ppos[x] = ppos[x] + (pvel[x]*TIMEPASS*(0.5+(psnd[x]*BASS)+((1.0-psnd[x])*TREBLE)));
+ ptheta[x] = ptheta[x] + (((pval[x]%2)-0.5)*(BASS+0.15)*TIMEPASS*20);
+ if (ppos[x]<0) ppos[x] = 0;
+ if (ppos[x]>1.0) newpt(x);
+ gfxColour(1,1,1,(1.0-Cos(ppos[x]*3.14159*2.0))*0.5);
+ drawit(ptheta[x],(ppos[x]*16.0)+plen[x],ptheta[x]+0.08+(prad[x]*0.025),(ppos[x]*16.0),prad[x]);
+ }
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/Wave.vtx b/addons/visualization.vortex/resources/Presets/Wave.vtx
new file mode 100644
index 0000000000..82c4986930
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Wave.vtx
@@ -0,0 +1,26 @@
+// Author : MrC
+
+void Render()
+{
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x<256; x=x+1)
+ {
+ float r = WaveLeft(x);
+ gfxColour(1, Fabs(r), 0.1f, 1);
+ gfxVertex((x-128) / 128.0f, r * 0.4f + 0.5f, 0);
+ }
+ gfxEnd();
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x<256; x=x+1)
+ {
+ float r = WaveRight(x);
+ gfxColour(Fabs(r), 1, 0.1f, 1);
+ gfxVertex((x-128) / 128.0f, r * 0.4f - 0.5f, 0);
+ }
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/WaveRing.vtx b/addons/visualization.vortex/resources/Presets/WaveRing.vtx
new file mode 100644
index 0000000000..792adbbf2c
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/WaveRing.vtx
@@ -0,0 +1,59 @@
+// Author - MrC
+// Based on WaveRing.r4 by Gordon Williams
+
+Map map;
+
+int x,y;
+float theta,rad,dx,dy;
+float mx, my;
+
+void Init()
+{
+ for (y=0;y<24;y=y+1)
+ {
+ for (x=0;x<32;x=x+1)
+ {
+ dx = x-15.5;
+ dy = y-11.5;
+ rad = Mag(dx,dy);
+ theta = Atan2(dy,dx);
+ mx = -(0.01*dy/rad)-Sin((rad-7.5)*0.1)*0.02*dx/rad;
+ my = (0.01*dx/rad)-Sin((rad-7.5)*0.1)*0.02*dy/rad;
+ map.SetValues(x, y, mx, my, (3.0+Cos(theta))*0.275, (3.0+Cos(theta*2.0))*0.275, (3.0+Cos(theta*4.0))*0.275);
+ }
+ }
+}
+
+void Render()
+{
+ map.Render();
+
+ gfxSetRenderTarget(map);
+
+ gfxColour(1,1,1,1);
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x < 256; x = x+1)
+ {
+ rad = 0.25 + (WaveLeft(x) / 10.0f);
+ theta = x*3.141592/128.0;
+ gfxVertex(Cos(theta)*rad, Sin(theta)*rad,1);
+ }
+ gfxEnd();
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x < 256; x = x+1)
+ {
+ rad = 0.25 + (WaveRight(x) / 10.0f);
+ theta = x*3.141592/128.0;
+ gfxVertex(Cos(theta)*rad, Sin(theta)*rad,1);
+ }
+ gfxEnd();
+
+ gfxSetRenderTarget(0);
+ gfxSetTexture(map);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxTexRect(-1, 1, 1, -1);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/WaveScope.vtx b/addons/visualization.vortex/resources/Presets/WaveScope.vtx
new file mode 100644
index 0000000000..4f0a7f15d7
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/WaveScope.vtx
@@ -0,0 +1,99 @@
+// Author - MrC
+// Based on WaveScope.r4 by Gordon Williams
+Map map;
+
+float dx,dy,a,r,d,tp,s,t,c;
+float px,py,pdx,pdy; // point
+float cr,cg,cb,basstime;
+
+void Init()
+{
+ px = 16;
+ py = 12;
+ pdx = 1.342;
+ pdy = 1;
+ basstime = 0;
+ map.SetTimed();
+}
+
+void Render()
+{
+ //--------------------------------------
+ // Update map
+
+ t = TIMEPASS*(BASS+0.25)*40;
+ px = px + (pdx*t);
+ if (px>28)
+ {
+ pdx = -(pdx);
+ px = 28;
+ }
+ else if (px<4)
+ {
+ pdx = -(pdx);
+ px = 4;
+ }
+ py = py + (pdy*t);
+ if (py>20)
+ {
+ pdy = -(pdy);
+ py = 20;
+ }
+ else if (py<4)
+ {
+ pdy = -(pdy);
+ py = 4;
+ }
+
+ basstime = basstime + (TIMEPASS*(BASS+1));
+ cr = (Cos(basstime)-1.0)/2.0;
+ cg = (Cos(basstime*2.0)-1.0)/2.0;
+ cb = (Cos(basstime*4.0)-1.0)/2.0;
+
+ for (int y = 0; y < 24; y++)
+ {
+ for (int x = 0; x < 32; x++)
+ {
+ dx = x-px;
+ dy = y-py;
+ d = Mag(dx,dy);
+ if (d>0.01)
+ {
+ c = (0.5/d)-0.05;
+ if (c<0)
+ c=0;
+ a = (d-12)/64;
+ if (a>0)
+ a=0;
+ r = 1-(d/4.0);
+ map.SetValues(x,y, (dx*a)+(dy*c), (dy*a)-(dx*c), cr+r, cg+r, cb+r);
+ }
+ }
+ }
+
+ map.Render();
+
+ gfxSetRenderTarget(map);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x < 256; x = x+1)
+ {
+ gfxVertex((x-128)/128.0f, (WaveLeft(x) / 3.0f) + 0.5f, 0);
+ }
+ gfxEnd();
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x < 256; x = x+1)
+ {
+ gfxVertex((x-128)/128.0f, (WaveRight(x) / 3.0f) - 0.5f, 0);
+ }
+ gfxEnd();
+
+ gfxSetRenderTarget(0);
+ gfxSetTexture(map);
+ gfxTexRect(-1, -1, 1, 1);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/WaveZoomer.vtx b/addons/visualization.vortex/resources/Presets/WaveZoomer.vtx
new file mode 100644
index 0000000000..ae26e0dfc6
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/WaveZoomer.vtx
@@ -0,0 +1,90 @@
+// WaveZoomer.vtx
+// Author - MrC
+// Based on WaveZoomer.r4 b Gordon Williams
+
+Map map;
+
+int x,y;
+float dx,dy,a,r;
+float cr,cg,cb,cx,cy,crot,cox,coy;
+float ccr,ccg,ccb;
+float sinrot,cosrot;
+float tx,ty,tz;
+float mx, my;
+int beat;
+
+void Init()
+{
+ map.SetTimed();
+ cx = 15.5;
+ cy = 11.5;
+ cox = 0;
+ coy = 0;
+ crot = 0;
+}
+
+void Render()
+{
+ if ((BASS+MIDDLE+TREBLE>0.6) && (beat!=1))
+ {
+ beat=1;
+ cx = (20.0*Rand())+6.0;
+ cy = (16.0*Rand())+4.0;
+ cox = (Rand()-0.5)*1.5;
+ coy = (Rand()-0.5)*1.5;
+ crot = (Rand()-0.5)*2;
+ ccr = Rand()-2;
+ ccg = Rand()-2;
+ ccb = Rand()-2;
+ }
+ else if ((BASS+MIDDLE+TREBLE<-0.6) && (beat!=0))
+ {
+ beat = 0;
+ }
+
+ sinrot = -0.05*Sin(crot)*(BASS+1.5);
+ cosrot = -0.05*Cos(crot)*(BASS+1.5);
+
+ tx = cox*(MIDDLE+1.5);
+ ty = coy*(MIDDLE+1.5);
+ for (y=0;y<24;y=y+1)
+ {
+ for (x=0;x<32;x=x+1)
+ {
+ dx = x-cx;
+ dy = y-cy;
+ mx = tx+((dx*cosrot)+(dy*sinrot));
+ my = ty+((dy*cosrot)-(dx*sinrot));
+ map.SetValues(x, y, mx, my, ccr, ccg, ccb);
+ }
+ }
+
+ map.Render();
+
+ gfxSetRenderTarget(map);
+
+ gfxColour(0.8,0.8,0.8, 1);
+
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x < 256; x = x+1)
+ {
+ gfxVertex((x-128)*0.0078125f, (WaveLeft(x) * 0.2f) + 0.5f, 0);
+ }
+ gfxEnd();
+
+ gfxBegin(PRIM_LINESTRIP);
+ for (int x=0; x < 256; x = x+1)
+ {
+ gfxVertex((x-128)*0.0078125f, (WaveRight(x) * 0.2f) - 0.5f, 0);
+ }
+ gfxEnd();
+
+ gfxSetRenderTarget(0);
+ gfxSetTexture(map);
+
+ gfxTexRect(-1, 1, 1, -1);
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/Woofer.vtx b/addons/visualization.vortex/resources/Presets/Woofer.vtx
new file mode 100644
index 0000000000..f6ab55ac86
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/Woofer.vtx
@@ -0,0 +1,65 @@
+// woofer.vtx
+// Author - morte0815
+
+float angle = 0;
+
+void Init()
+{
+
+}
+
+void Quad(float x, float y, float z, float width, float tu_u,float tv_l, float tu_b , float tv_r)
+{
+gfxBegin(PRIM_QUADLIST);
+gfxTexCoord(tu_u, tv_l);
+gfxVertex(x,y,z);
+gfxTexCoord(tu_b, tv_l);
+gfxVertex(x+width,y,z);
+gfxTexCoord(tu_b, tv_r);
+gfxVertex(x+width,y+width,z);
+gfxTexCoord(tu_u, tv_r);
+gfxVertex(x,y+width,z);
+
+
+gfxEnd();
+}
+
+
+float Length(float x, float y)
+{
+ return Sqrt(x*x+y*y);
+}
+
+void Render()
+{
+ if (BASS>0.5f)angle += TIMEPASS*5;
+ if (BASS<0.5f)angle -= TIMEPASS*5;
+
+ gfxTranslate(0, 0, 25.0f);
+
+ gfxRotate(-100,1,0,0);
+ gfxRotate(angle,0,0,1);
+
+
+ gfxSetTexture(TEXTURE_ALBUMART);
+
+ for (int i = -10; i < 10; i++)
+ {
+ for ( int j = -10; j < 10; j++)
+ {
+ if (Length(i,j) <= 10)
+ {
+ float height=(Length(i,j)/10.0f*BASS);
+ height+=((10.0f-Length(i,j))/10.0f*TREBLE);
+ height+=((5.0f-Length(i,j))/10*MIDDLE);
+ Quad(i,j,height,1,(i+10)/20.0f,(j+10)/20.0f,(i+1+10)/20.0f,(j+1+10)/20.0f);
+ }
+ }
+ }
+
+
+
+
+ gfxEnd();
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/XBMCRain.vtx b/addons/visualization.vortex/resources/Presets/XBMCRain.vtx
new file mode 100644
index 0000000000..224b4e1891
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/XBMCRain.vtx
@@ -0,0 +1,95 @@
+// Author - MrC
+// Based on R4Rain.r4 by Gordon Williams
+
+int x,y, t;
+float c,tm,tn,td, s;
+float[] c_x(64),c_y(64),c_z(64),c_vz(64),c_rx(64),c_ry(64),c_sx(64),c_sy(64),c_sz(64);
+float d;
+
+Texture texture;
+Texture sky;
+
+void MakeNew(int n)
+{
+ c_x[n]=c_y[n]=0;
+ while (Mag(c_x[n],c_y[n])<1)
+ {
+ c_x[n] = (Rand()*6.0)-3.0;
+ c_y[n] = (Rand()*6.0)-3.0;
+ }
+
+ c_z[n] = 10;
+ c_vz[n] = (1.0+Rand())*4;
+ c_rx[n] = (1.0+Rand())*80;
+ c_ry[n] = (1.0+Rand())*80;
+ c_sx[n] = (0.5+Rand())*0.5;
+ c_sy[n] = (0.5+Rand())*0.5;
+ c_sz[n] = (1.0+Rand())*0.05;
+}
+
+
+void Init()
+{
+ texture.LoadTexture("splash_original.dds");
+ sky.LoadTexture("skybox.dds");
+
+ for (x=0;x<64;x=x+1)
+ {
+ MakeNew(x);
+ c_z[x] = Rand()*10;
+ }
+ tm = tn = 0;
+}
+
+void mything(float x,float y,float z)
+{
+ gfxBegin(PRIM_QUADLIST);
+ for (t=0; t<1; t++)
+ {
+ s = z*((t/2.0f)-1.0);
+ gfxTexCoord(0,0);
+ gfxVertex(-x,y,s);
+ gfxTexCoord(1,0);
+ gfxVertex(x,y,s);
+ gfxTexCoord(1,1);
+ gfxVertex(x,-y,s);
+ gfxTexCoord(0,1);
+ gfxVertex(-x,-y,s);
+
+ }
+ gfxEnd();
+}
+
+void Render()
+{
+ td = ((TREBLE+1.5f)*TIMEPASS);
+ tm = tm + td;
+ tn = tn + ((BASS+1.0)*TIMEPASS*2);
+
+ gfxTranslate(Cos(tn * 1.23f) * 0.5f, Sin(tn) * 0.5f, 0.0f);
+ gfxRotate(Cos(tn*0.6734f)*20.0f, 1.0f, 0.0f, 0.0f);
+ gfxRotate(Sin(tn*0.2143f)*20.0f, 0.0f, 1.0f, 0.0f);
+
+ gfxSetTexture(sky);
+ gfxCube(-100,-100,-100,100,100,100);
+
+ gfxSetTexture(texture);
+
+ gfxSetBlendMode(BLEND_ADD);
+
+ for (x=0;x<64;x++)
+ {
+ c_z[x] = c_z[x] - (td*c_vz[x]);
+ if (c_z[x]<0) MakeNew(x);
+
+ c = (10.0-c_z[x])*0.11;
+ gfxColour(c,c,c,1);
+ gfxPushMatrix();
+ gfxTranslate(c_x[x],c_y[x],c_z[x]);
+ gfxRotate(c_rx[x]*tm,1.0f,0.0f,0.0f);
+ gfxRotate(c_ry[x]*tm,0.0f,1.0f,0.0f);
+ mything(c_sx[x],c_sy[x],c_sz[x]);
+ gfxPopMatrix();
+ }
+
+} \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/Presets/tunnel.tra b/addons/visualization.vortex/resources/Presets/tunnel.tra
new file mode 100644
index 0000000000..42cf0a6c0a
--- /dev/null
+++ b/addons/visualization.vortex/resources/Presets/tunnel.tra
@@ -0,0 +1,56 @@
+// Tunnel.tra
+// Author - MrC
+// Based on FadeTunnel.r4 by Gordon Williams
+
+const int strips = 64;
+
+int x,y;
+float dx,dy,sx,sy,tx,a,b,mytime;
+
+void Init()
+{
+}
+
+void Render()
+{
+ mytime = mytime + (TIMEPASS * 0.25);
+ FINISHED = (mytime>1);
+
+ gfxSetTexture(TEXTURE_NEXTPRESET);
+ gfxSetAspect(0);
+ gfxTranslate(0, 0, 2.414);
+ gfxColour(1, 1, 1, 1);
+ gfxTexRect(-1, 1, 1, -1);
+ gfxTranslate(0, 0, -2.414);
+
+ a = mytime*2;
+ if (a>1.0) a=1.0;
+ a = (1.0-Cos(a*3.14159))/2.0;
+
+ b = (mytime*2)-1.0;
+ if (b<0.0) b=0.0;
+ b = (1.0-Cos(b*3.14159))/2.0;
+
+ gfxTranslate(0,0,2.414+(a*3.0)-(b*8));
+
+ gfxRotate((1.0-Cos(a*3.14159))*180,1,1,1);
+ gfxRotate(a*90,1,0,0);
+ gfxRotate((1.0-Cos(b*3.14159))*180,0,1,0);
+
+ gfxSetTexture(TEXTURE_CURRPRESET);
+
+ gfxColour(1,1,1,1);
+ gfxBegin(PRIM_QUADSTRIP);
+
+ for (x=0;x<=strips;x=x+1)
+ {
+ dx = (1.0*x)/strips;
+ tx = dx*2;
+ if (tx>1) tx=2.0-tx;
+ gfxTexCoord(tx,1.0);
+ gfxVertex(((dx*4.0)-1.0)*(1.0-a)+(-Cos(3.14159*2.0*dx)*a),-1-a,(-Sin(3.14159*2.0*dx)*a));
+ gfxTexCoord(tx,0.0);
+ gfxVertex(((dx*4.0)-1.0)*(1.0-a)+(-Cos(3.14159*2.0*dx)*a),1+a,(-Sin(3.14159*2.0*dx)*a));
+ }
+ gfxEnd();
+}
diff --git a/addons/visualization.vortex/resources/Textures/Plasma_edge.jpg b/addons/visualization.vortex/resources/Textures/Plasma_edge.jpg
new file mode 100644
index 0000000000..27143d3950
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Plasma_edge.jpg
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD1.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD1.png
new file mode 100644
index 0000000000..ea58ba96b1
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD1.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD2.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD2.png
new file mode 100644
index 0000000000..bd1bee0c1b
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD2.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD3.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD3.png
new file mode 100644
index 0000000000..6daa4cd2e7
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD3.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD4.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD4.png
new file mode 100644
index 0000000000..bbe0751141
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD4.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD5.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD5.png
new file mode 100644
index 0000000000..ab93d76a63
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD5.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD6.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD6.png
new file mode 100644
index 0000000000..83935d1f7b
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD6.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD7.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD7.png
new file mode 100644
index 0000000000..a3c77610c0
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD7.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Skull_JawUD8.png b/addons/visualization.vortex/resources/Textures/Skull_JawUD8.png
new file mode 100644
index 0000000000..93686da855
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Skull_JawUD8.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Smiley.png b/addons/visualization.vortex/resources/Textures/Smiley.png
new file mode 100644
index 0000000000..3b6d9d8cf4
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Smiley.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Speaker.png b/addons/visualization.vortex/resources/Textures/Speaker.png
new file mode 100644
index 0000000000..f7de0b693f
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Speaker.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Tex_Edge.png b/addons/visualization.vortex/resources/Textures/Tex_Edge.png
new file mode 100644
index 0000000000..380e12888d
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Tex_Edge.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/Vortex_Credits.png b/addons/visualization.vortex/resources/Textures/Vortex_Credits.png
new file mode 100644
index 0000000000..3c46640107
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/Vortex_Credits.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/alien.png b/addons/visualization.vortex/resources/Textures/alien.png
new file mode 100644
index 0000000000..a2cbd012e2
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/alien.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/aqua_ravines.jpg b/addons/visualization.vortex/resources/Textures/aqua_ravines.jpg
new file mode 100644
index 0000000000..00835672d5
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/aqua_ravines.jpg
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/bluestrip.dds b/addons/visualization.vortex/resources/Textures/bluestrip.dds
new file mode 100644
index 0000000000..a48cada742
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/bluestrip.dds
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/checker.png b/addons/visualization.vortex/resources/Textures/checker.png
new file mode 100644
index 0000000000..4ca89c614b
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/checker.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/checker_transp.png b/addons/visualization.vortex/resources/Textures/checker_transp.png
new file mode 100644
index 0000000000..753c662077
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/checker_transp.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/env2.jpg b/addons/visualization.vortex/resources/Textures/env2.jpg
new file mode 100644
index 0000000000..ae425b7531
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/env2.jpg
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/env3.png b/addons/visualization.vortex/resources/Textures/env3.png
new file mode 100644
index 0000000000..a90b1a3326
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/env3.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/env3_darker.png b/addons/visualization.vortex/resources/Textures/env3_darker.png
new file mode 100644
index 0000000000..2e3cd96d63
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/env3_darker.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/huemap.jpg b/addons/visualization.vortex/resources/Textures/huemap.jpg
new file mode 100644
index 0000000000..ceb09176ba
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/huemap.jpg
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/skull.png b/addons/visualization.vortex/resources/Textures/skull.png
new file mode 100644
index 0000000000..a684418b94
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/skull.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/sky.dds b/addons/visualization.vortex/resources/Textures/sky.dds
new file mode 100644
index 0000000000..6c00f4170a
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/sky.dds
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/skybox.dds b/addons/visualization.vortex/resources/Textures/skybox.dds
new file mode 100644
index 0000000000..4d389ebaa4
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/skybox.dds
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/splash_original.dds b/addons/visualization.vortex/resources/Textures/splash_original.dds
new file mode 100644
index 0000000000..bed53fafb9
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/splash_original.dds
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/trail2.dds b/addons/visualization.vortex/resources/Textures/trail2.dds
new file mode 100644
index 0000000000..7d1178c7a3
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/trail2.dds
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/vortex-v.jpg b/addons/visualization.vortex/resources/Textures/vortex-v.jpg
new file mode 100644
index 0000000000..f70f906e76
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/vortex-v.jpg
Binary files differ
diff --git a/addons/visualization.vortex/resources/Textures/xbmc_icon.png b/addons/visualization.vortex/resources/Textures/xbmc_icon.png
new file mode 100644
index 0000000000..f011789ad4
--- /dev/null
+++ b/addons/visualization.vortex/resources/Textures/xbmc_icon.png
Binary files differ
diff --git a/addons/visualization.vortex/resources/language/English/strings.po b/addons/visualization.vortex/resources/language/English/strings.po
new file mode 100644
index 0000000000..98aeb156dd
--- /dev/null
+++ b/addons/visualization.vortex/resources/language/English/strings.po
@@ -0,0 +1,65 @@
+# XBMC Media Center language file
+# Addon Name: vortex
+# Addon id: visualization.vortex
+# Addon Provider: Team XBMC
+msgid ""
+msgstr ""
+"Project-Id-Version: XBMC Main\n"
+"Report-Msgid-Bugs-To: http://trac.xbmc.org/\n"
+"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: XBMC Translation Team\n"
+"Language-Team: English (http://www.transifex.com/projects/p/xbmc-main/language/en/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: en\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#settings labels
+
+msgctxt "#30000"
+msgid "Random Presets"
+msgstr ""
+
+msgctxt "#30001"
+msgid "Time Between Presets"
+msgstr ""
+
+msgctxt "#30002"
+msgid "Additional Random Time"
+msgstr ""
+
+msgctxt "#30003"
+msgid "Lock Preset"
+msgstr ""
+
+msgctxt "#30004"
+msgid "Enable Transitions"
+msgstr ""
+
+msgctxt "#30005"
+msgid "Stop first preset"
+msgstr ""
+
+msgctxt "#30006"
+msgid "Show FPS"
+msgstr ""
+
+msgctxt "#30007"
+msgid "Show debug console"
+msgstr ""
+
+msgctxt "#30008"
+msgid "Show audio analysis"
+msgstr ""
+
+#setting value formats
+
+msgctxt "#30050"
+msgid "%2.0f secs"
+msgstr ""
+
+msgctxt "#30051"
+msgid "%2.0f fps"
+msgstr "" \ No newline at end of file
diff --git a/addons/visualization.vortex/resources/settings.xml b/addons/visualization.vortex/resources/settings.xml
new file mode 100644
index 0000000000..de32b2695a
--- /dev/null
+++ b/addons/visualization.vortex/resources/settings.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+ <setting id="RandomPresets" type="bool" label="30000" default="true"/>
+ <setting id="TimeBetweenPresets" type="rangeofnum" label="30001" rangestart="5" rangeend="50" elements="10" valueformat="30050" default="0"/>
+ <setting id="AdditionalRandomTime" type="rangeofnum" label="30002" rangestart="5" rangeend="50" elements="10" valueformat="30050" default="0"/>
+ <setting id="LockPreset" type="bool" label="30003" default="false"/>
+ <setting id="EnableTransitions" type="bool" label="30004" default="true"/>
+ <setting id="StopFirstPreset" type="bool" label="30005" default="false"/>
+ <setting id="ShowFPS" type="bool" label="30006" default="false" visible="false"/>
+ <setting id="ShowDebugConsole" type="bool" label="30007" default="false" visible="false"/>
+ <setting id="ShowAudioAnalysis" type="bool" label="30008" default="false" visible="false"/>
+</settings>