73 lines
1.8 KiB
C
73 lines
1.8 KiB
C
//video.h
|
|
// 08/18/03 Josh Holtrop
|
|
// Modified: 12/28/03
|
|
|
|
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_psetp16(int pixel, dword color);
|
|
void video_psetp24(int pixel, dword color);
|
|
void video_psetp32(int pixel, dword color);
|
|
void video_psetpnull(int pixel, dword color);
|
|
void video_renderChar(int x, int y, int character, dword color);
|
|
void video_drawConsole();
|
|
void video_drawConsoleChar(dword position);
|
|
|
|
|
|
typedef struct{
|
|
word ModeAttributes;
|
|
byte WinAAttributes;
|
|
byte WinBAttributes;
|
|
word WinGranularity;
|
|
word WinSize;
|
|
word WinASegment;
|
|
word WinBSegment;
|
|
dword WinFuncPtr;
|
|
word BytesPerScanLine;
|
|
|
|
word XResolution;
|
|
word YResolution;
|
|
byte XCharSize;
|
|
byte YCharSize;
|
|
byte NumberOfPlanes;
|
|
byte BitsPerPixel;
|
|
byte NumberOfBanks;
|
|
byte MemoryModel;
|
|
byte BankSize;
|
|
byte NumberOfImagePages;
|
|
byte Reserved1;
|
|
|
|
byte RedMaskSize;
|
|
byte RedFieldPosition;
|
|
byte GreenMaskSize;
|
|
byte GreenFieldPosition;
|
|
byte BlueMaskSize;
|
|
byte BlueFieldPosition;
|
|
byte RsvdMaskSize;
|
|
byte RsvdFieldPosition;
|
|
byte DirectColorModeInfo;
|
|
|
|
dword PhysBasePtr;
|
|
dword OffScreenMemOffset;
|
|
word OffScreenMemSize;
|
|
byte Reserved[206];
|
|
} ModeInfoBlock;
|
|
|
|
|
|
ModeInfoBlock video_mode;
|
|
dword videoMode = 0; //what video mode # we are in, 0 for console mode
|
|
word *vid_ptr16 = (word *)0xF0000000;
|
|
byte *vid_ptr24 = (byte *)0xF0000000;
|
|
dword *vid_ptr32 = (dword *)0xF0000000;
|
|
word console_memory[2000]; //holds a copy of the console's memory
|
|
void (*video_psetp)(int, dword); //function pointer to set a pixel
|
|
|
|
|
|
|
|
|
|
|
|
|