The vesa.c
file contains a lot of functions to manage the VESA Bios Extension 2.0:
initialize the graphics, set the video mode, put pixels and images, return to text mode. Not all of
those functions should be optimized to gain more speed. For example the initialization of the video
mode is executed only once in the game, so is indifferent to have a fast or a slow function. Instead
the graphics routines like put_pixel()
or showframeb()
are very used in a
game. So is necessary to optimize at least these functions:
void vbe_clearscreen(BYTE color);
void vbe_clearbuffer(BYTE color);
void vbe_putpixel(int x, int y, BYTE color);
void vbe_putpixelb(int x, int y, BYTE color);
void vbe_showimage(int x, int y, struct IMAGE *frame);
void vbe_showimageb(int x, int y, struct IMAGE *frame);
void vbe_showframe(int x, int y, struct IMAGE *frame);
void vbe_showframeb(int x, int y, struct IMAGE *frame);
void vbe_showframerev(int x, int y, struct IMAGE *frame);
void vbe_showframebrev(int x, int y, struct IMAGE *frame);
void vbe_showbuffer(void);
// **************** CLIPPING ******************
int clip_x, clip_y, clip_width, clip_height;
void vbe_setclipwindow(int x1, int y1, int x2, int y2);
void vbe_putpixelclip(int x, int y, BYTE color);
void vbe_putpixelbclip(int x, int y, BYTE color);
Remember that these routines doesn't check the values of the parameters, so you can have protection
errors with strange values.