home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2004 July & August / Gamestar_64_2004-07-08_dvd.iso / Programy / winamp501_full.exe / $_14327_ / beatvisualization.maki (.txt) < prev    next >
Winamp Compiled Maki Script  |  2003-11-16  |  9KB  |  289 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global ConfigAttribute ConfigAttribute3;
  6. Global ConfigAttribute ConfigAttribute4;
  7. Global ConfigAttribute ConfigAttribute5;
  8. Global ConfigAttribute ConfigAttribute6;
  9. Global ConfigAttribute ConfigAttribute7;
  10. Global ConfigAttribute ConfigAttribute8;
  11. Global ConfigAttribute ConfigAttribute9;
  12. Global ConfigAttribute ConfigAttribute10;
  13. Global ConfigAttribute ConfigAttribute11;
  14. Global ConfigAttribute ConfigAttribute12;
  15. Global ConfigAttribute ConfigAttribute13;
  16. Global ConfigAttribute ConfigAttribute14;
  17. Global ConfigAttribute ConfigAttribute15;
  18. Global ConfigAttribute ConfigAttribute16;
  19. Global ConfigAttribute ConfigAttribute17;
  20. Global ConfigAttribute ConfigAttribute18;
  21. Global ConfigAttribute ConfigAttribute19;
  22. Global ConfigAttribute ConfigAttribute20;
  23. Global ConfigAttribute ConfigAttribute21;
  24. Global ConfigAttribute ConfigAttribute22;
  25. Global ConfigAttribute ConfigAttribute23;
  26. Global ConfigAttribute ConfigAttribute24;
  27. Global ConfigAttribute ConfigAttribute25;
  28. Global ConfigAttribute ConfigAttribute26;
  29. Global ConfigAttribute ConfigAttribute27;
  30. Global ConfigAttribute ConfigAttribute28;
  31. Global ConfigAttribute ConfigAttribute29;
  32. Global Group Group103;
  33. Global Group Group104;
  34. Global Layer Layer105;
  35. Global Layer Layer106;
  36. Global Layer Layer107;
  37. Global Layer Layer108;
  38. Global Layer Layer109;
  39. Global Timer Timer110;
  40. Global AnimatedLayer AnimatedLayer111;
  41. Global AnimatedLayer AnimatedLayer112;
  42. Global Int Int113;
  43. Global Int Int114;
  44. Global Button Button115;
  45. Global Button Button116;
  46. Global Int Int117;
  47.  
  48. Function func0();
  49. Function func1830();
  50.  
  51. func0()
  52. {
  53. ConfigItem ConfigItem38;
  54. ConfigAttribute ConfigAttribute60;
  55. ConfigItem ConfigItem44;
  56. ConfigItem ConfigItem32;
  57. ConfigAttribute ConfigAttribute65;
  58. ConfigAttribute ConfigAttribute66;
  59. ConfigAttribute ConfigAttribute61;
  60. ConfigItem ConfigItem47;
  61. ConfigItem ConfigItem53;
  62. ConfigItem ConfigItem41;
  63. ConfigAttribute ConfigAttribute62;
  64. ConfigItem ConfigItem50;
  65. ConfigAttribute ConfigAttribute71;
  66. ConfigAttribute ConfigAttribute59;
  67. ConfigItem ConfigItem35;
  68. ConfigAttribute ConfigAttribute64;
  69. ConfigItem ConfigItem55;
  70. ConfigItem ConfigItem57;
  71. ConfigItem32 = Config.newItem(( "Winamp\ Modern"), ( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  72. ConfigItem35 = Config.newItem(( "Drawers"), ( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  73. ConfigItem38 = Config.newItem(( "Menus"), ( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  74. ConfigItem41 = Config.newItem(( "Main\ Windowshade\ Mode"), ( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  75. ConfigItem44 = Config.newItem(( "Vis\ Buttons"), ( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  76. ConfigItem47 = Config.newItem(( "Notifications"), ( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  77. ConfigItem50 = Config.newItem(( "Songticker"), ( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  78. ConfigItem53 = Config.newItem(( "Hidden"), ( "\{E9C2D926\-53CA\-400f\-9A4D\-85E31755A4CF\}"));
  79. ConfigItem55 = Config.getItem(( "\{1828D28F\-78DD\-4647\-8532\-EBA504B8FC04\}"));
  80. ConfigItem57 = Config.getItem(( "\{6559CA61\-7EB2\-4415\-A8A9\-A2AEEF762B7F\}"));
  81. ConfigAttribute59 = ConfigItem55.newAttribute(( "Winamp\ Modern"), ( ""));
  82. ConfigAttribute59.setData(( "\{26E26319\-AECA\-4433\-B8F1\-F4A5BF2A9ED5\}"));
  83. ConfigAttribute60 = ConfigItem32.newAttribute(( "Drawers"), ( ""));
  84. ConfigAttribute60.setData(( "\{C338B30F\-2A04\-4b10\-871F\-4E9D52D62806\}"));
  85. ConfigAttribute61 = ConfigItem32.newAttribute(( "Menus"), ( ""));
  86. ConfigAttribute61.setData(( "\{12ED320E\-6813\-45ac\-9F8E\-78EE5B2B5F6D\}"));
  87. ConfigAttribute62 = ConfigItem32.newAttribute(( "Main\ Windowshade\ Mode"), ( ""));
  88. ConfigAttribute62.setData(( "\{58F07E21\-AE96\-4899\-B7BC\-3640B40029FB\}"));
  89. ConfigAttribute64 = ConfigItem32.newAttribute(( "Vis\ Shortcut\ Button"), ( ""));
  90. ConfigAttribute64.setData(( "\{D70E3ABF\-D2FF\-4b82\-9A70\-4B5DF1A5D942\}"));
  91. ConfigAttribute65 = ConfigItem32.newAttribute(( "Notifications"), ( ""));
  92. ConfigAttribute65.setData(( "\{1AB968B3\-8687\-4a35\-BA70\-FCF6D92FB57F\}"));
  93. ConfigAttribute66 = ConfigItem32.newAttribute(( "Songticker"), ( ""));
  94. ConfigAttribute66.setData(( "\{7061FDE0\-0E12\-11D8\-BB41\-0050DA442EF3\}"));
  95. ConfigAttribute3 = ConfigItem35.newAttribute(( "Animate\ Video\/Vis\ Drawer\ \(disabled\ if\ opacity\ \<\ 100\%\)"), ( "0"));
  96. ConfigAttribute4 = ConfigItem35.newAttribute(( "Animate\ Config\ Drawer"), ( "0"));
  97. ConfigAttribute71 = ConfigItem35.newAttribute(( "sep1"), ( ""));
  98. ConfigAttribute71.setData(( "\-"));
  99. ConfigAttribute7 = ConfigItem35.newAttribute(( "Open\ Video\/Vis\ from\ the\ top"), ( "0"));
  100. ConfigAttribute8 = ConfigItem35.newAttribute(( "Open\ Video\/Vis\ from\ the\ bottom"), ( "1"));
  101. ConfigAttribute9 = ConfigItem35.newAttribute(( "Bypass\ setting\ to\ keep\ in\ screen"), ( "1"));
  102. if(( ConfigAttribute7.getData() == ( "1"))) {
  103. ConfigAttribute7.onDataChanged();
  104. } else {
  105. ConfigAttribute8.onDataChanged();
  106. }
  107. ConfigAttribute11 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Main\ Window"), ( "1"));
  108. ConfigAttribute12 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Playlist\ Editor"), ( "1"));
  109. ConfigAttribute13 = ConfigItem38.newAttribute(( "Show\ Menus\ in\ Media\ Library"), ( "1"));
  110. ConfigAttribute71 = ConfigItem32.newAttribute(( "sep1"), ( ""));
  111. ConfigAttribute71.setData(( "\-"));
  112. ConfigAttribute5 = ConfigItem32.newAttribute(( "Detach\ Vis\ Window"), ( "0"));
  113. ConfigAttribute6 = ConfigItem32.newAttribute(( "Detach\ Video\ Window"), ( "0"));
  114. ConfigAttribute10 = ConfigItem57.newAttribute(( "Equalizer\ Alt\+G"), ( "0"));
  115. ConfigAttribute71 = ConfigItem32.newAttribute(( "sep2"), ( ""));
  116. ConfigAttribute71.setData(( "\-"));
  117. ConfigAttribute17 = ConfigItem32.newAttribute(( "Enable\ Beat\ Visualization"), ( "1"));
  118. ConfigAttribute14 = ConfigItem41.newAttribute(( "Link\ Position\ and\ Width"), ( "1"));
  119. ConfigAttribute15 = ConfigItem41.newAttribute(( "Link\ Position\,\ Unlink\ Width"), ( "0"));
  120. ConfigAttribute16 = ConfigItem41.newAttribute(( "Unlink\ Position\ and\ Width"), ( "0"));
  121. ConfigAttribute19 = ConfigItem44.newAttribute(( "Open\ Context\ Menu"), ( "1"));
  122. ConfigAttribute18 = ConfigItem44.newAttribute(( "Open\ Configuration"), ( "0"));
  123. ConfigAttribute22 = ConfigItem47.newAttribute(( "Show\ always"), ( "0"));
  124. ConfigAttribute21 = ConfigItem47.newAttribute(( "Show\ with\ windowshade\ and\ when\ minimized"), ( "0"));
  125. ConfigAttribute20 = ConfigItem47.newAttribute(( "Show\ only\ when\ minimized"), ( "0"));
  126. ConfigAttribute23 = ConfigItem47.newAttribute(( "Never\ show"), ( "1"));
  127. ConfigAttribute71 = ConfigItem47.newAttribute(( "sep1"), ( ""));
  128. ConfigAttribute71.setData(( "\-"));
  129. ConfigAttribute27 = ConfigItem47.newAttribute(( "Disable\ in\ fullscreen"), ( "1"));
  130. ConfigAttribute24 = ConfigItem53.newAttribute(( "Notifications\ fade\ in\ time"), ( "1000"));
  131. ConfigAttribute25 = ConfigItem53.newAttribute(( "Notifications\ fade\ out\ time"), ( "5000"));
  132. ConfigAttribute26 = ConfigItem53.newAttribute(( "Notifications\ display\ time"), ( "2000"));
  133. ConfigAttribute28 = ConfigItem50.newAttribute(( "Enable\ Songticker\ scrolling"), ( "1"));
  134. ConfigAttribute29 = ConfigItem50.newAttribute(( "Disable\ Songticker\ scrolling"), ( "0"));
  135. return Null;
  136. }
  137.  
  138. System.onScriptLoaded()
  139. {
  140. func0();
  141. Group103 = System.getScriptGroup();
  142. Group104 = Group103.findObject(( "player\.normal\.display\.beatvisualization"));
  143. Layer105 = Group103.findObject(( "beatdisplayoverlay"));
  144. AnimatedLayer111 = Group103.findObject(( "beatleft"));
  145. AnimatedLayer112 = Group103.findObject(( "beatright"));
  146. Button115 = Group103.findObject(( "beatvisualization"));
  147. Button116 = Group103.findObject(( "beatvisualization2"));
  148. Layer106 = Group103.findObject(( "display\.right"));
  149. Layer107 = Group103.findObject(( "display\.right\.overlay2"));
  150. Layer108 = Group103.findObject(( "display\.st\.right"));
  151. Layer109 = Group103.findObject(( "visualization\.overlay"));
  152. Int113 = 0;
  153. Int114 = 0;
  154. Timer110 = ( new Timer);
  155. Timer110.setDelay(10);
  156. return Null;
  157. }
  158.  
  159. System.onScriptUnloading()
  160. {
  161. delete Timer110;
  162. return Null;
  163. }
  164.  
  165. func1830()
  166. {
  167. Int Int130;
  168. Int Int141;
  169. Int130 = Group103.getWidth();
  170. if(( ( Int130 % 2) != 0)) {
  171. Layer106.setXmlParam(( "image"), ( "player\.display\.right"));
  172. Layer107.setXmlParam(( "image"), ( "player\.display\.right"));
  173. Layer108.setXmlParam(( "image"), ( "player\.display\.songticker\.bg\.right"));
  174. Layer109.setXmlParam(( "image"), ( "player\.visualization\.overlay"));
  175. } else {
  176. Layer106.setXmlParam(( "image"), ( "player\.display\.right2"));
  177. Layer107.setXmlParam(( "image"), ( "player\.display\.right2"));
  178. Layer108.setXmlParam(( "image"), ( "player\.display\.songticker\.bg\.right2"));
  179. Layer109.setXmlParam(( "image"), ( "player\.visualization\.overlay2"));
  180. }
  181. if(( Int130 < 480)) {
  182. Int141 = ( ( Int130 - 60) / 2);
  183. Group104.setXmlParam(( "x"), System.integerToString(Int141));
  184. Group104.show();
  185. if(( ConfigAttribute17.getData() == ( "1"))) {
  186. Timer110.stop();
  187. Timer110.start();
  188. } else {
  189. Timer110.stop();
  190. AnimatedLayer111.gotoFrame(0);
  191. AnimatedLayer112.gotoFrame(0);
  192. }
  193. } else {
  194. Group104.hide();
  195. Timer110.stop();
  196. }
  197. return Null;
  198. }
  199.  
  200. Group103.onResize(int x, int y, int w, int h)
  201. {
  202. func1830();
  203. return Null;
  204. }
  205.  
  206. Timer110.onTimer()
  207. {
  208. Int Int148;
  209. Int Int150;
  210. Int Int147;
  211. Int Int151;
  212. Int147 = System.getLeftVuMeter();
  213. Int148 = System.getRightVuMeter();
  214. Int150 = ( Int147 / 16);
  215. Int151 = ( Int148 / 16);
  216. if(( Int150 < 14)) {
  217. Int150 = 14;
  218. }
  219. if(( Int151 < 14)) {
  220. Int151 = 14;
  221. }
  222. if(( Int150 > Int113)) {
  223. Int150 = ( Int113 - 1);
  224. if(( Int150 > 0)) {
  225. Int150 = 0;
  226. }
  227. }
  228. if(( Int151 > Int114)) {
  229. Int151 = ( Int114 - 1);
  230. if(( Int151 > 0)) {
  231. Int151 = 0;
  232. }
  233. }
  234. Int113 = Int150;
  235. Int114 = Int151;
  236. AnimatedLayer111.gotoFrame(Int150);
  237. AnimatedLayer112.gotoFrame(Int151);
  238. return Null;
  239. }
  240.  
  241. ConfigAttribute17.onDataChanged()
  242. {
  243. func1830();
  244. return Null;
  245. }
  246.  
  247. System.onKeyDown(String key)
  248. {
  249. if(( key == ( "shift\+ctrl\+alt"))) {
  250. Int117 = 1;
  251. complete;
  252. } else {
  253. Int117 = 0;
  254. }
  255. return Null;
  256. }
  257.  
  258. Button115.onLeftClick()
  259. {
  260. if(( ConfigAttribute17.getData() == ( "1"))) {
  261. ConfigAttribute17.setData(( "0"));
  262. } else {
  263. ConfigAttribute17.setData(( "1"));
  264. }
  265. return Null;
  266. }
  267.  
  268. Button116.onActivate(int activated)
  269. {
  270. if(( ! Int117)) {
  271. Button115.leftClick();
  272. return Null;
  273. }
  274. Timer110.stop();
  275. if(activated) {
  276. AnimatedLayer111.setXmlParam(( "image"), ( "player\.display\.beat\.left2"));
  277. AnimatedLayer112.setXmlParam(( "image"), ( "player\.display\.beat\.right2"));
  278. Layer105.hide();
  279. } else {
  280. AnimatedLayer111.setXmlParam(( "image"), ( "player\.display\.beat\.left"));
  281. AnimatedLayer112.setXmlParam(( "image"), ( "player\.display\.beat\.right"));
  282. Layer105.show();
  283. }
  284. func1830();
  285. return Null;
  286. }
  287.  
  288.  
  289.