diff options
Diffstat (limited to 'addons/visualization.vortex/resources/Presets/FlipBoth.tra')
-rw-r--r-- | addons/visualization.vortex/resources/Presets/FlipBoth.tra | 54 |
1 files changed, 54 insertions, 0 deletions
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); + +} |