home *** CD-ROM | disk | FTP | other *** search
/ Dream 44 / Amiga_Dream_44.iso / Linux / Apps / xanim.tgz / xanim / xanim27064 / xa_rle.h < prev    next >
C/C++ Source or Header  |  1997-01-26  |  2KB  |  68 lines

  1.  
  2. /*
  3.  * xa_rle.h
  4.  *
  5.  * Copyright (C) 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. #include "xanim.h"
  20.  
  21. #define RLE_MAGIC 0xcc52
  22.  
  23. typedef struct RLE_FRAME_STRUCT
  24. {
  25.  xaULONG time;
  26.  XA_ACTION *act;
  27.  struct RLE_FRAME_STRUCT *next;
  28. } RLE_FRAME;
  29.  
  30. typedef struct RLE_HDR_STRUCT
  31. {
  32.  xaULONG magic;
  33.  xaULONG xpos;
  34.  xaULONG ypos;
  35.  xaULONG xsize;
  36.  xaULONG ysize;      
  37.  xaULONG flags;      /* misc flags */
  38.  xaULONG chan_num;   /* number of channels   */
  39.  xaULONG pbits;      /* pixel bits */
  40.  xaULONG cmap_num;   /* number of channels with cmaps */
  41.  xaULONG cbits;      /* Log2 of cmap length  */
  42.  xaULONG csize;      /* size of cmap  */
  43. } RLE_HDR;
  44.  
  45. /* RLE flags definitions */
  46. /* TBD */
  47. #define     RLEH_CLEARFIRST        0x1   /* clear framebuffer flag */
  48. #define     RLEH_NO_BACKGROUND     0x2   /* if set, no bg color supplied */
  49. #define     RLEH_ALPHA             0x4   /* if set, alpha channel (-1) present */
  50. #define     RLEH_COMMENT           0x8   /* if set, comments present */
  51.  
  52.  
  53. #define RLE_RED         0       /* Red channel traditionally here. */
  54. #define RLE_GREEN       1       /* Green channel traditionally here. */
  55. #define RLE_BLUE        2       /* Blue channel traditionally here. */
  56. #define RLE_ALPHA      -1       /* Alpha channel here. */
  57.  
  58. #define RLE_OPCODE(x) ((x) & 0x3f)
  59. #define RLE_LONGP(x)  ((x) & 0x40)
  60. #define RLE_SkipLinesOp        0x01
  61. #define RLE_SetColorOp         0x02
  62. #define RLE_SkipPixelsOp       0x03
  63. #define RLE_ByteDataOp         0x05
  64. #define RLE_RunDataOp          0x06
  65. #define RLE_EOFOp              0x07
  66.  
  67.  
  68.