Merge pull request #3819 from arnova/subtitles_for_stacks
[vuplus_xbmc] / addons / visualization.vortex / resources / Presets / FlipBoth.tra
1 // FlipBoth.tra
2 // Author - MrC
3 // Based on FadeFlipBoth.r4 by Gordon Williams
4 float myTime = 0;
5 float d;
6
7 void Init()
8 {
9
10 }
11
12 void Rect(float x0, float y0, float x1, float y1)
13 {
14         gfxBegin(PRIM_QUADLIST);
15
16     gfxTexCoord(0,1);
17     gfxVertex(x0, y0, 0.0);
18     gfxTexCoord(1, 1);
19     gfxVertex(x1, y0, 0.0);
20     gfxTexCoord(1, 0);
21     gfxVertex(x1, y1, 0.0);
22     gfxTexCoord(0, 0);
23     gfxVertex(x0, y1, 0.0);
24     
25     gfxEnd();
26
27 }
28 void Render()
29 {
30         myTime = myTime + (TIMEPASS/1.5);
31
32         FINISHED = myTime>=1.0;
33
34         gfxSetAspect(0);
35         gfxTranslate(0, 0, 2.414);
36
37         d = 0.0-Cos(myTime*3.14159);
38
39         gfxSetTexture(TEXTURE_CURRPRESET);
40         gfxSetBlendMode(BLEND_ADD);
41         gfxColour(1, 1, 1, 0.25);
42
43         Rect(-1.0, -1.0, 0.0 - d, 1.0);
44         Rect(d, -1.0, 1.0, 1.0);
45         Rect(-1.0, -1.0, 1.0, 0 - d);
46         Rect(-1.0, d, 1.0, 1.0);
47
48         gfxSetTexture(TEXTURE_NEXTPRESET);
49         Rect(0.0 - d, -1.0, 1.0, 1.0);
50         Rect(-1.0, -1.0, d, 1.0);
51         Rect(-1.0, 0.0 - d, 1.0, 1.0);
52         Rect(-1.0, -1.0, 1.0, d);
53
54 }