home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 12 / MA_Cover_12.iso / libs / renderlib / include / render / render.i < prev    next >
Encoding:
Text File  |  1999-02-03  |  9.1 KB  |  313 lines

  1.     IFND RENDER_I
  2. RENDER_I    SET    1
  3. **
  4. **    $VER: render.i 29.1 (3-feb-99)
  5. **
  6. **    render.library definitions
  7. **
  8.  
  9. ;------------------------------------------------------------------------
  10.  
  11.     IFND UTILITY_TAGITEM_I
  12.     include "utility/tagitem.i"
  13.     ENDC
  14.  
  15. ;------------------------------------------------------------------------
  16.  
  17. RND_TAGBASE        EQU    TAG_USER+$1000
  18.  
  19.  
  20. ;------------------------------------------------------------------------
  21. ;
  22. ;    memhandler
  23. ;
  24. ;------------------------------------------------------------------------
  25.  
  26. RND_MemType        EQU    RND_TAGBASE+1    ; type of memhandler, see below
  27. RND_MemBlock        EQU    RND_TAGBASE+2    ; ptr to block of memory
  28. RND_MemSize        EQU    RND_TAGBASE+3    ; size of memblock [bytes]
  29. RND_MemFlags        EQU    RND_TAGBASE+18    ; memflags (exec/memory.h)
  30. RND_RMHandler        EQU    RND_TAGBASE+12    ; to pass a memhandler as an argument
  31.  
  32. *
  33. *    memhandler types
  34. *
  35.  
  36. RMHTYPE_POOL        EQU    1        ; v39 exec dynamic pool
  37. RMHTYPE_PRIVATE        EQU    2        ; private memory pool
  38. RMHTYPE_PUBLIC        EQU    3        ; common public memory
  39.  
  40.  
  41. ;------------------------------------------------------------------------
  42. ;
  43. ;    palette
  44. ;
  45. ;------------------------------------------------------------------------
  46.  
  47. RND_PaletteFormat    EQU    RND_TAGBASE+19    ; palette import/export format
  48. RND_EHBPalette        EQU    RND_TAGBASE+22    ; indicate a palette is EHB
  49. RND_FirstColor        EQU    RND_TAGBASE+23    ; first color entry
  50. RND_NewPalette        EQU    RND_TAGBASE+24    ; dispose the old palette and load a new one
  51. RND_RGBWeight        EQU    RND_TAGBASE+11    ; quantization factors for ExtractPalette()
  52.  
  53. *
  54. *    palette format types
  55. *
  56.  
  57. PALFMT_RGB32        EQU    1        ; ULONG red,green,blue
  58. PALFMT_RGB8        EQU    2        ; ULONG $00rrggbb
  59. PALFMT_RGB4        EQU    3        ; UWORD    $0rgb
  60. PALFMT_PALETTE        EQU    4        ; render.library palette
  61.  
  62. *
  63. *    palette sort mode types
  64. *    for the use with SortPalette()
  65. *
  66.  
  67.     ; no particular order
  68. PALMODE_NONE        EQU    $0000
  69.  
  70.     ; sort palette entries by brightness
  71. PALMODE_BRIGHTNESS    EQU    $0001        
  72.  
  73.     ; sort palette entries by the number of pixels that they represent.
  74.     ; You must supply the RND_Histogram taglist argument.
  75. PALMODE_POPULARITY    EQU    $0002
  76.  
  77.     ; sort palette entries by the number of histogram entries that they
  78.     ; represent. You must supply the RND_Histogram taglist argument.
  79. PALMODE_REPRESENTATION    EQU    $0003
  80.  
  81.     ; sort palette entries by their optical significance for the human
  82.     ; eye. Implementation is unknown to you and may change.
  83.     ; You must supply the RND_Histogram taglist argument.
  84. PALMODE_SIGNIFICANCE    EQU    $0004
  85.  
  86.     ; sort palette entries by color intensity
  87. PALMODE_SATURATION    EQU    $0005
  88.  
  89.     ; By default, sort direction is descending, i.e. the precedence is
  90.     ; more-to-less. Combine with this flag to invert the sort direction.
  91. PALMODE_ASCENDING    EQU    $0008
  92.  
  93.  
  94. ;------------------------------------------------------------------------
  95. ;
  96. ;    histogram related
  97. ;
  98. ;------------------------------------------------------------------------
  99.  
  100. RND_HSType        EQU    RND_TAGBASE+4    ; histogram type, see below
  101. RND_Histogram        EQU    RND_TAGBASE+9    ; a histogram as an argument
  102.  
  103. *
  104. *    Histogram / Palette types
  105. *    to be specified with RND_HSType
  106. *
  107.  
  108. HSTYPE_12BIT        EQU    4        ; 12bit dynamic histogram
  109. HSTYPE_15BIT        EQU    5        ; 15bit dynamic histogram
  110. HSTYPE_18BIT        EQU    6        ; 18bit dynamic histogram
  111. HSTYPE_21BIT        EQU    7        ; 21bit dynamic histogram
  112. HSTYPE_24BIT        EQU    8        ; 24bit dynamic histogram
  113. HSTYPE_12BIT_TURBO    EQU    20        ; 12bit tabular histogram
  114. HSTYPE_15BIT_TURBO    EQU    21        ; 15bit tabular histogram
  115. HSTYPE_18BIT_TURBO    EQU    22        ; 18bit tabular histogram
  116.  
  117. *
  118. *    tags that can be queried via QueryHistogram()
  119. *
  120.  
  121. RND_NumPixels        EQU    RND_TAGBASE+5    ; # pixels in a histogram
  122. RND_NumColors        EQU    RND_TAGBASE+6    ; # colors in a histogram
  123.  
  124.  
  125. ;------------------------------------------------------------------------
  126. ;
  127. ;    rendering and conversions
  128. ;
  129. ;------------------------------------------------------------------------
  130.  
  131. RND_ColorMode        EQU    RND_TAGBASE+7    ; color mode, see below
  132. RND_DitherMode        EQU    RND_TAGBASE+8    ; dither mode, see below
  133. RND_DitherAmount    EQU    RND_TAGBASE+26    ; dither amount
  134. RND_OffsetColorZero    EQU    RND_TAGBASE+10    ; first color index to be output
  135.  
  136. *
  137. *    color mode types
  138. *    to be specified with RND_ColorMode
  139. *
  140.  
  141. COLORMODE_CLUT        EQU    $0000        ; normal palette lookup
  142. COLORMODE_HAM8        EQU    $0001        ; HAM8 mode
  143. COLORMODE_HAM6        EQU    $0002        ; HAM6 mode
  144. COLORMODE_MASK        EQU    $0003        ; mask to determine COLORMODE
  145.  
  146. *
  147. *    dither mode types
  148. *    to be specified with RND_DitherMode
  149. *
  150.  
  151. DITHERMODE_NONE        EQU    $0000        ; no dither
  152. DITHERMODE_FS        EQU    $0001        ; Floyd-Steinberg dither
  153. DITHERMODE_RANDOM    EQU    $0002        ; random dither
  154. DITHERMODE_EDD        EQU    $0003        ; edd dither
  155.  
  156.  
  157. ;------------------------------------------------------------------------
  158. ;
  159. ;    miscellaneous
  160. ;
  161. ;------------------------------------------------------------------------
  162.  
  163. RND_ProgressHook    EQU    RND_TAGBASE+13    ; progress callback hook
  164. RND_SourceWidth        EQU    RND_TAGBASE+14    ; total input width [pixels]
  165. RND_DestWidth        EQU    RND_TAGBASE+15    ; total output width [pixels]
  166. RND_PenTable        EQU    RND_TAGBASE+16    ; ptr to a chunky conversion table
  167. RND_LeftEdge        EQU    RND_TAGBASE+17    ; chunky data left edge [pixels]
  168. RND_LineHook        EQU     RND_TAGBASE+20    ; line callback hook
  169. RND_MapEngine        EQU    RND_TAGBASE+27    ; Mapping-Engine
  170. RND_Interleave        EQU    RND_TAGBASE+28    ; Interleave
  171. RND_Palette        EQU    RND_TAGBASE+29    ; Palette
  172. RND_Weight        EQU    RND_TAGBASE+30    ; Weight factor
  173. RND_ScaleEngine        EQU    RND_TAGBASE+31    ; ScaleEngine
  174. RND_DestCoordinates    EQU    RND_TAGBASE+42    ; Texture Coordinates
  175. RND_BGColor        EQU    RND_TAGBASE+43    ; backcolor for filling
  176. RND_BGPen        EQU    RND_TAGBASE+44    ; backpen for filling
  177.  
  178.  
  179. ;------------------------------------------------------------------------
  180. ;
  181. ;    alpha-channel
  182. ;
  183. ;------------------------------------------------------------------------
  184.  
  185. RND_AlphaChannel    EQU    RND_TAGBASE+32    ; custom alpha-channel
  186. RND_AlphaModulo        EQU    RND_TAGBASE+33    ; bytes between alpha-channel pixels
  187. RND_AlphaWidth        EQU    RND_TAGBASE+34    ; width of alpha-channel array
  188. RND_MaskRGB        EQU    RND_TAGBASE+35    ; masking RGB for CreateAlphaArray
  189. RND_MaskFalse        EQU    RND_TAGBASE+36    ; mask value for outside color range
  190. RND_MaskTrue        EQU    RND_TAGBASE+37    ; mask value for inside color range
  191.  
  192. RND_SourceWidth2    EQU    RND_TAGBASE+38    ; total source width for 3channel operations
  193. RND_AlphaChannel2    EQU    RND_TAGBASE+39    ; second custom alpha-channel
  194. RND_AlphaModulo2    EQU    RND_TAGBASE+40    ; pixel modulo for a second alpha-channel
  195. RND_AlphaWidth2        EQU    RND_TAGBASE+41    ; width of a second alpha-channel array
  196.  
  197. ;------------------------------------------------------------------------
  198. ;
  199. ;    PixelFormat
  200. ;
  201. ;------------------------------------------------------------------------
  202.  
  203. RND_PixelFormat        EQU    RND_TAGBASE+25    ; pixel format, see below
  204.  
  205. PIXFMTB_CHUNKY        EQU    3
  206. PIXFMTB_BITMAP        EQU    4
  207. PIXFMTB_RGB        EQU    5
  208.  
  209. PIXFMT_CHUNKY_CLUT    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_CLUT
  210. PIXFMT_0RGB_32        EQU    1<<PIXFMTB_RGB+0
  211.  
  212. *
  213. *    these types are currently not used by render.library, but
  214. *    some of them are applicable for guigfx.library functions:
  215. *
  216.  
  217. PIXFMT_CHUNKY_HAM8    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_HAM8
  218. PIXFMT_CHUNKY_HAM6    EQU    1<<PIXFMTB_CHUNKY+COLORMODE_HAM6
  219. PIXFMT_BITMAP_CLUT    EQU    1<<PIXFMTB_BITMAP+COLORMODE_CLUT
  220. PIXFMT_BITMAP_HAM8    EQU    1<<PIXFMTB_BITMAP+COLORMODE_HAM8
  221. PIXFMT_BITMAP_HAM6    EQU    1<<PIXFMTB_BITMAP+COLORMODE_HAM6
  222.  
  223. PIXFMT_RGB_24        EQU    1<<PIXFMTB_RGB+1
  224.  
  225. *
  226. *    strictly internal:
  227. *
  228.  
  229. PIXFMT_BITMAP_RGB    EQU    (1<<PIXFMTB_BITMAP)+(1<<PIXFMTB_RGB)
  230.  
  231.  
  232. ;------------------------------------------------------------------------
  233. ;
  234. ;    ExtractPalette return codes
  235. ;
  236. ;    You must at least check for EXTP_SUCCESS.
  237. ;    EXTP_NO_DATA indicates that there were no colors
  238. ;    in the histogram.
  239. ;
  240. ;------------------------------------------------------------------------
  241.  
  242. EXTP_SUCCESS            EQU    0
  243. EXTP_NOT_ENOUGH_MEMORY        EQU    1
  244. EXTP_CALLBACK_ABORTED        EQU    2
  245. EXTP_NO_DATA            EQU    3
  246.  
  247.  
  248. ;------------------------------------------------------------------------
  249. ;
  250. ;    AddRGB, AddRGBImage, AddChunkyImage return codes
  251. ;
  252. ;    You must at least check for ADDH_SUCCESS.
  253. ;    If not returned, the histogram is no longer
  254. ;    guaranteed to be accurate.
  255. ;
  256. ;------------------------------------------------------------------------
  257.  
  258. ADDH_SUCCESS            EQU    0
  259. ADDH_NOT_ENOUGH_MEMORY        EQU    1
  260. ADDH_CALLBACK_ABORTED        EQU    2
  261. ADDH_NO_DATA            EQU    3
  262.  
  263.  
  264. ;------------------------------------------------------------------------
  265. ;
  266. ;    Render return codes
  267. ;
  268. ;    You must at least check for REND_SUCCESS.
  269. ;    If not delivered, the image has not been
  270. ;    rendered completely.
  271. ;
  272. ;------------------------------------------------------------------------
  273.  
  274. REND_SUCCESS            EQU    0
  275. REND_NOT_ENOUGH_MEMORY        EQU    1
  276. REND_CALLBACK_ABORTED        EQU    2
  277. REND_NO_VALID_PALETTE        EQU    3
  278.  
  279.  
  280. ;------------------------------------------------------------------------
  281. ;
  282. ;    SortPalette return codes
  283. ;
  284. ;    You must at least check for SORTP_SUCCESS.
  285. ;    SORTP_NO_DATA indicates that there were data missing,
  286. ;    e.g. you specified no histogram or the histogram was empty.
  287. ;
  288. ;------------------------------------------------------------------------
  289.  
  290. SORTP_SUCCESS            EQU    0
  291. SORTP_NO_DATA            EQU    1
  292. SORTP_NOT_ENOUGH_MEMORY        EQU    2
  293. SORTP_NOT_IMPLEMENTED        EQU 3
  294.  
  295.  
  296. ;------------------------------------------------------------------------
  297. ;
  298. ;    conversion return codes
  299. ;
  300. ;    These return codes apply to conversion functions
  301. ;    such as Chunky2RGB and ConvertChunky.
  302. ;
  303. ;------------------------------------------------------------------------
  304.  
  305. CONV_SUCCESS            EQU    0
  306. CONV_CALLBACK_ABORTED        EQU    1
  307. CONV_NOT_ENOUGH_MEMORY        EQU    2
  308.  
  309.  
  310. ;========================================================================
  311.  
  312.     ENDC
  313.