home *** CD-ROM | disk | FTP | other *** search
/ Dream 44 / Amiga_Dream_44.iso / Linux / Apps / xanim.tgz / xanim / xanim27064 / xa_config.h < prev    next >
Text File  |  1997-01-26  |  11KB  |  298 lines

  1.  
  2. /*
  3.  * xa_config.h
  4.  *
  5.  * Copyright (C) 1990,1991,1992,1993,1994,1995,1996,1997 by Mark Podlipec.
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified and redistributed without
  9.  * fee for non-commerical purposes provided that this copyright notice is
  10.  * preserved intact on all copies and modified copies.
  11.  *
  12.  * There is no warranty or other guarantee of fitness of this software.
  13.  * It is provided solely "as is". The author(s) disclaim(s) all
  14.  * responsibility and liability with respect to this software's usage
  15.  * or its effect upon hardware or computer systems.
  16.  *
  17.  */
  18.  
  19.  
  20. /* These defines are used to initialize the various flags that control
  21.  * the behavious of XAnim. They all can be overriden on the command
  22.  * line except for DEFAULT_PLUS_IS_ON and DEFAULT_X11_VERBOSE_FLAG.
  23.  */
  24.  
  25.  
  26. /* If this is aTRUE then '+' will turn an option on and '-' will turn it off.
  27.  * if this is xaFALSE then '+' will turn an option off and '-' will turn
  28.  * it on.
  29.  */
  30. #define DEFAULT_PLUS_IS_ON    xaTRUE
  31.  
  32. /* If xaTRUE then animations will be buffered ahead of time. Uses more memory.
  33.  */
  34. #define DEFAULT_BUFF_FLAG    xaFALSE
  35.  
  36. /* If xaTRUE then animations will be read from disk. This and BUFF_FLAG are
  37.  * mutually exclusive with BUFF_FLAG having priority.
  38.  */
  39. #define DEFAULT_FILE_FLAG    xaFALSE
  40.  
  41. /* If xaTRUE then iff animations will always loop back to 1st frame instead
  42.  * of to the 2nd delta. There is no easy way of knowing this ahead of time
  43.  * and and is rare and so it should be kept xaFALSE.
  44.  */
  45. #define DEFAULT_IFF_LOOP_OFF    xaFALSE
  46.  
  47. /* If xaTRUE then IFF CRNG (color cycling chunks) will be activated for
  48.  * single image IFF files.
  49.  */
  50. #define DEFAULT_CYCLE_IMAGE_FLAG    xaTRUE
  51.  
  52. /* If xaTRUE then IFF CRNG (color cycling chunks) will be activated for
  53.  * IFF animation files.
  54.  */
  55. #define DEFAULT_CYCLE_ANIM_FLAG        xaFALSE
  56.  
  57. /* If xaTRUE then image height is reduced by half if an IFF image/animation
  58.  * is interlaced.
  59.  */
  60. #define DEFAULT_ALLOW_LACE_FLAG        xaFALSE
  61.  
  62. /* If xaTRUE then the cmap will fade to black between files. Only works
  63.  * on PSEUDO_COLOR displays.
  64.  */
  65. /* NOTE: CURRENTLY NOT SUPPORTED */
  66. #define DEFAULT_FADE_FLAG    xaFALSE
  67. #define DEFAULT_FADE_TIME    20
  68.  
  69. /* If xaTRUE then window will be the size of the largest image. Smaller
  70.  * images and animations will be in upper left hand corner.
  71.  */
  72.  
  73. #define DEFAULT_NORESIZE_FLAG    xaFALSE
  74.  
  75. /* If xaTRUE then a window can be resized with the mouse. This results
  76.  * in the animation being scaled to fit and window. This also overrides
  77.  * DEFAULT_NORESIZE_FLAG.
  78.  */
  79. #define DEFAULT_ALLOW_RESIZING    xaFALSE
  80.  
  81. /* This affect IFF type 5 and J compressions as well as most FLI/FLC type
  82.  * compressions. Only the minimum area of the screen is updated that
  83.  * contains the changes from one image to the next. This is forced off
  84.  * in MONOCHROME mode due to peculiarities of the Floyd-Steinburg
  85.  * dithering algorithm. Having this on can cause "apparent" pauses in
  86.  * the animation because of the time difference between updating the
  87.  * entire screen and just part of it. This will occur if your hardware
  88.  * can not display the images at the specified rate. Turning optimization
  89.  * off will force the entire animation to go at the slower rate.
  90.  */
  91. #define DEFAULT_OPTIMIZE_FLAG    xaTRUE
  92.  
  93. /* If this is xaTRUE and DEFAULT_BUFF_FLAG is xaTRUE, the images will be
  94.  * put into pixmaps. Pixmaps have the following advantages:
  95.  *     they are stored locally  (in case you're running remotely)
  96.  *     they aren't copied twice (like most X11 servers do with XImages)
  97.  *     they could be in display memory(if your hardware has enough of it)
  98.  * It usually speeds things up.
  99.  */
  100. #define DEFAULT_PIXMAP_FLAG    xaFALSE
  101. /* If xaTRUE then Floyd-Steinberg dithering is used for MONOCHROME displays
  102.  */
  103. #define DEFAULT_DITHER_FLAG    xaTRUE
  104.  
  105. /* This cause XAnim to print out debugging information. Valid levels are
  106.  * from 1 to 5, with 0 being off.
  107.  */
  108. #define DEFAULT_DEBUG        0
  109.  
  110. /* When this is xaTRUE it causes XAnim to print out extra information about
  111.  * the animations
  112.  */
  113. #define DEFAULT_VERBOSE        xaFALSE
  114.  
  115. /* When this is xaTRUE it prevents XAnim from printing out revision and
  116.  * copyright info. Useful if being called up from WWW browser.
  117.  * This is overriden by -q option.  This is also overridden by verbose option
  118.  * and debug option.
  119.  */
  120. #define DEFAULT_QUIET        xaFALSE
  121.  
  122. /* This is the default number of times to loop through each file before
  123.  * continuing on.
  124.  */
  125. #define DEFAULT_LOOPEACH_FLAG    1
  126.  
  127. /* When this is xaTRUE it causes XAnim to "ping-pong" an animation. In other
  128.  * words, the anim will be played forwards to the end and then backwards
  129.  * to the beginning. This will be counted as one loop.
  130.  */
  131. #define DEFAULT_PINGPONG_FLAG    xaFALSE
  132.  
  133. /* This is the number of milliseconds between frames of the animation.
  134.  * If 0 then the number of milliseconds is taken from the animation
  135.  * itself.
  136.  */
  137. #define DEFAULT_JIFFY_FLAG    0
  138.  
  139. /* This is the number of milliseconds for single image cycling IFF files.
  140.  */
  141. #define DEFAULT_CYCLING_TIME   8000
  142.  
  143. /* Not yet supported
  144.  */
  145. #define DEFAULT_PACK_FLAG    xaFALSE
  146.  
  147. /* This causes XAnim to print out more information about the X11
  148.  * display on which it is running.
  149.  */
  150. #define DEFAULT_X11_VERBOSE_FLAG    xaFALSE
  151.  
  152.  
  153. /* COLOR DITHERING. Currently only NONE and FLOYD are supported. FLOYD
  154.  * dithering can add substantially to run and start up times.
  155.  */
  156. #define CMAP_DITHER_NONE    0
  157. #define CMAP_DITHER_FLOYD    1
  158. #define CMAP_DITHER_ORDERED    2
  159.  
  160. /* COLOR MAP STUFF.
  161.  *    luma_sort:   sorts the color map based on color's brightness
  162.  *    map_to_1st:  remaps new cmaps into 1st cmap. If try_to_1st fails
  163.  *           or isn't set.
  164.  *    map_to_one:  Creates one colormap from all color maps and then
  165.  *           remaps all images/anims to that cmap. Eliminates
  166.  *           flickering, but may reduce color quality.
  167.  *    play_nice:   Allocate colors from X11 defaults cmap. Screen colors
  168.  *           won't change when mouse is moved into and out of 
  169.  *           animation window. Color Cyling impossible with this
  170.  *           option. If you are running with non-default Visual,
  171.  *           X11 might have to change the colormap anyways.
  172.  *    hist_flag:   If XAnim needs to generate one cmap from multiple
  173.  *           (ie map_to_one/play_nice or cmap > X11's cmap) then
  174.  *           do histograms on any uncompressed images to aid in
  175.  *           color reductions if necessary. More time at startup
  176.  *           but might help color quality.
  177.  */
  178. #define DEFAULT_CMAP_LUMA_SORT    xaFALSE
  179. #define DEFAULT_CMAP_MAP_TO_1ST    xaFALSE
  180. #define DEFAULT_CMAP_MAP_TO_ONE    xaFALSE
  181. #define DEFAULT_CMAP_PLAY_NICE  xaTRUE
  182. #define DEFAULT_CMAP_HIST_FLAG  xaFALSE
  183. #define DEFAULT_CMAP_DITHER_TYPE CMAP_DITHER_NONE
  184.  
  185. /*
  186.  * Options for Median Cut stuff.
  187.  */
  188. #define CMAP_MEDIAN_SUM    0
  189. #define CMAP_MEDIAN_CENTER 1
  190. #define DEFAULT_CMAP_MEDIAN_TYPE 0
  191.  
  192. /* These are for TrueColor animatons such and HAM,HAM8 or 24 bit RLE files.
  193.  * true_to_332 means images are truncated to 3 bits red, 3 bits green and
  194.  *     2 bits blue in order to fit in a 256 entry cmap. If your X11 display
  195.  *     supports less than 256 cmap entries, these numbers will be less.
  196.  *
  197.  * true_to_gray means TrueColor anims are converted to 8bits of gray.
  198.  * true_to_1st means TrueColor anims have a cmap created by running
  199.  *     a median cut algorithm on their 1st image and then using that
  200.  *    for the remainder of the images. Anim must be buffered.
  201.  * true_to_all means TrueColor anims have a cmap created by running a
  202.  *    median cut algorithm on each image to create a cmap for each
  203.  *    image. Adds substantially to start up time. Anim must be buffered.
  204.  * true_to_map: This is automatically set when true_to_1st and true_to_all
  205.  *    are turned on. It can be optionally used with true_to_332 and
  206.  *    true_to_gray to used more bits(than332) when dithering TrueColor
  207.  *    anims down to the Displays cmap. Really doesn't make any sense
  208.  *    to set this with true_to_gray unless your display has less than
  209.  *    8 bits of grayscale.
  210.  */
  211. #define DEFAULT_TRUE_TO_332     xaTRUE
  212. #define DEFAULT_TRUE_TO_GRAY    xaFALSE
  213. #define DEFAULT_TRUE_TO_1ST     xaFALSE
  214. #define DEFAULT_TRUE_TO_ALL     xaFALSE
  215. #define DEFAULT_TRUE_MAP_FLAG    xaFALSE
  216.  
  217. /* 6 is 256K, 7 is 2M and 8 is 16M */
  218. #define CMAP_CACHE_MAX_BITS 6
  219. #define DEFAULT_CMAP_MEDIAN_CACHE xaFALSE
  220.  
  221. /*
  222.  * Title Options
  223.  *
  224.  * NONE        Title is just "XAnim"
  225.  * FILE        Title is just anim name while running. When stopped the
  226.  *        frame number is included.
  227.  * FRAME    Title is anim anim and frame number while running.
  228.  */
  229.  
  230. #define XA_TITLE_NONE   0
  231. #define XA_TITLE_FILE   1
  232. #define XA_TITLE_FRAME  2
  233.  
  234. #define DEFAULT_XA_TITLE_FLAG  1
  235.  
  236. /*
  237.  * GAMMA Options.
  238.  *
  239.  * DISP_GAMMA:    Is the default gamma of your display. This is to be
  240.  *        used to universally darken or lighten animations. Also
  241.  *        may be used to help gamma correct your display. :^)
  242.  *
  243.  * ANIM_GAMMA:    This is used to specify that all anims(unless specified
  244.  *        on the command line) are treated as if they were color
  245.  *        compensated to this gamma value. Unfortunately, for
  246.  *        the majority of the cases, you have no clue what gamma
  247.  *        value the animation was compensated to.
  248.  */
  249. #define DEFAULT_DISP_GAMMA 1.0
  250. #define DEFAULT_ANIM_GAMMA 1.0
  251.  
  252. /* 
  253.  * At the end of displaying the command line, xanim will either loop
  254.  * through again(xaFALSE), exit(xaTRUE), or pause and wait user input(xaPAUSE).
  255.  */
  256. #define DEFAULT_XA_EXIT_FLAG  xaFALSE
  257.  
  258. /*
  259.  * This determines if a remote control window should come up by default
  260.  * or not. It can still be overridden by the command line. This is only
  261.  * valid if REMOTE control support is compiled in.
  262.  */
  263. #define DEFAULT_XA_REMOTE_FLAG  xaTRUE
  264.  
  265. /* xaTRUE or xaFALSE */
  266. #define DEFAULT_XA_AUDIO_ENABLE xaTRUE
  267.  
  268. /* 0 - 100 */
  269. #define DEFAULT_XA_AUDIO_VOLUME 40
  270.  
  271. /* This is the default Audio Port that is enabled.
  272.  * This value may be overridden by the env SPEAKER variable if defined. 
  273.  * NOTE: on some machines EXTERNAL and HEADPHONES are the same.
  274.  *
  275.  * DEFAULT_XA_AUDIO_PORT settings:
  276.  *   XA_AUDIO_PORT_INT      Internal speaker
  277.  *   XA_AUDIO_PORT_HEAD     Headphones
  278.  *   XA_AUDIO_PORT_EXT      Line Out
  279.  *   XA_AUDIO_PORT_NONE      None - no sound OR no change from before(SPARC)
  280.  *
  281.  * SPEAKER environment variable settings:
  282.  *   INTERNAL        Internal speaker(also speaker box on Sparcs)
  283.  *   HEADPHONES        Headphones
  284.  *   EXTERNAL        LineOut/External speakers
  285.  */
  286.  
  287. #define DEFAULT_XA_AUDIO_PORT   XA_AUDIO_PORT_INT
  288.  
  289. /* Currently only used for AIX */
  290. /* Some AIX machines have "/dev/acpa0/1" instead. */
  291. /* Some AIX machines have "/dev/baud0/1" instead. UltiMedia Sound system */
  292. #ifdef XA_AIX_AUDIO
  293. #define DEFAULT_AUDIO_DEVICE_NAME   "/dev/paud0/1"
  294. #else
  295. #define DEFAULT_AUDIO_DEVICE_NAME   "/dev/audio"
  296. #endif
  297.  
  298.