![]()
|
The PDF Version
unsigned char Video::VideoMode(short Xres,short Yres, short Bits)
{ unsigned short index=0;
index = GetModeIndex(Xres,Yres,Bits);
if(index != 666)
{ VESAMode(index);
}
else
{ if(Xres ==320 && Yres == 200 && Bits==8)
{StandardVideoMode(0x13);
}
else if(Xres==80 && Yres==25)
{StandardVideoMode(3);
}
else
{ModeX(Xres,Yres);
}
}
ReAllocate();
return 1;
} |
void ReAllocate()
{free(video_buffer);
video_buffer = (unsigned char*)malloc(Screen_Size);
if(video_buffer == NULL)
{ERROR(2);
}
memset(video_buffer,0,Screen_Size);
} |