/* *****   ***   ***   *   *  ****  **** *****
   *      *   *  *  *  **  *  *     *      *     
   *****  *      ***   * * *  ****  ***    *   
       *  *   *  * *   *  **     *  *      *   
   *****   ***   *  *  *   *  ****  ****   *   

		SCREEN ROUTINES	*/
#include "equs.c"
#include "data.c"

GTbrightness ()
{	readIt = OVSBR;
	if (ovlLoad ("CUST5.OVL",OVLGN))
		(*ovlcall)();
}




GTvideo ()
{	readIt = OVSVD;
	if (ovlLoad ("CUST5.OVL",OVLGN))
		(*ovlcall)();
}




GTemulatiom ()
{	readIt = OVSEM;
	if (ovlLoad ("CUST5.OVL",OVLGN))
		(*ovlcall)();
}




GTcurse ()
{	readIt = OVSCR;
	if (ovlLoad ("CUST5.OVL",OVLGN))
		(*ovlcall)();
}




GTsize ()
{	readIt = OVSSZ;
	if (ovlLoad ("CUST5.OVL",OVLGN))
		(*ovlcall)();
}







/***  SETTING ROUTINES  ****/
/***  SETTING ROUTINES  ****/




STbright ()
{	int i;
	/* set low and then inc */

	for (i = 1; i <= 16; i++)
		putz (intdownseq);
	for (i = 1; i <= (st.SCbright); i++)
		putz (intupseq);

} /* end of STintensity */


STvideo()
{
	if (invEnq())
		{ /* screen currently inverse */
		if (!st.SCinverse) 
			putz (FXinvtogseq);
		}
	else  /* screen currently normal */
		if (st.SCinverse)
			putz (FXinvtogseq);

} /* end of STvideo */





STcurse()
{
	switch (st.SCcurse)
		{
		case (1) : putz (crflashseq);
		           break;
		case (2) : putz (crnonflseq);
		           break;
		case (3) : putz (crinvseq);
		           break;
		}
} /* end of STcurse */




/*  programs character size */
STsize()
{
	putz (clearseq); 
	if (st.isSmall) putz (smallseq);
	else 
		{ putz (largeseq);
		  if (st.SCexLines) 
			{ putz (big26seq);
			}
		  else 
			{ putz (big24seq);
			}
		} /* large  screen */
}  /* end of STscreen */

/** OTHER ROUTINES **/

/* find out if dealer wants to set the option */
char	dealQuest ()
{	char	result;

	PA.PAptr [0] = ms4ptr;
	doPrompt (1,PA);
	while (1)
		{ result = inpPrompt (PROMPTLINE,strlen (ms4ptr));
		  if ((result == 'Y') | (result == 'y'))
			return (TRUE);
		  if ((result == 'N') | (result == 'n'))
			return (FALSE);
		  ptch (BELL);
		}	
}


/* inquiry - returns 0 if inverse video off */
char invEnq()
{   char set;
    int i;
	if (isFox)
		{
		
		putz (funkseq); /* disarm string return */
		/* flush key buffer */	
		while (gtstch())
			;
		putz (fvenqseq);
		set = gtchna();
		if (set & NORMVID) return (FALSE);
		   else return (TRUE);
		}  /* fox */
	else 
		{ /* 5000 */
		set = V5stat();
		set = (set & V5INVON);
		return (set);
		} /* for 5000 */
}


