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