鱼C论坛

 找回密码
 立即注册
查看: 3047|回复: 1

字符动画无法显示文本内容 求组

[复制链接]
发表于 2018-11-28 14:49:29 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<windows.h>
  4. #include<mmsystem.h>
  5. #include<string.h>
  6. #include<time.h>
  7. #pragma comment(lib,"WINMM.LIB")
  8. int main()
  9. {
  10.         void reloadcation();
  11.         int i=0,caf=33;
  12.         FILE*fp;
  13.         clock_t ftime=0,stime=0;
  14.         char buf[4000],page_limits[]="zf\\ASCIItxt (0000).txt",a[5];printf("%s\n", __FILE__);
  15.         printf("---------start play-----------");
  16.        
  17.        
  18.         printf("%s\n", __FILE__);
  19.         getchar();
  20.         system("cls");
  21.        
  22.        
  23.         stime=clock();
  24.         while(i<5357)
  25.         {
  26.                 if(i%30==0)
  27.                 {
  28.                 caf=43;
  29.                 }
  30.                 else
  31.                 {
  32.                 caf=33;
  33.                 }
  34.                 strcpy(page_limits,"zf\\ASCIItxt (");
  35.                 sprintf(a,"%d",i);
  36.                         (page_limits,a);
  37.                 strcat(page_limits,").txt");
  38.                 ftime=clock();
  39.                         if((ftime-stime)>caf)
  40.                                 {
  41.                                         i++;
  42.                                         fp=fopen("page_limits","r");
  43.                                         fread(buf,sizeof(buf),i,fp);
  44.                                         buf[4000]='\0';
  45.                                         fclose(fp);
  46.                                         fprintf(stdout,"%s",buf);
  47.                                         fprintf(stdout,"Frame:%d",i);
  48.                                         stime+=caf;
  49.                                         reloadcation();
  50.                                 }
  51.         }
  52.        
  53.         system("cls");
  54.         printf("---------legends ascii plays--------- \n------------thanks for waching ----------");
  55.         printf("按任意键继续");
  56.         getchar();
  57.         return 0;
  58.          
  59.        
  60.                
  61. }




  62. void reloadcation()
  63. {
  64.         HANDLE hout;
  65.         COORD coord;
  66.         coord.X=0;
  67.         coord.Y=0;
  68.         hout=GetStdHandle(STD_OUTPUT_HANDLE);
  69.         SetConsoleCursorPosition(hout,coord);
  70. }
复制代码




只有帧数跳动 无法显示文本的内容
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2018-11-28 14:51:25 | 显示全部楼层
file:///C:/Users/accelerator/Desktop/3%25%60RBW7JQH%5D%7D8K5CBVW)]VN.png效果是这样的 求大佬解答
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-12 20:35

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表