Merge pull request #3819 from arnova/subtitles_for_stacks
[vuplus_xbmc] / addons / visualization.vortex / resources / Presets / SingingSkull.vtx
1 // AlbumArtZoomer.vtx
2 // Author - MrC
3
4 Texture skull1;
5 Texture skull2;
6 Texture skull3;
7 Texture skull4;
8 Texture skull5;
9 Texture skull6;
10 Texture skull7;
11 Texture skull0;
12
13 float bt,bump,n;
14
15 void Init()
16 {
17         skull0.LoadTexture("skull_jawud1.png");
18         skull1.LoadTexture("skull_jawud2.png");
19         skull2.LoadTexture("skull_jawud3.png");
20         skull3.LoadTexture("skull_jawud4.png");
21         skull4.LoadTexture("skull_jawud5.png");
22         skull5.LoadTexture("skull_jawud6.png");
23         skull6.LoadTexture("skull_jawud7.png");
24         skull7.LoadTexture("skull_jawud8.png");
25         bt = 0;
26 }
27
28 float time = 0;
29
30 void Render()
31 {
32         time += TIMEPASS*10;
33         bt = bt + (TIMEPASS*(0.5+BASS));
34         n = 1.0-(TIMEPASS*4);
35         bump = (bump*n)+(BASS*(1.0-n));
36         
37         int tex = 0;
38         if (MIDDLE > 0)
39                 tex = MIDDLE * 10;
40         if (tex == 0)
41                 gfxSetTexture(skull0);
42         else if (tex == 1)
43                 gfxSetTexture(skull1);
44         else if (tex == 2)
45                 gfxSetTexture(skull2);
46         else if (tex == 3)
47                 gfxSetTexture(skull3);
48         else if (tex == 4)
49                 gfxSetTexture(skull4);
50         else if (tex == 5)
51                 gfxSetTexture(skull5);
52         else if (tex == 6)
53                 gfxSetTexture(skull6);
54         else if (tex >= 7)
55                 gfxSetTexture(skull7);
56 //      gfxSetAspect(0);
57         gfxSetBlendMode(BLEND_MOD);
58         gfxTranslate(0,0,2.5);
59         
60         float x = (Sin(bt*6.43)+Cos(bt*4.23))*0.25;
61         float y = (Cos(bt*6.43)+Sin(bt*4.23))*0.25;
62
63         
64         gfxTexRect(x - 0.5, y + 0.5, x + 0.5, y -0.5);
65
66         float col = 0;
67         if (BASS > 0)
68                 col = BASS;
69
70         col = Fabs(Sin(time));
71         
72 }