Exemplo n.º 1
0
void f_scroller_normal(signed int x, signed int y, const char *string)
{
	while(*string!=0&&x<lcd_width)
	{
		draw_bitmap(x,y,f_width,8,ascii_table[*string++]);
		set_instruction(1,0);	// clear byte before
		x+=f_width+space_char;
	}
}
Exemplo n.º 2
0
void f_scroller_func(signed int x, signed int y, const char *string, const char *func, unsigned char func_size)
{
	byte=0;
	while(*string!=0&&x<lcd_width)
	{
		if(x>func_size) byte=x-func_size; // use abs() here
		else byte=x;
		draw_bitmap(x,y+func[byte],f_width,8,ascii_table[*string++]);
		set_instruction(1,0);	// clear byte before
		x+=f_width+space_char;
		byte++;
	}
}
Exemplo n.º 3
0
void draw_bitmap(signed int x, signed int y, unsigned int b_width, unsigned int b_height, const char *bmap)
{
	unsigned int h_index=0,w_index=0,width_max=0,x_off=0,y_off=0;
	byte=0;

	if(y+(signed int)b_height<0) return;	// outside display
	if(x+(signed int)b_width<0) return;
	if(y>=lcd_height) return;
	if(x>=lcd_width) return;

	if(x<0)
	{
		w_index=x*-1;		// set bmap x-offset
		x_off=w_index;
		x=0;				// start at display position x=0 with x-offset
	}

	if(b_height%8) b_height+=8;
	b_height/=8;

	if(x+(signed int)b_width>=lcd_width) 	// width overflow check
		width_max=lcd_width-x;
	else width_max=b_width;

	if(y<0)
	{
		y*=-1;
		y_off=y/8;
		b_height-=y_off;
		while(h_index<b_height)
		{
			set_cursor(x,h_index);
			while(w_index<width_max)
			{
				byte=bmap[w_index+((h_index+y_off)*b_width)]>>(y%8);
				if(h_index+1!=b_height)
					byte|=bmap[w_index+((h_index+y_off+1)*b_width)]<<(8-(y%8));
				set_instruction(1,byte);
				w_index++;
				byte=0;
			}
			h_index++;
			w_index=x_off;
			if(h_index>=lcd_height_b) return;
		}
	}
 LIRItem(LIRGenerator* gen) {
   _destroys_register = not_destroyed;
   _gen = gen;
   _result = LIR_OprFact::illegalOpr;
   set_instruction(NULL);
 }
 LIRItem(Value value, LIRGenerator* gen) {
   _destroys_register = not_destroyed;
   _gen = gen;
   set_instruction(value);
 }