
 /* svo.h
    - Include File for SVO Support Routines -
    (c) 1993 by Andreas R. Kleinert
    Last changes : 19.12.1993
 */

#ifndef SVO_H
#define SVO_H

#ifndef GRAPHICS_VIEW_H
#include <graphics/view.h>
#endif /* GRAPHICS_VIEW_H */


#define BADFLAGS (SPRITES|VP_HIDE|GENLOCK_AUDIO|GENLOCK_VIDEO)
#define FLAGMASK (~BADFLAGS)
#define BADFLAGS_13 (EXTENDED_MODE|SPRITES|VP_HIDE|GENLOCK_AUDIO|GENLOCK_VIDEO)
#define FLAGMASK_13 (~BADFLAGS)


 /* ********** */
 /* SVO Header */
 /* ********** */

 /* File ID Definitions */

#define SVO_ID          "SVO Graphics File V1.0"
#define SVO_ID_LEN      22                        /* len = 21 + 0 Byte */

struct SVOHeader
{
 UBYTE svo_ID [SVO_ID_LEN];

 UBYTE svo_PixelBits;       /* 1 or 8 (16, 24, 32, ...)             */
 UBYTE svo_PixelDepth;      /* number of svo_PixelBits sized Planes */

 UBYTE pad1;

 ULONG svo_LeftEdge;        /* Screen Dimensions                    */
 ULONG svo_TopEdge;
 ULONG svo_Width;
 ULONG svo_Height;
 
 ULONG svo_Depth;           /* resulting Intuition Screen BitPlanes */

 UWORD svo_ViewMode16;      /* OS V1.2+  ScreenMode ID              */
 UWORD svo_ViewMode32;      /* OS V2.04+ ScreenMode ID              */

 ULONG svo_BytesPerLine;

 UBYTE svo_Colors[256][3];  /* if svo_PixelDepth == 1 */
};

#define SVOHEADER_SIZE (sizeof(struct SVOHeader))


/* Note :

   For later support of graphic cards there are two possible ways to store
   graphics :

    - planar, one full plane following the next,
      with svo_Depth planes like in IFF-ILBM (svo_PixelBits == 1) :
 
       Colors = (1<<svo_PixelBits-1)<<svo_PixelDepth
              = 1<<svo_PixelDepth 
              = 1<<svo_Depth 

    - bytewise planar, where each plane consists on
      svo_PixelDepth bytes (svo_PixelBits == 8) :
      
       Colors = (1<<svo_PixelBits-1)<<svo_PixelDepth
              = 1<<svo_Depth

       BUT   != 1<<svo_PixelDepth

*/

#endif /* SVO_H */
