unsigned short m ode Attributes;
char winAAttri butes;
char winBAttri butes;
unsigned short winGranularity;
unsigned short winSize;
unsigned short winASegment;
unsigned short winBSegement;
void * winFuncPtr;
unsigned short bytesPerScanLine;
unsigned short xResolution;
unsigned short yResolution;
char xCharSize;
char yCharSize;
char numberOfPlanes;
char bitsPerPixel;
char numberOfBanks;
char memoryModel;
char bankSize;
char numberOfPages;
char reserved;
// direct color fields
char redMaskSize;
char redFieldPosition;
char greenMaskSize;
char greenFieldPosition;
char blueMaskSize;
char blueFieldPosition;
char rsvdMaskSize;
char rsvdFieldPosition;
char directColorModelnfo;
void * physBasePtr;
void * offScreenMemoOffset;
unsigned short offScreenMemSize;
char resererved2 [206];
extern VESAInfo * vbelnfoPtr;
extern VESAModelnfo * vbeModelnfoPtr;
extern void * IfbPtr;
extern int bytesPerLine;
extern int bitsPerPixel;
int initVBE2 ();
void doneVBE2 ();
int findVESAMode ( int );

Компьютерная графика. Полигональные модели

int setVESAMode ( int );
int getVESAMode (); #endif
// File vesa.cpp
#include <i86.h>
#include <malloc.h>
#include <string.h>
#include "vesa.h"
// DPMI strctures struct DPMIDosPtr
{
unsigned short segment; unsigned short selector;
};
struct
{
unsigned long edi; unsigned long esi; unsigned long ebp; unsigned long esp; unsigned long ebx; unsigned long edx; unsigned long ecx; unsigned long eax; unsigned short flags; unsigned short es, ds, fs, gs, ip, cs, sp, ss; } rmRegs;
static DPMIDosPtr vbelnfoPool = { 0, 0 }, static DPMIDosPtr vbeModePool = {0, 0 }; static REGS regs; static SREGS sregs;
VESAInfo * vbelnfoPtr, VESAModelnfo * vbeModelnfoPtr; void * IfbPtr = NULL; int bytesPerLine; int bitsPerPixel;

⇐ Предыдущая| |Следующая ⇒