home *** CD-ROM | disk | FTP | other *** search
- /*
- pcmgraph.c
-
- % pc_ModeGraphics, pc_SetModeGraphics
-
- 5/16/88 by Ted.
-
- OWL 1.1
- Copyright (c) 1988, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 3/23/89 ted Got rid of pc_SetModeText.
- 3/23/89 ted renamed from pcdefmod.c
- */
-
- #include "pcpriv.h"
-
- /* -------------------------------------------------------------------------- */
- static int gmodepref[] = {
- 0x12, /* vga */
- 0x0F, /* color ega */
- 0x10, /* mono ega */
- 0x11, /* mcga hires 2-color */
- PCMODE_CPQ40, /* compaq plasma hires */
- PCMODE_HERC0, /* herc */
- 0x06 /* cga */
- };
- #define NUMPREFS (sizeof(gmodepref) / sizeof(int))
- /* -------------------------------------------------------------------------- */
-
- boolean pc_ModeGraphics(digp)
- dig_struct *digp;
- {
- int i;
-
- for (i=0; i<NUMPREFS; i++) {
- if (pc_OpenMode(digp, gmodepref[i])) {
- return(TRUE);
- }
- }
- return(FALSE);
- }
- /* -------------------------------------------------------------------------- */
-
- int pc_SetModeGraphics()
- {
- int i;
-
- for (i=0; i<NUMPREFS; i++) {
- if (pc_ModeSupport(gmodepref[i])) {
- pc_SetMode(gmodepref[i]);
- return(gmodepref[i]);
- }
- }
- return(0);
- }
- /* -------------------------------------------------------------------------- */
-
-