/*
 *  ShapeShifter Macintosh Emulator - Definitions for external video drivers
 *
 *  $VER: shapeextvideo.h 2.0 (19.5.97)
 *
 *  (C) Copyright 1995 Christian Bauer
 *
 */

#ifndef SHAPEEXTVIDEO_H
#define SHAPEEXTVIDEO_H

#ifndef EXEC_TYPES_I
#include <exec/types.h>
#endif

#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif

#define MAKETRI(a,b,c) (a<<16|b<<8|c)

/*
 *  These tags may appear in the shev_Tags array
 */


#define SHEV_Level             (TAG_USER+MAKETRI('L','E','V')) // Interface level of the driver
#define SHEV_Version           (TAG_USER+MAKETRI('V','E','R')) // Internal driver version
#define SHEV_Revision          (TAG_USER+MAKETRI('R','E','V')) // Internal driver revision
#define SHEV_Name              (TAG_USER+MAKETRI('N','A','M')) // Pointer to driver name
#define SHEV_ID                (TAG_USER+MAKETRI('$','V','E')) // Pointer to ID string
#define SHEV_Author            (TAG_USER+MAKETRI('A','U','T')) // Pointer to author's name

#define SHEV_OpenScreen        (TAG_USER+MAKETRI('O','P','N')) // Routine for opening a screen
#define SHEV_CloseScreen       (TAG_USER+MAKETRI('C','L','S')) // Routine for closing a screen
#define SHEV_Refresh           (TAG_USER+MAKETRI('R','E','F')) // Routine for refreshing the display
#define SHEV_LockDisplay       (TAG_USER+MAKETRI('L','O','K')) // Routine for locking the display memory
#define SHEV_UnlockDisplay     (TAG_USER+MAKETRI('U','L','K')) // Routine for unlocking the display memory
#define SHEV_LoadRGB32         (TAG_USER+MAKETRI('L','3','2')) // Routine for setting the palette
#define SHEV_PointerInvisible  (TAG_USER+MAKETRI('P','T','I')) // Routine for blanking the Amiga mouse pointer
#define SHEV_PointerVisible    (TAG_USER+MAKETRI('P','T','V')) // Routine for making the Amiga mouse pointer visible

/*
**  These tags are used for communication between ShapeShifter and the driver
**  (including SHEV_Level)
*/

#define SHEV_Context           (TAG_USER+MAKETRI('C','O','N'))  // Context for storing local variables
#define SHEV_ScreenX           (TAG_USER+MAKETRI('S','C','X'))  // Width of screen
#define SHEV_ScreenY           (TAG_USER+MAKETRI('S','C','Y'))  // Height of screen
#define SHEV_DisplayID         (TAG_USER+MAKETRI('D','I','D'))  // DisplayID
#define SHEV_OverscanType      (TAG_USER+MAKETRI('O','V','S'))  // Overscan type
#define SHEV_VideoMode         (TAG_USER+MAKETRI('V','M','D'))  // Video mode (see below)
#define SHEV_Screen            (TAG_USER+MAKETRI('S','C','R'))  // Pointer to Intuition screen
#define SHEV_ScreenBase        (TAG_USER+MAKETRI('B','A','S'))  // Pointer to base of display memory
#define SHEV_BytesPerRow       (TAG_USER+MAKETRI('M','O','D'))  // Bytes per row of Mac screen
#define SHEV_RefreshType       (TAG_USER+MAKETRI('R','T','Y'))  // Refresh type (see below)
#define SHEV_ColorTable        (TAG_USER+MAKETRI('R','G','B'))  // Pointer to color table
#define SHEV_Flags             (TAG_USER+MAKETRI('F','L','G'))  // Special flags (see below)

/*
 *  Video modes
 */

#define VMODE_1BIT   0                                          // 1 bit per pixel, indexed
#define VMODE_2BIT   1                                          // 2 bits per pixel, indexed
#define VMODE_4BIT   2                                          // 4 bits per pixel, indexed
#define VMODE_8BIT   3                                          // 8 bits per pixel, indexed
#define VMODE_15BIT  4                                          // 16 bits per pixel (15 used), direct
#define VMODE_24BIT  5                                          // 32 bits per pixel (24 used), direct

/*
 *  Refresh types
 */

#define RTYPE_NONE     0                                        // No refresh required, SHEV_ScreenBase is displayed
#define RTYPE_CUSTOM   1                                        // Refresh required, SHEV_Refresh is provided,
																// SHEV_ScreenBase is the Mac screen buffer
																// Refresh required, SHEV_(Un)LockDisplay are provided
																// SHEV_ScreenBase is the Amiga screen buffer
#define RTYPE_RGB15PC  2                                        // GGGBBBBBxRRRRRGG
#define RTYPE_BGR15PC  3                                        // GGGRRRRRxBBBBBGG
#define RTYPE_RGB16PC  4                                        // GGxBBBBBRRRRRGGG
#define RTYPE_RGB24    5                                        // RGB
#define RTYPE_BGR24    6                                        // BGR
#define RTYPE_RGBA32   7                                        // RGBx
#define RTYPE_BGRA32   8                                        // BGRx

/*
 *  Special flags
 */

#define HEVF_DBLWIDTHWIN   1
#define HEVB_DBLWIDTHWIN   0

#endif

