当前位置: 代码迷 >> C语言 >> C语言
  详细解决方案

C语言

热度:685   发布时间:2006-01-06 17:07:00.0
C语言

void wzlr()

{

int i;

unsigned char ch='',ch1='';

disable();

settimer(new);

enable();

while(ch!=27)

{

i=line+(curi-3)/2;

if(ch1==0&&ch==72)

{up();ch='';}

else if(ch1==0&&ch==80)

{down();ch='';}

else if(ch1==0&&ch==75)

{left();ch='';}

else if(ch1==0&&ch==77)

{right();ch='';}

else if(ch==0){ch1=ch;}

else if(ch==8){del();ch='';}

else if(s[i][curj-3]>160&&ch1!='')

{if(ch1==s[i][curj-3]&&ch==s[i][curj-2])

{ textcolor(7);zqzs+=1;}

else

{ textcolor(4);cwzs+=1;}

cprintf("%c%c",ch1,ch);

ch1='';ch='';

curj+=2;

if(curj>strlen(s[i]))

{curj=3;down();}}

else if(s[i][curj-3]<160)

{if(ch==s[i][curj-3])

{ textcolor(7);zqzs+=1;}

else

{ textcolor(4);cwzs+=1;}

cprintf("%c",ch);

curj+=1;

ch1='';ch='';

if(curj>strlen(s[i]))

{curj=3;down();}}

else

ch1=ch;

if(!kbhit())

{if(count!=count1)

{show_bot();

window(2,4,80,21);

gotoxy(curj,curi);

count1=count;}}

else

ch=getch();}}

void up()

{if(curi>3){curi-=2;gotoxy(curj,curi);}

else if(line>0){line-=1;show();}

else ;}

void down()

{ if(curi<16){curi+=2;gotoxy(curj,curi);}

else if((line+(curi-3)/2)<sum_line){line+=1;show();}

else ;}

void left()

{ int i,j;

i=line+(curi-3)/2;

if(curj>3)

if(s[i][curj-4]>160){curj-=2;gotoxy(curj,curi);}

else

{curj-=1;gotoxy(curj,curi);}

else

if(curi>3)

{curj=strlen(s[i-1]);curi-=2;gotoxy(curj,curi);}

else

if(line>0){curj=strlen(s[i-1]);gotoxy(curj,curi);up();}

else ;}

void right()

{int i,len;

i=line+(curi-3)/2;

len=strlen(s[i]);

if(curj<len)

if(s[i][curj-3]>160)

{curj+=2;gotoxy(curj,curi);}

else

{curj+=1;gotoxy(curj,curi);}

else

if(i<sum_line)

{curj=3; down();}}

void del()

{int i;

i=line+(curi-3)/2;

if(curj>3)

{ if(s[i][curj-4]>160)

{gotoxy(curj-2,curi);cprintf(" ");

curj-=2;

gotoxy(curj,curi);}

else

{gotoxy(curj-1,curi);cprintf(" ");

curj-=1;

gotoxy(curj,curi);}}

else

{if(curi>3){curi-=2;

curj=strlen(s[i-1]);

if(s[i-1][curj-4]>160)

{gotoxy(curj-1,curi);

cprintf(" ");

curj-=1;

gotoxy(curj,curi);}

else

{gotoxy(curj,curi);

cprintf(" ");

gotoxy(curj,curi);}}}}

void interrupt new()

{timercount++;

if(timercount==18)

{count++;

timercount=0;}

old();}

void settimer(void interrupt (*IntProc)())

{old=getvect(0x1c);

disable();

setvect(0x1c,IntProc);

enable();}

void kill()

{disable();

setvect(0x1c,old);

enable();}

谁可以告诉我这里的每一个函数是什么意思啊

搜索更多相关的解决方案: C语言  

----------------解决方案--------------------------------------------------------
静夜思不是做了一个函数手册吗
自己下载去找找看啊

----------------解决方案--------------------------------------------------------
函数手册在那里呀,我不懂!我第一次用这个 !谢谢告诉我!
----------------解决方案--------------------------------------------------------
  相关解决方案