home *** CD-ROM | disk | FTP | other *** search
- /*
- * Additional functions for SCRN0.ARC
- *
- * Tim Spencer - Compuserve [73657,1400]
- */
-
-
-
- #include "video.h"
-
-
- /*************************************************************************
- scrn_page - Function to set the page used in subsequent scrn_xxx function
- calls. Does *not* change the actual display page, only the
- area of display memory to be accessed by scrn_xxx functions.
- Use vid_page to change the actual display page.
-
- Note: Not for use with Monochrome Adapters. Calls to this
- function will be ignored if an MA is detected. Also,
- only pages 0 through 3 are valid with a Color Graphics
- Adapter.
-
- Ex: scrn_page(1, &xxx); set to access page 1
- *************************************************************************/
- void scrn_page(pg, scrn)
- int pg; /* page selected */
- SCRN *scrn; /* pointer to screen data */
- {
- pg &= 7; /* force to page 7 or below */
-
- if (vcard_type() == MONO_ADAPTER)
- ; /* ignore if mono */
- else
- scrn->segment = COLOR_SEG + (pg * 256);
- }
-
-
-
-
-
- /***********************************************************************
- scrn_cls() - Clears the page selected with scrn_page with the attribute
- currently defined in the SCRN structure. Does *not* affect
- the current actual display page, unless that page has been
- selected with vid_page.
-
- Note: Not generally applicable to monochrome adapters, but this
- function can be used to clear the mono screen to a given
- attribute. In such cases, it would assume page zero.
-
- Ex: vid_page(0); actual display page is zero
- scrn_page(1); logical display page is one
- scrn_cls(&xxx); clear page 1 in the background
- vid_page(1); now switch the display to page 1
- ***********************************************************************/
- void scrn_cls(scrn)
- SCRN *scrn;
- {
- register i;
-
- scrn_pos(0, 0, scrn);
- for (i = 0; i <= 4000; i++)
- scrn_putca(' ', scrn);
- }
-