⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 finger.c

📁 BC3.1编译,小交换机计费系统.使用Dos做出如此好的界面,少有.
💻 C
字号:
#include <def.inc>
#include <func.inc>
/* the follow data is the dot matrix of a vertical un-filled finger */
static UC finger_dot[48] = {	0x18, 0x00,	/*  0 */
								0x24, 0x00,
								0x24, 0x00,
								0x24, 0x00,
								0x24, 0x00,
								0x24, 0x00, /*  5 */
								0x24, 0x00,
								0x25, 0x80,
								0x26, 0xB0,
								0x24, 0xD0,
								0x24, 0x96, /* 10 */
								0x44, 0x9A,
								0x44, 0x92,
								0x44, 0x92,
								0x40, 0x02,
								0x40, 0x02, /* 15 */
								0x40, 0x02,
								0x40, 0x02,
								0x20, 0x04,
								0x20, 0x04,
								0x20, 0x04, /* 20 */
								0x1F, 0xF8,
								0x1F, 0xF8,
								0x1F, 0xF8
							};
/* the follow data is the dot matrix of a vertical filled finger */
/*
static UC finger_dot[48] = {	0x18, 0x00,    */	/*  0 */
							       /*	0x3C, 0x00,
								0x3C, 0x00,
								0x3C, 0x00,
								0x3C, 0x00,
								0x3C, 0x00,*/ /*  5 */
							      /*	0x3C, 0x00,
								0x3D, 0x80,
								0x3F, 0xB0,
								0x3F, 0xF0,
								0x3F, 0xF6,*/ /* 10 */
							      /*	0x7F, 0xFF,
								0x7F, 0xFF,
								0x7F, 0xFF,
								0x7F, 0xFF,
								0x7F, 0xFF, *//* 15 */
							       /*	0x7F, 0xFF,
								0x7F, 0xFF,
								0x3F, 0xFC,
								0x3F, 0xFC,
								0x3F, 0xFC,
								0x1F, 0xF8, *//* 20 */
							      /*	0x1F, 0xF8,
								0x1F, 0xF8
							};
*/
/* the follow data is the dot matrix of a horizoned un-filled finger */
static UC h_finger_dot[48] = {	0x00, 0x00,	0x00,	/* 00 */
								0x03, 0xF8, 0x00,
								0x1C, 0x07, 0xFE,
								0xE0, 0x00, 0x01,
								0xE0, 0x00, 0x01,
								0xE0, 0x3F, 0xFE,	/*  5 */
								0xE0, 0x01, 0x00,
								0xE0, 0x00, 0x80,
								0xE0, 0x3F, 0x80,
								0xE0, 0x02, 0x00,
								0xE0, 0x01, 0x00,	/* 10 */
								0xE0, 0x3F, 0x00,
								0xE0, 0x08, 0x00,
								0x1C, 0x04, 0x00,
								0x03, 0xFC, 0x00,
								0x00, 0x00, 0x00	/* 15 */
							};

/* ============================== finger ================================ */
void finger(UI pos_x, UI pos_y, UC color)
{
 UC i,k;
 UC dot_byte;
 static UC bit_map[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};

 set_dot_mode(color);
 for (i=0;i<48;i++)
 {
	dot_byte = finger_dot[i];
	for (k=0;k<8;k++)
	{
		if ((dot_byte & bit_map[k]) != 0)
			pixel(pos_x,pos_y);
		pos_x++;
	}
	if ( i&0x01 )
	{	pos_y++;
		pos_x -= 16;
	}
 }
 reset_dot_mode();
}

/* ============================== h_finger ================================ */
void h_finger(UI pos_x, UI pos_y, UC color)
{
UC i,k;
UC dot_byte;
UC count=3;
static UC bit_map[8]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};

 set_dot_mode(color);
 pos_y++;
 for (i=3; i<45; i++)
 {
	dot_byte = h_finger_dot[i];
	for (k=0;k<8;k++)
	{
		if ((dot_byte & bit_map[k]) != 0)
			pixel(pos_x,pos_y);
		pos_x++;
	}
	if ( --count==0 )
	{	pos_y++;
		pos_x -= 24;
		count = 3;
	}
 }
 reset_dot_mode();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -