//Class Video is an abstract baseclass with derived characteristics for both
//videomodes SVGA(VESA videodriver) and VGA(unchained mode).
//Author: Tommy Grandefors
//Date: October 1996

#ifndef VIDEO_HH
#define VIDEO_HH

#include "typedef.hh"
#include "bitmap.hh"

class Video
{
   public:
      virtual ~Video(void);
      virtual UBYTE SetResolution(BYTE theMode, UWORD viewport) = 0;
      virtual UBYTE GetNrOfPages(void) = 0;
      virtual void SetDrawPage(unsigned int thePage) = 0;
      virtual void SetVisiblePage(unsigned int thePage) = 0;
      virtual void ClearScreen(UBYTE theColor) = 0;
      virtual void ClearVideoMemory(UBYTE theColor) = 0;
      virtual void ScrollX(WORD direction) = 0;
      virtual void ScrollY(WORD direction) = 0;
      virtual void SetScrollingSpeed(UWORD ySpeed) = 0;
      virtual void ClearScrollingY(void) = 0;
      virtual void ClearScrollingX(void) = 0;
      virtual void PutPixel(WORD x, WORD y, UBYTE color) = 0;
      virtual UBYTE GetPixel(WORD x, WORD y) = 0;
      virtual void V_Line(WORD x, WORD top_y, WORD len, UBYTE color) = 0;
      virtual void H_Line(WORD left_x, WORD y, WORD len, UBYTE color) = 0;
      virtual void Box(WORD x1, WORD y1, WORD x2, WORD y2, UBYTE color) = 0;
      virtual void FilledBox(WORD x1, WORD y1, WORD x2, WORD y2, UBYTE color) = 0;
      virtual void Circle(WORD x, WORD y, WORD r, UBYTE color) = 0;
      virtual void FilledCircle(WORD x, WORD y, WORD r, UBYTE color) = 0;
      virtual void Line(WORD x1, WORD y1, WORD x2, WORD y2, UBYTE color) = 0;
      virtual void DrawAnySizeBitmap(WORD x, WORD y, Bitmap *myBitmap)=0;
      virtual void DrawAlignedBitmap(WORD x, WORD y, Bitmap *myBitmap)=0;
      virtual void GetAnySizeRAMBitmap(WORD x, WORD y, WORD theWidth, WORD theHeight, Bitmap *mySrc, Bitmap *myDst) = 0;
      virtual void GetAlignedRAMBitmap(WORD x, WORD y, WORD theWidth, WORD theHeight, Bitmap *mySrc, Bitmap *myDst)=0;
      virtual WORD ScaleBitmap(Bitmap* srcBmp, Bitmap* dstBmp, int newXSize, int newYSize) = 0;
      virtual WORD ScaleBitmapX(Bitmap* srcBmp, Bitmap* dstBmp, int newXSize) = 0;
      virtual WORD ScaleBitmapY(Bitmap* srcBmp, Bitmap* dstBmp, int newYSize) = 0;
      virtual void ConvLin2PlanBitmap(Bitmap *myBitmap) = 0;
      virtual void DrawCompiledBitmap(WORD x,WORD y,Bitmap *myBitmap) = 0;
      virtual UBYTE CompileBitmap(Bitmap *myBitmap) = 0;
      virtual void DrawWideBitmap(WORD y, Bitmap *myBitmap) = 0;
      virtual void GetWideScreenBitmap(WORD y, WORD height, Bitmap *myBitmap) = 0;
      virtual UWORD GetScreenWidth(void);
      virtual UWORD GetScreenHeight(void);
      virtual void GetAlignedScreenBitmap(WORD x, WORD y, WORD width, WORD height, Bitmap *myBitmap) = 0;
      virtual void GetAnySizeScreenBitmap(WORD x, WORD y, Bitmap *myBitmap) = 0;
   protected:
      Video(void);
      UWORD width, height, widthBytes, num_pages;
      UWORD pageSize, activeStart, visibleStart;
      UBYTE write_plane, read_plane;
      UBYTE *screenBase; //Pointer to videomem (0xA0000)
      UWORD viewPortSize;
};

#endif
