src/bbcvdu.c
// Convert character coordinates to pixel coordinates
// adjusting for text viewport and checking range:
Convert character coordinates to pixel coordinates
adjusting for text viewport and checking range.
Convert character coordinates to pixel coordinates adjusting for text viewport and checking range .
static int xy2p (int *x, int *y)
{
	int w, h ;
	if ((cmcflg & BIT3) != 0)
	{
		int tmp = *x ;
		*x = *y ;
		*y = tmp ;
	}
	w = (textwr - textwl) / charx ;
	if ((*x > w) || (*x < 0))
		return 0 ;  
	if ((cmcflg & BIT1) != 0)
		*x = ~(*x - w) ;
	h = (textwb - textwt) / chary ;
	if ((*y > h) || (*y < 0))
		return 0 ;  
	if ((cmcflg & BIT2) != 0)
		*y = ~(*y - h) ;
	*x = textwl + charx * (*x) ;
	*y = textwt + chary * (*y) ;
	return 1 ;
}
static int xy2p ( int * x , int * y ) { int w , h ; if ( ( cmcflg & BIT3 ) != 0 ) { int tmp = * x ; * x = * y ; * y = tmp ; } w = ( textwr - textwl ) / charx ; if ( ( * x > w ) || ( * x < 0 ) ) return 0 ; if ( ( cmcflg & BIT1 ) != 0 ) * x = ~ ( * x - w ) ; h = ( textwb - textwt ) / chary ; if ( ( * y > h ) || ( * y < 0 ) ) return 0 ; if ( ( cmcflg & BIT2 ) != 0 ) * y = ~ ( * y - h ) ; * x = textwl + charx * ( * x ) ; * y = textwt + chary * ( * y ) ; return 1 ; }
Convert character coordinates to pixel coordinates
adjusting for text viewport and checking range:
Convert character coordinates to pixel coordinates adjusting for text viewport and checking range :
// Allow pending CRLF/scroll // Allow pending CRLF/scroll