home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / space / software / unix / xanim.rdm < prev    next >
Encoding:
Text File  |  1992-08-04  |  6.7 KB  |  217 lines

  1.  
  2.  
  3. XAnim was written to display various types of animations in an X11 
  4. environment. Currently it supports most TrueColor, PseudoColor and
  5. 1 bit Monochrome displays. The intent was/is to develop a base player
  6. that allows new animation types to be added as they are developed.
  7.  
  8. Before you compile, edit the Makefile to choose your favorite compiler,
  9. optimization flags and to indicate where the X11 libraries are located.
  10.  
  11. Also edit the file xanim_config.h to setup up your favorite default
  12. conditions. Most of these can be overridden at run time.
  13.  
  14. Once compiled, xanim can display the following:
  15.  
  16.     1) FLI anims (including larger than 320x200 flis).
  17.     2) FLC anims (chunks 4 and 7).
  18.     2) IFF type 3,5,J and l(small L not 1) anims.
  19.     3) IFF color cycling.
  20.     4) IFF images (EHB included, but HAM shown as 332 or True Color)
  21.     5) GIF87a and GIF89a files(include multiple images). 
  22.     6) GIF89a animation files.
  23.     6) a kludgy text file listing gifs and what order to show them in.
  24.     7) DL animations, fairly untested.
  25.     8)  any combination of the above on the same command line.
  26.  
  27. NOTES:  This source code is still changing rapidly as new display
  28.     types are supported. Comments are being added, but are still
  29.     lacking.
  30.  
  31.  
  32. Usage and Options:
  33.  
  34. xanim [ [+|-]opts ...] animfile [ [ [+|-opts] animfile] ... ]
  35.  
  36. A + turns an option on and a - turns it off. 
  37. NOTE: you can reverse the meaning of + and -  by editing xanim_congif.h. 
  38.       Read the comment by DEFAULT_PLUS_IS_ON.
  39.  
  40. Options d,f,j and l ignore leading + and -'s.
  41. Leave a space after #'s
  42.  
  43. Options:
  44.  
  45.     Cl    This will cause new cmaps to being sorted by luminance.
  46.           This sometimes reduces cmap flickering between images.
  47.     Ct    This tries to fit each new cmap into the previous one.
  48.           For example if you display has 256 cmap entries and you
  49.           have a sequence of images, each with 8 entry cmaps, then
  50.           at least 32 of them will share one cmap. Possibly more,
  51.           if colors are shared. 
  52.     Cf    This will forcibly map new cmaps into the 1st one. If the
  53.           Ct option is set, then this is done only if Ct fails.
  54.           Currently, images aren't dithered on a forced remapping.
  55. NOTE:    currently Cl,Ct and Cf do not affect FLI or IFF colormaps, but
  56.     FLI(not IFF) colormaps can be considered a previous cmap.
  57.     (don't ask :^), this will probably change).
  58.  
  59.     F    Floyd-Steinberg dithering on Mono Displays.
  60.  
  61.     b    uncompress animations up front. GIFs are automatically
  62.           uncompressed.  Careful, use of this flag can eat up a
  63.           lot of memory. NOTE: IFF type J animations can now be
  64.           buffered, sort of. :^)  Type J animations that make
  65.           multiple use of deltas will display incorrectly.
  66.               (I know how to correct this, but it's a fair bit of
  67.            code and I haven't had time).
  68.  
  69.     c    This is used to tell XAnim that an IFF type 3,5 or l
  70.           animation is non-looping and that it needs to treat
  71.           it a bit differently. If an IFF type 3,5 or l animation
  72.           looks right the 1st time and is screwed up on the 2nd
  73.           loop, you probably need to use this flag.
  74.  
  75.     d#    debug. Spews a lot of stuff to the screen.
  76.           # is level(1-5) 1 being least amount of stuff.
  77.  
  78.     f#    Adds fading between animation files. The colormap
  79.           which fade to black in 16 frames. # is the delay
  80.           of each of these frames. -f0 turns off fading.
  81.  
  82.     i    Scale image vertically by 1/2.(Odd display lines
  83.           aren't displayed). Only for IFFs. 
  84.  
  85.         j#    # is number of milliseconds between frames
  86.           (default is 17 unless specified inside the
  87.           the animation itself).
  88.  
  89.     l#    loop following files # number of times before moving 
  90.           on to the next file.
  91.         
  92.     o    turns on certain optimizations. Turning this off would 
  93.           only be useful if you are buffering the anim and wish
  94.           to run the anim backwards. NOTE: On Monochrome displays
  95.           with Floyd-Steinberg dithering, optimization is forced off.
  96.  
  97.     p    Use Pixmap instead of Image in X11.  default is off.
  98.           A Pixmap on most machines won't actually be in offscreen
  99.           memory. It will usually be in main memory, but on
  100.           most servers and Image is copied somewhere and then to
  101.           the screen, where a Pixmap is copied directly to the
  102.           screen. This can amount to quite a bit of speed up.
  103.           Also, if you are running across a network, the Pixmap
  104.           is kept on the local machine, which usually speeds 
  105.           things up as well.
  106.           NOTE: if you don't buffer(+b) an fli or amiga anim, pixmap
  107.           won't buy you anything. Pixmaps are only implemented
  108.           for uncompressed image data.
  109.  
  110.     r     turns color cycling off(IFF cycling images).
  111.  
  112.         s    prevents window from resizing to match image
  113.           size. Window is the size of largest image.
  114.           default is on.
  115.  
  116.     u    when single stepping, anim is played until image is 
  117.           updated/changed.(a new cmap is not considered an update).
  118.           default is on.
  119.  
  120.     v    verbose. Tells you image sizes, number of deltas etc.
  121.  
  122. Anim Window Commands:
  123.  
  124.     q    quits.
  125.     g    move to anim file after a cycling IFF image.
  126.     s    stop color cycling if started.
  127.     r    restore original color once stopped (s).    
  128.     space    toggle. starts/stops animation
  129.     ,    go back one frame within file
  130.     .    go forward one frame within file
  131.     <    go back to start of previous file
  132.     >    go forward to start of next file
  133.  
  134.  
  135. Examples:
  136.  
  137.     To display a single animation:
  138.  
  139.         xanim iff3.anim
  140.  
  141.     To display a nonlooping IFF animation:
  142.  
  143.         xanim +c iff3.anim
  144.  
  145.     To display A.fli 3 times, B.anim and C.movie 2 times each and D.fli
  146.     once before repeating:
  147.  
  148.         xanim -l3 A.fli -l2 B.anim C.movie -l1 D.fli
  149.     or 
  150.         xanim +l3 A.fli +l2 B.anim C.movie +l1 D.fli
  151.  
  152.     To fade to black after A.fli B.fli and C.fli but not after D.fli:
  153.  
  154.         xanim +f3 A.fli B.fli C.fli +f0 D.fli
  155.  
  156.     To see A.anim real slow:
  157.  
  158.         xanim +j50 A.anim
  159.  
  160.     To display title image for a while then fade into an animation at
  161.     normal speed:
  162.  
  163.         xanim +f3 +j200 title.gif +j0 anim.gifanim
  164.  
  165.     To show 1st anim unbuffered at half height and 2nd anim buffered
  166.     at full height:
  167.  
  168.         xanim +i first.anim -i+b second.anim
  169.     or
  170.         xanim +i first.anim -i +b second.anim
  171.     
  172.  
  173.  
  174. A series of GIF's can be displayed as:
  175.  
  176.     xanim im_0.gif im_1.gif im_2.gif ... im_36.gif
  177.  
  178.  or
  179.  
  180.     xanim im_*.gif
  181.  
  182.  or
  183.  
  184.     xanim im.txt
  185.  
  186.  or
  187.  
  188.     xanim im.gifanim
  189.  
  190. where im.txt is a txt file(a list of images, see xanim.doc for more details).
  191. and im.gifanim is one gif file composed of im_0.gif through im_36.gif.
  192. (see txtmerge to create a single gif file from a txt file).
  193.  
  194.  
  195. Machine Specific and Compiler Notes:
  196. --------------------------------------
  197.  
  198. 1) Error: xanim.c, line 1464: HZ undefined
  199.    HZ is supposed to be defined as the number of clock ticks per second for
  200.    your system. This is used for timing between frames. 
  201.  
  202.  
  203.    vi xanim.h and add uncomment the following line
  204.  
  205.    /* 
  206.    #define HZ 60
  207.    */
  208.  
  209.    Alternatively, you can do a "man times" on your system in order to find
  210.    out what units times() returns. Typically, it's either [CLK_TCK]ths or
  211.    [HZ]ths of a second. Contact me if you're having problems.
  212.  
  213.  
  214.  
  215. Mark Podlipec  podlipec@dgxyris.webo.dg.com
  216.  
  217.