src/bbcvdu.c
// Display character as graphics (VDU 5):
Display character as graphics (VDU 5).
Display character as graphics ( VDU 5 ) .
static void sendg (short ch)
{
	int dx = charx ;    
	if (vflags & UFONT)
	{
		int sp ;
		Uint16 tmp[3] = {ch, 0x20, 0} ;
		TTF_SizeUNICODE (hfont, tmp, &dx, NULL) ;
		TTF_SizeUNICODE (hfont, tmp + 1, &sp, NULL) ;
		dx = dx - sp + tweak ;
	}
	if (ch == 0x20)
	    {
		vmove (0x40, dx, chary) ;
		return ;
	    }
	if ((lastx >= 0) && (lastx < XSCREEN) && (lasty >= 0) && (lasty < YSCREEN))
	{
		short *pc ; 
		short *sl ; 
		int nc ;    
		int oc ;    
		p2c (textx, texty, &pc, &sl, &nc, &oc) ;
		*pc = ch ;
	}
	if (forgnd & 0xFF)
	{
		if (cmcflg & BIT1)		
			charout_logic(ch, forgnd, lastx+charx-dx, lasty, dx) ;
		else
			charout_logic(ch, forgnd, lastx, lasty, dx) ;
	}
	else
	{
		BBC_RenderSetClipRect (memhdc, hrect) ;
		if (cmcflg & BIT1)		
			charout(ch, forgnd >> 8, 0xFF, lastx+charx-dx, lasty, dx) ;
		else
			charout(ch, forgnd >> 8, 0xFF, lastx, lasty, dx) ;
	}
	SDL_RenderSetClipRect (memhdc, NULL) ;
	bChanged = 1 ;
	vmove (0x40, dx, chary) ;
}
static void sendg ( short ch ) { int dx = charx ; if ( vflags & UFONT ) { int sp ; Uint16 tmp [ 3 ] = { ch , 0x20 , 0 } ; TTF_SizeUNICODE ( hfont , tmp , & dx , NULL ) ; TTF_SizeUNICODE ( hfont , tmp + 1 , & sp , NULL ) ; dx = dx - sp + tweak ; } if ( ch == 0x20 ) { vmove ( 0x40 , dx , chary ) ; return ; } if ( ( lastx >= 0 ) && ( lastx < XSCREEN ) && ( lasty >= 0 ) && ( lasty < YSCREEN ) ) { short * pc ; short * sl ; int nc ; int oc ; p2c ( textx , texty , & pc , & sl , & nc , & oc ) ; * pc = ch ; } if ( forgnd & 0xFF ) { if ( cmcflg & BIT1 ) charout_logic ( ch , forgnd , lastx + charx - dx , lasty , dx ) ; else charout_logic ( ch , forgnd , lastx , lasty , dx ) ; } else { BBC_RenderSetClipRect ( memhdc , hrect ) ; if ( cmcflg & BIT1 ) charout ( ch , forgnd >> 8 , 0xFF , lastx + charx - dx , lasty , dx ) ; else charout ( ch , forgnd >> 8 , 0xFF , lastx , lasty , dx ) ; } SDL_RenderSetClipRect ( memhdc , NULL ) ; bChanged = 1 ; vmove ( 0x40 , dx , chary ) ; }
Display character as graphics (VDU 5):
Display character as graphics ( VDU 5 ) :
// character width (default if not ufont) // pointer to character in character map // pointer to start of line in character map // total number of (wide) characters per line // (wide) character offset from start of line // direction // direction