关于光标上移和下称函数upbar(int y),downbar()
请教各路高手函数upbar,downbar的用法,希望有详细描述。upbar(int y)
{
int i;
typedef struct texel_struct {
unsigned char ch;
unsigned char attr;
} texel;
texel t;
for(i=9;i<=17; i++)
{
gettext(i,y,i,y,&t);
t.attr=0x1f;
puttext(i,y,i,y,&t);
gettext(i,y+1,i,y+1,&t);
t.attr=0x4f;puttext(i,y+1,i,y+1,&t);
}
gotoxy(3,y+1);
return;
}
downbar(int y)
{
int i;
typedef struct texel_struct {
unsigned char ch;
unsigned char attr;
} texel;
texel t;
for(i=9;i<=17;i++)
{
gettext(i,y,i,y,&t);
t.attr=0x1f;
puttext(i,y,i,y,&t);
gettext(i,y-1,i,y-1,&t);
t.attr=0x4f ;
puttext(i,y-1,i,y-1,&t);
}
gotoxy(3,y-1);
return;
}
[ 本帖最后由 老掌柜 于 2009-11-11 15:08 编辑 ]