Temporarily Using a Graphics Mode in a Vermont Views Program

You can use vid_setmode() to access the graphics modes available on color adapters, but graphics modes are not supported by any of the display functions of Vermont Views.

If you want to use graphics and Vermont Views in the same program, you can first save the text-mode screen using FULL_WNP and then set a graphics mode. You must not attempt to use the Vermont Views output functions while in the graphics mode. When you are done with graphics, call vid_setmode() to set the text mode, and then restore the saved text screen.

The following code demonstrates these steps:

int tmode;
 
tmode = vid_getmode();
/* Save current mode
*/
wi_sav(FULL_WNP);
/* Save the current screen
*/
vid_setmode(6);

. . .
/* Set to graphics mode
*/
. . .

. . .
/* your graphics functions
*/
vid_setmode(tmode);
/* Restore original text mode
*/
wi_unsav(FULL_WNP);
/* Restore text screen, free image
*/


Home Contents Previous Next