home *** CD-ROM | disk | FTP | other *** search
/ Hentai Extra Gold 11 / HENTAI_EG_11.ISO / Extra / winamp532.exe / Plugins / milk_img.ini < prev    next >
INI File  |  2005-12-19  |  13KB  |  278 lines

  1. /*
  2.  
  3. NOTE: AS OF MilkDrop v1.04, the functionality of the 'burn' variable 
  4.   has changed.  See below.
  5.  
  6. NOTES/TIPS
  7.     -sprites range from 00-99
  8.     -'img=' line is mandatory.  File types currently supported (as of v1.04):
  9.         JPG
  10.         PNG
  11.         BMP
  12.         TGA
  13.         DDS
  14.         PPM
  15.         DIB
  16.     -valid filenames are:
  17.         relative:  img=billy.jpg    (to winamp\plugins dir)
  18.                    img=..\billy.jpg
  19.                    img=images\billy.jpg
  20.         absolute:  img=c:\blah\billy.jpg
  21.           NOT ok:  img=c:billy.jpg   -must specify path
  22.           NOT ok:  img=\billy.jpg    -must specify drive                  
  23.     -textures can be as large as 2048x2048 and do not have to be square.
  24.     -texture dims in memory will be next power of 2 higher for w, h.
  25.        ex: 500x60 texture will be stored in memory as a 512x64 texture.
  26.     -big textures can take up a lot of video memory and seriously
  27.         drop the frame rate; recommend sprites be no larger than 512x512.
  28.         256x256 is even more preferable.  
  29.     -if there isn't enough video memory for the texture, it will downsample
  30.         the texture (to as low as 16x16 pixels) trying to fit it into video
  31.         memory.
  32.     -IMPORTANT: to terminate a sprite from within its own code, set the 
  33.         'done' variable to a nonzero value (such as 1).  For example, 
  34.         "done=above(frame,500);" would make the sprite auto-self-terminate 
  35.         after 500 frames.  To make this framerate-independent, based it on
  36.         'time' or 'frame/fps' (they are equivalent).
  37.     -there is currently a maximum of 16 sprites that can be on the screen 
  38.         at one time.
  39.     -the sprite manager supports instancing, so if you load two sprites 
  40.         that access the same image on disk, only one texture will exist 
  41.         in video memory.
  42.     -the sprite manager frees textures immediately when all the sprites
  43.         using that texture (all instances) expire or finish.
  44.     -all of the mathematical functions available for milkdrop's per-frame
  45.         and per-pixel equations are available here for doing funky things
  46.         with the sprites; see milkdrop_preset_authoring.html for a complete
  47.         list of all the functions available.
  48.     -you can define your own variables in the init_ code just by setting
  49.         them to some value (like in the per-frame or per-pixel code of a 
  50.         milkdrop preset).  You can then access this value later in the 
  51.         per-frame (regular) sprite code.  If you change its value, the
  52.         change will be remembered from frame to frame.  Also, if you 
  53.         change the value of a built-in (read/write) variable, this change
  54.         will also be remembered from frame to frame.
  55.  
  56.  
  57.     READ-ONLY VARIABLES
  58.     -------------------
  59.     time 
  60.         the amount of time that has elapsed since the sprite 
  61.         was launched (in seconds).
  62.     frame
  63.         the # of frames that have elapsed since the sprite
  64.         was launched.
  65.     fps 
  66.         the current fps (frames-per-second) the MilkDrop is running at.
  67.     progress
  68.         the progress (0=start .. 1=end) through the current MilkDrop preset.
  69.     bass, mid, treb
  70.         the relative amount of each audio band being heard this frame.  
  71.         1 is normal; a number less than one (say, 0.5 .. 1) means 
  72.         the band is quiet; and a number greater than one (say, 1..2)
  73.         means the band is loud.
  74.     bass_att, mid_att, treb_att 
  75.         the same, but attenuated to be relative to the average band levels 
  76.         over a longer period of time (i.e. more heavily attenuated/damped).
  77.     
  78.     READ/WRITE VARIABLES
  79.     --------------------
  80.     x,y 
  81.         the x and y position of the sprite's center on the screen.
  82.         x is 0 at the left, 1 at the right; y is 0 at the top, 1 at the bottom.
  83.     r,g,b 
  84.         the red, green, and blue color brightness of the sprite.  0..1.
  85.     a 
  86.         the opacity (alpha) of the sprite.  0=transparent, 1=opaque.
  87.         note that the effect of this variable depends on the blendmode
  88.         (see below), and that sometimes, due to the blendmode, the value
  89.         of 'a' has no effect.
  90.     sx, sy
  91.         the size (stretching) of the sprite, in the X and Y directions.
  92.         if these are both 1, then the image will be scaled up just large
  93.         enough so that no part of it goes off the screen.  If these are
  94.         both 0.5, the image will be half that size; 2, and it's doubled.
  95.         If sx and sy are not equal, the image will be stretched 
  96.         appropriately.
  97.     rot
  98.         the angle of rotation, in radians, of the sprite.  The unit circle
  99.         goes from 0 to PI*2 (6.28) radians.  At zero radians there is no
  100.         rotation; PI/2 is like a 90-degree counter-clockwise rotation;
  101.         PI, 180 degrees; PI*3/2, 270 degrees; and PI*2 radians (the same 
  102.         as zero radians): 0 degrees.
  103.     blendmode
  104.         determines the manner in which the sprite image is blended onto
  105.         the screen.
  106.         0=blend: the image is multiplied by (r,g,b) and then blended,
  107.                  where 'a' decides the amount to blend.
  108.         1=decal: the image is multiplied by (r*a,g*a,b*a) and then pasted
  109.                  onto the background, with no transparency.  'a' values
  110.                  below 1 will modulate the color of the sprite, making 
  111.                  it darker.
  112.         2=additive: the image is multipled by (r*a,g*a,b*a) and then added
  113.                  onto the background, making it brighter.  Again, 'a' values
  114.                  below 1 will make the sprite darker.
  115.         3=srccolor: the amount to blend each pixel with the background
  116.                  is equal to the inverse of the pixel's color.  White texels
  117.                  in the sprite will be fully drawn, while black texels will 
  118.                  be transparent; in-between texels will be blended partially
  119.                  based on their brightness.  Requires hardware support.
  120.                  The alpha value ('a') has no effect when this blendmode
  121.                  is set; the alpha value is taken from the R,G,B color in 
  122.                  the image at evert point.
  123.         4=colorkey: 
  124.                  pixels that match the color specified in the colorkey are 
  125.                  drawn transparently, and all other pixels are drawn opaquely, 
  126.                  much like a television bluescreen.  When using this blendmode, 
  127.                  a line like the following is required to be present in the 
  128.                  sprite:
  129.                     colorkey=0x000000
  130.                  where the value is some 24-bit hexadecimal color.  The first
  131.                  two digits are 00 through FF hexadecimal (0-255 decimal)
  132.                  and are the red value; the third and fourth digits are the
  133.                  green value; and the last two digits are the blue value.
  134.                  So, 0x000000 makes black the see-through color; 0xFFFFFF 
  135.                  makes white pixels transparent; 0x0000FF makes blue pixels 
  136.                  transparent; and so on.
  137.  
  138.                  When the blendmode is not 4, the colorkey setting will have 
  139.                  no effect.
  140.  
  141.                  When blendmode is 4, the alpha value ('a') still works, too;
  142.                  it simply modulates the overall opacity of the sprite.
  143.  
  144.                  NOTE that this effect does not work on all video cards, and
  145.                  also tends to hiccup when running in 16-bit color.  Try it
  146.                  in 32-bit color for best chances for it to work.
  147.  
  148.                  NOTE that prior to MilkDrop v1.04, this feature worked
  149.                  slightly differently; there was a range of color key values
  150.                  (and you specified 'colorkey_lo' and 'colorkey_hi') 
  151.                  instead of just one single colorkey value ('colorkey').
  152.                  My apologies for any confusion this change might cause.
  153.     flipx
  154.         if nonzero, the sprite will be flipped horizontally.
  155.     flipy
  156.         if nonzero, the sprite will be flipped vertically.
  157.     repeatx
  158.         the number of times to repeat the texture over the surface of the 
  159.         sprite, in the x direction.  A value of 1 is the default; a value of
  160.         2 will cause the texture to tile twice in the x direction; and so on.
  161.         
  162.         **NOTE that if the width or height of the source image is not a 
  163.         power of two (16,32,64,128,256,512,1024,2048) then repeating the
  164.         image could cause strange bands to appear (on some poorly-written
  165.         display drivers or older video cards).  If using repeating, pre-
  166.         stretch the source image to be a power of 2 to alleviate this 
  167.         problem.**
  168.     repeaty
  169.         like repeatx, but in the y-direction.
  170.     done
  171.         set this to some nonzero value to make the sprite self-terminate.
  172.         frees up resources associated with the sprite.
  173.     burn
  174.         if set to a nonzero value, then the sprite will burn into MilkDrop's 
  175.         background and become part of the animation.  If set to zero, there 
  176.         will be no burn-in.  You can set this to 1 for a long time to make 
  177.         cool trails of the sprite, or you can set it to 1 just on the last frame
  178.         (at the same time that you set 'done' to 1), to make the sprite burn into 
  179.         the background and die off, much like song titles and custom messages do.
  180.         ( NOTE: prior to v1.04, 'burn' only worked on the last frame, when done
  181.           was set to 1.  With v1.04 and later, 'burn' works on any frame. )
  182.  
  183.  
  184.  
  185.     /end of critical info
  186.  
  187.  
  188. */
  189.  
  190. [img00]
  191. // testing color keying... not working well on GF2MX!
  192. img=c:\z\nova.jpg
  193. colorkey=0x000000
  194. init_1=blendmode = 4; 
  195. code_1=rot = time*0.27;                           
  196. code_2=new_scale = 0.75 + 0.1*sin(time*0.6);      
  197. code_3=sx = new_scale;                            
  198. code_4=sy = new_scale;                            
  199. code_5=r=0.5+sin(time*0.9);
  200. code_6=a=0.5+sin(time*1.3);
  201.  
  202. [img01]
  203. // this tests the 'done' function, and burns into the screen @ the end
  204. img=c:\z\osapien.jpg
  205. init_1=blendmode = 3;
  206. init_2=x = 1;
  207. init_3=orig_y = 0.5;
  208. code_1=time_to_reset = below(x,-0.5);
  209. code_2=x = x*(1-time_to_reset) + time_to_reset*(1.5 + 0.01*rand(100) + 1);
  210. code_3=orig_y = orig_y*(1-time_to_reset) + time_to_reset*(0.3 + 0.4*0.01*rand(100));
  211. code_4=sx = sx*(1-time_to_reset) + time_to_reset*(0.25 + 0.4*0.01*rand(100));
  212. code_5=sy = sx;
  213. code_6=x = x - 0.008 + 0.0033*sin(time*1.371);
  214. code_7=y = orig_y + 0.12*sin(time*1.9);
  215. code_8=done=above(frame,80);
  216. code_9=burn=done;     // burn into screen @ end
  217.  
  218. [img02]
  219. // this burns into the screen *every frame*
  220. img=c:\z\osapien.jpg
  221. init_1=blendmode = 3;
  222. init_2=x = 1;
  223. init_3=orig_y = 0.5;
  224. code_1=time_to_reset = below(x,-0.5);
  225. code_2=x = x*(1-time_to_reset) + time_to_reset*(1.5 + 0.01*rand(100) + 1);
  226. code_3=orig_y = orig_y*(1-time_to_reset) + time_to_reset*(0.3 + 0.4*0.01*rand(100));
  227. code_4=sx = sx*(1-time_to_reset) + time_to_reset*(0.25 + 0.4*0.01*rand(100));
  228. code_5=sy = sx;
  229. code_6=x = x - 0.008 + 0.0033*sin(time*1.371);
  230. code_7=y = orig_y + 0.12*sin(time*1.9);
  231. code_8=done=above(frame,80);
  232. code_9=burn=1;      // burn into screen every frame
  233.  
  234. [img03]
  235. // for testing: show a large (nova2) or large+skinny (nova3) texture
  236. img=c:\z\nova3.jpg
  237. init_1=blendmode = 2;
  238. code_1=rot = time*0.27;                           
  239. code_2=new_scale = 1.0 + 0.1*sin(time*0.6);      
  240. code_3=sx = new_scale;                            
  241. code_4=sy = new_scale;                            
  242. code_5=new_alpha = min(0.9,max(0.2,  2*max(bass-.05,bass_att)-1.1  ));
  243. code_6=a = a*0.83 + 0.17*new_alpha;
  244.  
  245. [img04]
  246. desc="cool: an 'osapien' drifts across the screen every so often."
  247. img=c:\z\osapien.jpg
  248. init_1=blendmode = 3;
  249. init_2=x = -100;
  250. init_3=orig_y = 0.5;
  251. code_1=time_to_reset = below(x,-0.5);
  252. code_2=x = x*(1-time_to_reset) + time_to_reset*(1.5 + 0.01*rand(100) + 3);
  253. code_3=orig_y = orig_y*(1-time_to_reset) + time_to_reset*(0.3 + 0.4*0.01*rand(100));
  254. code_4=sx = sx*(1-time_to_reset) + time_to_reset*(0.25 + 0.4*0.01*rand(100));
  255. code_5=sy = sx;
  256. code_6=x = x - 0.008 + 0.0033*sin(time*1.371);
  257. code_7=y = orig_y + 0.12*sin(time*1.9);
  258.  
  259. [img10]
  260. img=c:\z\nova.jpg
  261. init_1=blendmode = 2;
  262. code_1=rot = time*0.27;                           
  263. code_2=new_scale = 2.0 + 0.2*sin(time*0.6);      
  264. code_3=sx = new_scale;                            
  265. code_4=sy = new_scale;                            
  266. code_5=new_alpha = min(0.9,max(0.2,  2*max(bass-.05,bass_att)-1.1  ));
  267. code_6=a = a*0.83 + 0.17*new_alpha;
  268.  
  269. [img11]
  270. img=c:\z\baily2.jpg
  271. init_1=blendmode = 2;
  272. code_1=rot = -time*0.2;                           
  273. code_2=new_scale = 2.0 + 0.2*sin(time*0.6);      
  274. code_3=sx = new_scale;                            
  275. code_4=sy = new_scale;                            
  276. code_5=new_alpha = .4*min(0.9,max(0.2,  2*max(treb-.05,treb_att)-1.1  ));
  277. code_6=a = a*0.83 + 0.17*new_alpha;
  278.