; ------------------------------------------------------------
MULTIPIC_LIB_VERSION equ 1             ;the current version of multipic.library
; ------------------------------------------------------------
; flags for MP_Open():

MPMODE_LOAD    equ       0
MPMODE_SAVE    equ       1             ;PRIVATE, do not use
; ------------------------------------------------------------
; values for _pi_FileType:
PFT_UNKNOWN    equ       0             ;UNKONWN image type, unable to load
PFT_ILBM       equ       1             ;IFF ILBM
PFT_DEEP       equ       2             ;IFF DEEP
PFT_BMP        equ       3             ;BMP
PFT_RGB8       equ       4             ;IFF RGB8
PFT_RGBN       equ       5             ;IFF RGBN
PFT_YUVN       equ       6             ;IFF YUVN
PFT_VLAB       equ       7             ;IFF VLAB, private VLab format
PFT_PGM        equ       8             ;PGM
PFT_PPM        equ       9             ;PPM
PFT_QRT        equ       10            ;QRT
PFT_SUNRASTER  equ       11            ;SUNRASTER
PFT_XIPAINT    equ       12            ;XIPAINT, private VDPaint format

;values for _pi_Flags:
 BITDEF        PI,IFF,0                ;image is stored in an IFF file format
 BITDEF        PI,PALETTE,1            ;if set, a palette had been stored together
                                       ;  with the image
 BITDEF        PI,TRUECOLOR,2          ;set if the image is true color
                                       ;if at least one of PIF_PALETTE or
                                       ;  PIF_TRUECOLOR is set, the image seems
                                       ;  to be a color image.

 STRUCTURE     PicInfo,0
 LONG          _pi_Flags               ;see definitions above
 APTR          _pi_FileName            ;name of the file (provided to Open() )
 APTR          _pi_TypeName            ;file type, ascii identifier
 WORD          _pi_Type                ;see PFT_xxx above
                                       ;if this is PFT_UNKNOWN, multipic.library
                                       ;  can not load the image (if it is one)
 WORD          _pi_Width               ;The width of the image.
 WORD          _pi_Height              ;The height of the image.
 WORD          _pi_PageWidth           ;The page width of the image.
 WORD          _pi_PageHeight          ;The page height of the image.

 BYTE          _pi_AspectX             ;The X aspect of the image (0, if unknown)
 BYTE          _pi_AspectY             ;The Y aspect of the image (0, if unknown)

 UWORD         _pi_CMapEntries         ;number of color values
                                       ;2..256 with 8 bit images
                                       ;0 or 256 with 24 bit true color images
 UWORD         _pi_CMapSize_RGB        ;memory size of the PT_RGB palette
 UWORD         _pi_CMapSize_RRGGBB     ;memory size of the PT_RRGGBB palette
 UWORD         _pi_CMapSize_RGB4       ;memory size of the PT_RGB4 palette
 UWORD         _pi_CMapSize_RGB32      ;memory size of the PT_RGB32 palette
 UWORD         _pi_CMapSize_Res1       ;currently always 0
 UWORD         _pi_CMapSize_Res2       ;currently always 0

 UBYTE         _pi_Depth               ;1..8,12,24,32
 UBYTE         _pi_BytesPerPixel       ;1, 3, 4

 UBYTE         _pi_RedBits             ;1..8  \
 UBYTE         _pi_GreenBits           ;1..8   \ for TRUE-COLOR only
 UBYTE         _pi_BlueBits            ;1..8   /   otherwise 0
 UBYTE         _pi_AlphaBits           ;1..8  /
 UBYTE         _pi_Reserved1Bits       ;currently always 0
 UBYTE         _pi_Reserved2Bits       ;currently always 0

 LABEL         _pi_SIZEOF
; ------------------------------------------------------------
 STRUCTURE     PicHandle,0
 ULONG         _ph_Private
 LABEL         _ph_SIZEOF
; ------------------------------------------------------------
; Flags for BAT_Flags:
 BITDEF        BA,MERGEPALETTE,0       ;recalculate 24 bit true color data
                                       ;  if a palette is present
                                       ;  currently not yet implemented

; Tags for MP_SetBufferAttrs()

MP_TagBase                  equ         TAG_USER+$800   ;Begin counting tags
BAT_Inc                     equ         MP_TagBase+1
BAT_RedInc                  equ         MP_TagBase+2
BAT_GreenInc                equ         MP_TagBase+3
BAT_BlueInc                 equ         MP_TagBase+4
BAT_AlphaInc                equ         MP_TagBase+5
BAT_DefaultAlphaValue       equ         MP_TagBase+6
BAT_Flags                   equ         MP_TagBase+7
BAT_LeftEdge                equ         MP_TagBase+8
BAT_TopEdge                 equ         MP_TagBase+9
BAT_Width                   equ         MP_TagBase+10
BAT_Mod                     equ         MP_TagBase+11
BAT_RedMod                  equ         MP_TagBase+12
BAT_GreenMod                equ         MP_TagBase+13
BAT_BlueMod                 equ         MP_TagBase+14
BAT_AlphaMod                equ         MP_TagBase+15
;---------------------------------------------------------------------------
; PIT_xxx and PRT_xxx are PRIVATE and should  not be used!

PIT_Type                    equ         MP_TagBase+51       ;see PFT_xxx above, not yet
PIT_Width                   equ         MP_TagBase+52
PIT_Height                  equ         MP_TagBase+53
PIT_PageWidth               equ         MP_TagBase+54       ;Default PIT_Width
PIT_PageHeight              equ         MP_TagBase+55       ;Default PIT_Height
PIT_Depth                   equ         MP_TagBase+56
; ------------------------------------------------------------
; values for MP_ReadPalette

PT_RGB          equ         0
PT_RRGGBB       equ         1           ;not yet
PT_RGB4         equ         2           ;not yet
PT_RGB32        equ         3           ;not yet
; ------------------------------------------------------------
; possible error codes:

EC_OK                            equ  0
EC_INTERNAL                      equ  1
EC_DOS                           equ  2

EC_OUT_OF_MEMORY                 equ  3
EC_COULD_NOT_GET_INFORMATION     equ  4
EC_NO_IFFPARSE_LIB               equ  5
EC_END_OF_FILE                   equ  6
EC_PLANENUMBER_NOT_SUPPORTED     equ  7
EC_COMPRESSION_NOT_SUPPORTED     equ  8
EC_COMPRESSIONMODE_NOT_SUPPORTED equ  9
EC_COMPRESSIONMODE_UNKNOWN       equ 10
EC_ALLOCIFF_FAILED               equ 11
EC_IFFERR_EOC                    equ 12
EC_IFFERR_NO_SCOPE               equ 13
EC_IFFERR_READ                   equ 14
EC_IFFERR_WRITE                  equ 15
EC_IFFERR_SEEK                   equ 16
EC_BAD_DATA                      equ 17
EC_IFFERR_SYNTAX                 equ 18
EC_IFFERR_NOT_IFF                equ 19
EC_IFFERR_NO_HOOK                equ 20
EC_NO_VLAB_LIB                   equ 23
EC_BITMAPHEADER_NOT_FOUND        equ 24
EC_UNKNOWN_FILETYPE              equ 25
; ------------------------------------------------------------
; You may use this macro to call the functions in multipic.library. To avoid
; conflicts with existing functions, they have a slightly unusual name (MP_xxx).
; ------------------------------------------------------------
CALLMP:         MACRO
                  move.l    a6,-(sp)
                  movea.l   _MultiPicBase(a5),a6
                  jsr       _LVOMP_\1(a6)
                  movea.l   (sp)+,a6
                ENDM
; ------------------------------------------------------------
