Lab5
|
Functions | |
void * | test_init (unsigned short mode, unsigned short delay) |
Tests initialization of video card in graphics mode. | |
int | test_square (unsigned short x, unsigned short y, unsigned short size, unsigned long color) |
Tests drawing a square with a given color. | |
int | test_line (unsigned short xi, unsigned short yi, unsigned short xf, unsigned short yf, unsigned long color) |
Tests drawing a line segment with specifed end points and color. | |
int | test_xpm (unsigned short xi, unsigned short yi, char *xpm[]) |
Tests drawing XPM on the screen at specified coordinates. | |
int | test_move (unsigned short xi, unsigned short yi, char *xpm[], unsigned short hor, short delta, unsigned short time) |
Tests moving sprite on the screen along horizontal/vertical axes. | |
int | test_controller () |
Tests retrieving VBE controller information (VBE function 0x0) |
Functions for outputing data to screen in graphics mode
void* test_init | ( | unsigned short | mode, |
unsigned short | delay | ||
) |
Tests initialization of video card in graphics mode.
Uses the VBE INT 0x10 interface to set the desired graphics mode, and resets Minix's default text mode after a short delay. Before exiting, displays on the console the physical address of VRAM in the input graphics mode.
mode | 16-bit VBE mode to set |
delay | delay in seconds after which returns to text mode |
int test_square | ( | unsigned short | x, |
unsigned short | y, | ||
unsigned short | size, | ||
unsigned long | color | ||
) |
Tests drawing a square with a given color.
Tests drawing a square with the specified size and color, at the specified coordinates (which specify the upper left corner (ULC)) in video mode 0x105
x | horizontal coordinate of ULC, starts at 0 (leftmost pixel) |
y | vertical coordinate of ULC, starts at 0 (top pixel) |
size | of each side in pixels |
color | color to set the pixel |
int test_line | ( | unsigned short | xi, |
unsigned short | yi, | ||
unsigned short | xf, | ||
unsigned short | yf, | ||
unsigned long | color | ||
) |
Tests drawing a line segment with specifed end points and color.
Tests drawing a line segment with the specified end points and the input color, by writing to VRAM in video mode 0x105
xi | horizontal coordinate of "first" endpoint, starts at 0 (leftmost pixel) |
yi | vertical coordinate of "first" endpoint, starts at 0 (top pixel) |
xf | horizontal coordinate of "last" endpoint, starts at 0 (leftmost pixel) |
yf | vertical coordinate of "last" endpoint, starts at 0 (top pixel) |
color | color of the line segment to draw |
int test_xpm | ( | unsigned short | xi, |
unsigned short | yi, | ||
char * | xpm[] | ||
) |
Tests drawing XPM on the screen at specified coordinates.
Tests drawing a sprite from an XPM on the screen at specified coordinates by writing to VRAM in video mode 0x105
xi | horizontal coordinate of upper-left corner, starts at 0 (leftmost pixel) |
yi | vertical coordinate of upper-left corner, starts at 0 (top pixel) |
xpm | array with XPM (assuming indexed color mode) |
int test_move | ( | unsigned short | xi, |
unsigned short | yi, | ||
char * | xpm[], | ||
unsigned short | hor, | ||
short | delta, | ||
unsigned short | time | ||
) |
Tests moving sprite on the screen along horizontal/vertical axes.
Tests moving a XPM on the screen along horizontal/vertical axes, at the specified speed, in video mode 0x105
xi | horizontal coordinate of upper-left corner, starts at 0 (leftmost pixel) |
yi | vertical coordinate of upper-left corner, starts at 0 (top pixel) |
xpm | array with XPM (assuming indexed color mode) |
hor | whether the movement is in the horizontal direction (!= 0) or in the vertical direction (== 0) |
delta | movement in along specified direction in pixels |
time | duration in seconds of the movement |
int test_controller | ( | ) |
Tests retrieving VBE controller information (VBE function 0x0)
Tests retrieving VBE controller information (VBE function 0x0) and its parsing. Upon its invocation it should provide at least the following information: