Merge pull request #3819 from arnova/subtitles_for_stacks
[vuplus_xbmc] / addons / visualization.vortex / resources / Presets / AlbumArtStretch.vtx
1 // AlbumArtStretch.vtx
2 // Author - MrC
3
4 Map map;
5 float time = 0;
6
7 void Init()
8 {
9    map.SetTimed();
10 }
11
12 void Render()
13 {
14         if (BASS > 0)
15                 time += (BASS)* TIMEPASS;
16         
17         float myX = Sin(time);
18         float myY = Cos(time);
19                 
20         float dx, dy;
21    
22         for (int y = 0; y < 24; y++)
23         {
24                 for (int x = 0; x < 32; x++)
25                 {
26                         dx = x-15.5;
27                         dy = y-11.5;
28                         float mx = dx + myX*10;
29                         float my = dy + myY*10;
30
31                         map.SetValues(x,y, mx, my, -2, -2, -2);
32                 }
33         }
34
35         map.Render();
36         gfxSetRenderTarget(map);
37
38         gfxSetTexture(TEXTURE_ALBUMART);
39
40         gfxSetAspect(0);
41         gfxTranslate(0, 0, 2.414);
42
43         float x = (MIDDLE + 1) / 2;
44         float y = (TREBLE+ 1) / 2;
45
46         gfxTexRect(-1 * x, 1 * y, 1 * x, -1 * y);
47         
48         gfxSetRenderTarget(0);
49         gfxSetTexture(map);
50           
51         gfxTexRect(-1, 1, 1, -1);
52 }