/*
**  $VER: blitter.e V0.8B
**
**  Blitter Object Definitions.
**
**  (C) Copyright 1996-1997 DreamWorld Productions.
**      All Rights Reserved
*/

OPT MODULE
OPT EXPORT
OPT PREPROCESS

MODULE 'gms/dpkernel','graphics/pictures','graphics/screens'

->***************************************************************************
->* Bitmap Object. 

#define BMPVERSION  1
#define TAGS_BITMAP ((ID_SPCTAGS<<16)|ID_BITMAP)

OBJECT bitmap
  head[1]     :ARRAY OF head
  data        :LONG   -> Pointer to bitmap data area.
  width       :INT    -> Width.
  bytewidth   :INT    -> ByteWidth.
  height      :INT    -> Height.
  scrtype     :INT    -> Screen type.
  planes      :INT    -> Amount of planes.
  linemodulo  :LONG   -> Line differential.
  planemodulo :LONG   -> Plane differential.
  owner       :LONG   -> Bitmap owner.
  restore     :LONG   -> Restore list for this bitmap, if any.
  size        :LONG   -> Total size of the bitmap in bytes.
ENDOBJECT

/***************************************************************************
** Bob Object.
*/

#define BOBVERSION  1
#define TAGS_BOB    ((ID_SPCTAGS<<16)|ID_BOB)

OBJECT bob
   head[1]      :ARRAY OF head
   gfxdata      :LONG          -> Pointer to base of BOB graphics.
   maskdata     :LONG          -> Pointer to base of BOB masks.
   frame        :INT           -> Current frame.
   framelist    :LONG          -> Pointer to frame list.
   srcwidth     :INT           -> Modulo (skip in source) in bytes.
   width        :INT           -> Width in pixels.
   bytewidth    :INT           -> Width in bytes.
   height       :INT           -> Height in pixels.
   xcoord       :INT           -> To X pixel.
   ycoord       :INT           -> To Y pixel.
   clipLX       :INT           -> Left X border in bytes (0/8)
   clipTY       :INT           -> Top Y border (0)
   clipRX       :INT           -> Right X border in bytes (320/8)
   clipBY       :INT           -> Bottom Y border (256)
   fplane       :INT           -> 1st Plane to blit to (planar only)
   planes       :INT           -> Amount of planes
   planesize    :LONG          -> Size Of Plane Source (planar only)
   attrib       :LONG          -> Attributes like CLIP and MASK.
   picturetags  :LONG          -> Pointer to a picture struct (bob origin).
   empty        :INT           -> Reserved
   srcmaskwidth :INT
   picture      :PTR TO picture
   directlist   :LONG
   amtframes    :INT
   screen       :PTR TO screen
   bitmap       :PTR TO bitmap
   buffers      :INT
   maskcoords   :PTR TO framelist
   propwidth    :INT
   propheight   :INT
   directmasks  :LONG
ENDOBJECT

CONST BBA_GfxData =     $C0000000+12,
      BBA_MaskData =    $C0000000+16,
      BBA_Frame =       $40000000+20,
      BBA_FrameList =   $C0000000+22,
      BBA_SrcWidth =    $40000000+26,
      BBA_Width =       $40000000+28,
      BBA_ByteWidth =   $40000000+30,
      BBA_Height =      $40000000+32,
      BBA_XCoord =      $40000000+34,
      BBA_YCoord =      $40000000+36,
      BBA_ClipLX =      $40000000+38,
      BBA_ClipTY =      $40000000+40,
      BBA_ClipRX =      $40000000+42,
      BBA_ClipBY =      $40000000+44,
      BBA_FPlane =      $40000000+46,
      BBA_Planes =      $40000000+48,
      BBA_PlaneSize =   $80000000+50,
      BBA_Attrib =      $80000000+54,
      BBA_PictureTags = $C0000000+58,
      BBA_Empty =       $40000000+62,
      BBA_SrcMaskWidth =$40000000+64,
      BBA_Picture =     $C0000000+66,
      BBA_DirectList =  $C0000000+70,
      BBA_AmtFrames =   $40000000+74,
      BBA_Screen =      $C0000000+76,
      BBA_Bitmap =      $C0000000+80,
      BBA_Buffers =     $40000000+84,
      BBA_MaskCoords =  $C0000000+86,
      BBA_PropWidth =   $40000000+90,
      BBA_PropHeight =  $40000000+92,
      BBA_DirectMasks = $C0000000+94

/***********************************************************************************
** Multple Bob object.
*/

#define MBOBVERSION 1
#define TAGS_MBOB   ((ID_SPCTAGS<<16)|ID_MBOB)

OBJECT mbob
   head[1]      :ARRAY OF head  -> Standard header.
   gfxdata      :LONG           -> Pointer to base of BOB graphics.
   maskdata     :LONG           -> Pointer to base of BOB masks.
   amtentries   :INT            -> Amount of entries.
   framelist    :LONG           -> Pointer to frame list.
   srcwidth     :INT            -> Modulo (skip in source) in bytes.
   width        :INT            -> Width in pixels.
   bytewidth    :INT            -> Width in bytes.
   height       :INT            -> Height in pixels.
   entrylist    :LONG           -> Pointer to entry list.
   clipLX       :INT            -> Left X border in bytes (0/8)
   clipTY       :INT            -> Top Y border (0)
   clipRX       :INT            -> Right X border in bytes (320/8)
   clipBY       :INT            -> Bottom Y border (256)
   fplane       :INT            -> 1st Plane to blit to (planar only)
   planes       :INT            -> Amount of planes
   planesize    :LONG           -> Size Of Plane Source (planar only)
   attrib       :LONG           -> Attributes like CLIP and MASK.
   picturetags  :LONG           -> Pointer to a picture struct (bob origin).
   entrysize    :INT            -> Size of each entry in the list.
   srcmaskwidth :INT            -> 
   picture      :PTR TO picture ->
   directlist   :LONG           -> 
   amtframes    :INT            -> 
   screen       :PTR TO screen  ->
   bitmap       :LONG           -> Pointer to Bob's Bitmap.
   buffers      :INT            -> Amount of buffers in dest screen.
   maskcoords   :LONG           -> Pointer to frame list for masks.
   propwidth    :INT            -> Expected width of source picture.
   propheight   :INT            -> Expected height of source picture.
   directmasks  :LONG           -> 
ENDOBJECT

OBJECT framelist
   gfx_xcoord :INT
   gfx_ycoord :INT
   msk_xcoord :INT
   msk_ycoord :INT
ENDOBJECT

CONST CLIP =      $00000001,
      MASK =      $00000002,
      STILL =     $00000004,
      CLEAR =     $00000008,
      RESTORE =   $00000010,
      FILLMASK =  $00000040,
      GENMASK =   $00000082,
      GENMASKS =  $00000082,
      CLRMASK =   $00000100,
      CLRNOMASK = $00000000

CONST SKIPIMAGE = 32000,
      SKIPPIXEL = -32000

