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

  1.  
  2. /*
  3.  * xa_types.h
  4.  *
  5.  * Copyright (C) 1995,1996,1997 by Mark Podlipec. 
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied 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 <stdio.h>
  20.  
  21. typedef int             xaLONG;
  22. typedef unsigned int    xaULONG;
  23. typedef short           xaSHORT;
  24. typedef unsigned short  xaUSHORT;
  25. typedef char            xaBYTE;
  26. typedef unsigned char   xaUBYTE;
  27.  
  28. #define xaFALSE  0
  29. #define xaTRUE   1
  30. #define xaNOFILE 2
  31. #define xaERROR  3
  32.  
  33. #define xaMIN(x,y)   ( ((x)>(y))?(y):(x) )
  34. #define xaMAX(x,y)   ( ((x)>(y))?(x):(y) )
  35.  
  36.  
  37. typedef struct
  38. {
  39.   xaUSHORT red,green,blue,gray;
  40. } ColorReg;
  41.  
  42. typedef struct XA_ACTION_STRUCT
  43. {
  44.  xaLONG type;           /* type of action */
  45.  xaLONG cmap_rev;          /* rev of cmap */
  46.  xaUBYTE *data;         /* data ptr */
  47.  struct XA_ACTION_STRUCT *next;
  48.  struct XA_CHDR_STRUCT *chdr;
  49.  ColorReg *h_cmap;      /* For IFF HAM images */
  50.  xaULONG *map;
  51.  struct XA_ACTION_STRUCT *next_same_chdr; /*ptr to next action with same cmap*/
  52. } XA_ACTION;
  53.  
  54. typedef struct XA_CHDR_STRUCT
  55. {
  56.  xaLONG rev;
  57.  ColorReg *cmap;
  58.  xaULONG csize,coff;
  59.  xaULONG *map;
  60.  xaULONG msize,moff;
  61.  struct XA_CHDR_STRUCT *next;
  62.  XA_ACTION *acts;
  63.  struct XA_CHDR_STRUCT *new_chdr;
  64. } XA_CHDR;
  65.  
  66. typedef struct
  67. {
  68.   xaUBYTE *Ybuf;
  69.   xaUBYTE *Ubuf;
  70.   xaUBYTE *Vbuf;
  71.   xaUBYTE *the_buf;
  72.   xaULONG  the_buf_size;
  73.   xaUSHORT y_w,y_h;
  74.   xaUSHORT uv_w,uv_h;
  75. } YUVBufs;
  76.  
  77. typedef struct
  78. {
  79.   xaULONG Uskip_mask;
  80.   xaLONG *YUV_Y_tab;
  81.   xaLONG *YUV_UB_tab;
  82.   xaLONG *YUV_VR_tab;
  83.   xaLONG *YUV_UG_tab;
  84.   xaLONG *YUV_VG_tab;
  85. } YUVTabs;
  86.  
  87.  
  88. #define DEBUG_LEVEL1   if (xa_debug >= 1)
  89. #define DEBUG_LEVEL2   if (xa_debug >= 2)
  90. #define DEBUG_LEVEL3   if (xa_debug >= 3)
  91. #define DEBUG_LEVEL4   if (xa_debug >= 4)
  92. #define DEBUG_LEVEL5   if (xa_debug >= 5)
  93.  
  94. /* DELTA Return VALUES */
  95. #define ACT_DLTA_NORM   0x00000000   /* nothing special */
  96. #define ACT_DLTA_BODY   0x00000001   /* IFF BODY - used for dbl buffer */
  97. #define ACT_DLTA_XOR    0x00000002   /* delta work in both directions */
  98. #define ACT_DLTA_NOP    0x00000004   /* delta didn't change anything */
  99. #define ACT_DLTA_MAPD   0x00000008   /* delta was able to map image */
  100. #define ACT_DLTA_BAD    0x80000000   /* uninitialize value if needed */
  101. #define ACT_DLTA_DROP   0x00000010   /* drop this one */
  102.