//video.h // 08/18/03 Josh Holtrop void video_init(); void video_horiz(int y, int x1, int x2, dword color); void video_vert(int x, int y1, int y2, dword color); void video_rect(int x1, int y1, int x2, int y2, dword color); void video_rectf(int x1, int y1, int x2, int y2, dword color); inline void video_pset(int x, int y, dword color); void video_psetp(int pixel, dword color); #define checkBoundsx(x) (x<0 ? x=0 : (x>=video_mode.XResolution ? x=video_mode.XResolution-1 : 0)) #define checkBoundsy(x) (x<0 ? x=0 : (x>=video_mode.YResolution ? x=video_mode.YResolution-1 : 0)) typedef struct{ USHORT ModeAttributes; UCHAR WinAAttributes; UCHAR WinBAttributes; USHORT WinGranularity; USHORT WinSize; USHORT WinASegment; USHORT WinBSegment; UINT WinFuncPtr; USHORT BytesPerScanLine; USHORT XResolution; USHORT YResolution; UCHAR XCharSize; UCHAR YCharSize; UCHAR NumberOfPlanes; UCHAR BitsPerPixel; UCHAR NumberOfBanks; UCHAR MemoryModel; UCHAR BankSize; UCHAR NumberOfImagePages; UCHAR Reserved1; UCHAR RedMaskSize; UCHAR RedFieldPosition; UCHAR GreenMaskSize; UCHAR GreenFieldPosition; UCHAR BlueMaskSize; UCHAR BlueFieldPosition; UCHAR RsvdMaskSize; UCHAR RsvdFieldPosition; UCHAR DirectColorModeInfo; dword PhysBasePtr; UINT OffScreenMemOffset; USHORT OffScreenMemSize; UCHAR Reserved[206]; } ModeInfoBlock;