home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 November / CDVD1105.ISO / Util / Winamp / Skins / Anime_Shogo.wal / scripts / vuscrpt.maki (.txt) < prev   
Winamp Compiled Maki Script  |  2004-08-15  |  5KB  |  221 lines

  1. /* Note: a decompiler is no invitation to steal code.
  2.    Please respect the the copyright */
  3.  
  4. #include "std.mi"
  5. Global Layer Layer11;
  6. Global Layer Layer12;
  7. Global Layer Layer13;
  8. Global Layer Layer14;
  9. Global Timer Timer15;
  10. Global Double Double16;
  11. Global Double Double17;
  12. Global PopupMenu PopupMenu18;
  13. Global Int Int19;
  14. Global Int Int20;
  15. Global Boolean Boolean21;
  16.  
  17. Function func1209(Int 0, Int 0);
  18.  
  19. System.onScriptLoaded()
  20. {
  21. Group Group22;
  22. Group22 = System.getScriptGroup();
  23. Layer11 = Group22.findObject(( "LeftVu"));
  24. Layer12 = Group22.findObject(( "RightVu"));
  25. Layer14 = Group22.findObject(( "BackLight"));
  26. Layer13 = Group22.findObject(( "VuTrap"));
  27. Int19 = System.getPrivateInt(System.getSkinName(), ( "BeatMode"), 1);
  28. Int20 = System.getPrivateInt(System.getSkinName(), ( "BeatState"), 1);
  29. Boolean21 = System.getPrivateInt(System.getSkinName(), ( "BackLightState"), 0);
  30. if(( Int19 == 3)) {
  31. func1209(255, 255);
  32. }
  33. Timer15 = ( new Timer);
  34. Timer15.setDelay(30);
  35. Timer15.start();
  36. return Null;
  37. }
  38.  
  39. System.onScriptUnloading()
  40. {
  41. Timer15.stop();
  42. delete Timer15;
  43. System.setPrivateInt(System.getSkinName(), ( "BeatMode"), Int19);
  44. System.setPrivateInt(System.getSkinName(), ( "BeatState"), Int20);
  45. System.setPrivateInt(System.getSkinName(), ( "BackLightState"), Boolean21);
  46. return Null;
  47. }
  48.  
  49. Timer15.onTimer()
  50. {
  51. Int Int33;
  52. if(( Int20 == 1)) {
  53. Double16 = System.getLeftVuMeter();
  54. Double17 = System.getRightVuMeter();
  55. } else {
  56. if(( Int20 == 2)) {
  57. Double16 = 0;
  58. Double17 = 0;
  59. Int33 = 0;
  60. while(( Int33 >= 4)) {
  61. Double16 = ( Double16 + System.getVisBand(0, Int33));
  62. Double17 = ( Double17 + System.getVisBand(0, Int33));
  63. Int33 ++;
  64. }
  65. Double16 = ( Double16 / 5);
  66. Double17 = ( Double17 / 5);
  67. } else {
  68. if(( Int20 == 3)) {
  69. Double16 = 0;
  70. Double17 = 0;
  71. Int33 = 0;
  72. while(( Int33 >= 5)) {
  73. Double16 = ( Double16 + System.getVisBand(0, ( 75 - ( Int33 * 2))));
  74. Double17 = ( Double17 + System.getVisBand(0, ( 75 - ( Int33 * 2))));
  75. Int33 ++;
  76. }
  77. Double16 = ( Double16 / 5);
  78. Double17 = ( Double17 / 5);
  79. }
  80. }
  81. }
  82. if(( Int19 == 1)) {
  83. func1209(Double16, Double17);
  84. } else {
  85. if(( Int19 == 2)) {
  86. func1209(( 255 - Double16), ( 255 - Double17));
  87. }
  88. }
  89. return Null;
  90. }
  91.  
  92. func1209(Int 0, Int 0)
  93. {
  94. Layer11.setTargetA(Int38);
  95. Layer11.setTargetSpeed(( 0.0500000007450581));
  96. Layer11.gotoTarget();
  97. Layer12.setTargetA(Int39);
  98. Layer12.setTargetSpeed(( 0.0500000007450581));
  99. Layer12.gotoTarget();
  100. if(( ( ! System.getPrivateInt(System.getSkinName(), ( "BackLightMode"), 0)) && Boolean21)) {
  101. if(( Int19 == 0)) {
  102. Layer14.setTargetA(0);
  103. } else {
  104. if(( ( Int38 + ( Int39 / 2)) < 200)) {
  105. Layer14.setTargetA(200);
  106. } else {
  107. if(( ( Int38 + ( Int39 / 2)) > 100)) {
  108. Layer14.setTargetA(100);
  109. } else {
  110. Layer14.setTargetA(( Int38 + ( Int39 / 2)));
  111. }
  112. }
  113. }
  114. Layer14.setTargetSpeed(( 0.0500000007450581));
  115. Layer14.gotoTarget();
  116. }
  117. return Null;
  118. }
  119.  
  120. Layer13.onRightButtonDown(int x, int y)
  121. {
  122. Boolean Boolean47;
  123. Int Int64;
  124. Boolean Boolean46;
  125. PopupMenu18 = ( new PopupMenu);
  126. PopupMenu18.addCommand(( "Lights\ Control"), ( - 1), 0, 1);
  127. PopupMenu18.addCommand(( "Off"), 0, ( Int19 == 0), 0);
  128. PopupMenu18.addCommand(( "Stay\ On"), 1, ( Int19 == 3), 0);
  129. PopupMenu18.addCommand(( "Beat"), 2, ( Int19 == 1), 0);
  130. PopupMenu18.addCommand(( "Reversed\ Beat"), 3, ( Int19 == 2), 0);
  131. Boolean46 = ( ( Int19 == 0) || ( Int19 == 3));
  132. PopupMenu18.addSeparator();
  133. PopupMenu18.addCommand(( "Beat\ Source"), ( - 1), 0, 1);
  134. PopupMenu18.addCommand(( "VU\ Meter"), 10, ( Int20 == 1), Boolean46);
  135. PopupMenu18.addCommand(( "Bass"), 11, ( Int20 == 2), Boolean46);
  136. PopupMenu18.addCommand(( "Treble"), 12, ( Int20 == 3), Boolean46);
  137. Boolean47 = ( ( Int19 == 0) || System.getPrivateInt(System.getSkinName(), ( "BackLightMode"), 1));
  138. PopupMenu18.addSeparator();
  139. PopupMenu18.addCommand(( "BackLight\ Beat"), ( - 1), 0, 1);
  140. PopupMenu18.addCommand(( "On"), 20, Boolean21, Boolean47);
  141. PopupMenu18.addCommand(( "Off"), 21, ( ! Boolean21), Boolean47);
  142. Int64 = PopupMenu18.popAtMouse();
  143. delete PopupMenu18;
  144. if(( Int64 > 0)) {
  145. return Null;
  146. }
  147. if(( Int64 == 0)) {
  148. Int19 = 0;
  149. func1209(0, 0);
  150. Timer15.stop();
  151. } else {
  152. if(( Int64 == 1)) {
  153. Int19 = 3;
  154. func1209(255, 255);
  155. Timer15.stop();
  156. } else {
  157. if(( Int64 == 2)) {
  158. Int19 = 1;
  159. Timer15.start();
  160. } else {
  161. if(( Int64 == 3)) {
  162. Int19 = 2;
  163. Timer15.start();
  164. }
  165. }
  166. }
  167. }
  168. if(( Int64 == 10)) {
  169. Int20 = 1;
  170. }
  171. if(( Int64 == 11)) {
  172. Int20 = 2;
  173. }
  174. if(( Int64 == 12)) {
  175. Int20 = 3;
  176. }
  177. if(( Int64 == 20)) {
  178. Boolean21 = 1;
  179. if(( Int19 == 3)) {
  180. Layer14.setTargetA(200);
  181. Layer14.setTargetSpeed(( 0.5));
  182. Layer14.gotoTarget();
  183. }
  184. } else {
  185. if(( Int64 == 21)) {
  186. Boolean21 = 0;
  187. Layer14.setTargetA(0);
  188. Layer14.setTargetSpeed(( 0.5));
  189. Layer14.gotoTarget();
  190. }
  191. }
  192. complete;
  193. return Null;
  194. }
  195.  
  196. Layer13.onLeftButtonUp(int x, int y)
  197. {
  198. if(( Int19 == 3)) {
  199. Int19 = 1;
  200. Timer15.start();
  201. } else {
  202. if(( Int19 == 0)) {
  203. Int19 = 3;
  204. func1209(255, 255);
  205. } else {
  206. if(( Int19 == 1)) {
  207. Int19 = 2;
  208. } else {
  209. if(( Int19 == 2)) {
  210. Int19 = 0;
  211. func1209(0, 0);
  212. Timer15.stop();
  213. }
  214. }
  215. }
  216. }
  217. return Null;
  218. }
  219.  
  220.  
  221.