| 
 | 
 
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册  
 
x
 
- #include<stdio.h>
 
 - #include<stdlib.h>
 
 - #include<windows.h>
 
 - #include<mmsystem.h>
 
 - #include<string.h>
 
 - #include<time.h>
 
 - #pragma comment(lib,"WINMM.LIB")
 
 - int main()
 
 - {
 
 -         void reloadcation();
 
 -         int i=0,caf=33;
 
 -         FILE*fp;
 
 -         clock_t ftime=0,stime=0;
 
 -         char buf[4000],page_limits[]="zf\\ASCIItxt (0000).txt",a[5];printf("%s\n", __FILE__); 
 
 -         printf("---------start play-----------");
 
 -         
 
 -         
 
 -         printf("%s\n", __FILE__); 
 
 -         getchar();
 
 -         system("cls");
 
 -         
 
 -         
 
 -         stime=clock();
 
 -         while(i<5357)
 
 -         {
 
 -                 if(i%30==0)
 
 -                 {
 
 -                 caf=43;
 
 -                 }
 
 -                 else
 
 -                 {
 
 -                 caf=33;
 
 -                 }
 
 -                 strcpy(page_limits,"zf\\ASCIItxt (");
 
 -                 sprintf(a,"%d",i);
 
 -                         (page_limits,a);
 
 -                 strcat(page_limits,").txt");
 
 -                 ftime=clock();
 
 -                         if((ftime-stime)>caf)
 
 -                                 {
 
 -                                         i++;
 
 -                                         fp=fopen("page_limits","r");
 
 -                                         fread(buf,sizeof(buf),i,fp);
 
 -                                         buf[4000]='\0';
 
 -                                         fclose(fp);
 
 -                                         fprintf(stdout,"%s",buf);
 
 -                                         fprintf(stdout,"Frame:%d",i);
 
 -                                         stime+=caf;
 
 -                                         reloadcation();
 
 -                                 }
 
 -         }
 
 -         
 
 -         system("cls");
 
 -         printf("---------legends ascii plays--------- \n------------thanks for waching ----------");
 
 -         printf("按任意键继续");
 
 -         getchar();
 
 -         return 0;
 
 -          
 
 -         
 
 -                 
 
 - }
 
  
 
 
 
- void reloadcation()
 
 - {
 
 -         HANDLE hout;
 
 -         COORD coord;
 
 -         coord.X=0;
 
 -         coord.Y=0;
 
 -         hout=GetStdHandle(STD_OUTPUT_HANDLE);
 
 -         SetConsoleCursorPosition(hout,coord);
 
 - }
 
  复制代码 
 
 
 
只有帧数跳动 无法显示文本的内容  |   
 
 
 
 |