易码技术论坛

 找回密码
 加入易码
搜索
查看: 321749|回复: 3

掏金者可以玩啦!(用我的编译器编的)

[复制链接]
发表于 2006-9-9 13:35:14 | 显示全部楼层
竟又坐了沙发~

麻烦斑竹转到新品区去
发表于 2006-9-9 14:13:10 | 显示全部楼层
支持啊!!!!
发表于 2006-9-9 21:37:27 | 显示全部楼层
祝贺!
super mario是把每个8*8字模压缩为5*3。
 楼主| 发表于 2006-9-9 13:30:53 | 显示全部楼层 |阅读模式

适合nc3000!
其它的我不知键盘io和文件读取函数,大家告诉我
sxzc上下左右,f4开始,f1复位,f2选,下右:AB
垂直滚动是我编的,其它的要感谢lee哥!!
我不会压缩字模,于是写了这个来压缩,但效果不好,lee哥和高手教我
  1. int fp;
  2. char mem[4096];
  3. char pic[8];
  4. char text[200];
  5. char bit[8]={128,64,32,16,8,4,2,1};
  6. void xuan()
  7. {
  8. char n[10][20];
  9. char name[2][20];
  10. char dirname[50];
  11. char filename[50];
  12. int i,j;
  13. i=0;
  14. sprintf(n[0],"%s","/");
  15. for(;;)
  16. {
  17. memset(dirname,0,50);
  18. for(j=0;j<=i;j++)strcat(dirname,n[j]);
  19. ChDir(dirname);
  20. if(!FileList(filename))
  21. {
  22. i--;
  23. if(i<0)exit(0);
  24. }
  25. else
  26. {
  27. sprintf(text,"%s/%s",dirname,filename);
  28. if(ChDir(text))
  29. {
  30. i++;
  31. sprintf(n[i],"%s",filename);
  32. }
  33. else
  34. {
  35. sprintf(name[0],"%s",filename);
  36. return;
  37. }
  38. }
  39. }
  40. }
  41. int getPoint(int x,int y)
  42. {
  43. int i;
  44. long addr;
  45. addr=_GRAPH+y*20+x/8;
  46. i=x%8;
  47. if(*(addr)&bit[i])return 1;
  48. else return 0;
  49. }
  50. void main()
  51. {
  52. int i,j,m,n;
  53. SetScreen(1);
  54. Locate(2,8);
  55. printf("FC转文曲星\n      字模压缩器");
  56. getchar();
  57. MakeDir("/LavaData");
  58. xuan();
  59. fp=fopen(text,"r");
  60. ClearScreen();
  61. Refresh();
  62. for(i=0;i<1024;i++)
  63. {
  64. if(CheckKey(27))exit(0);
  65. Box(1,8,50,16,1,0);
  66. Box(1,75,1+158*i/1023,79,1,1);
  67. fread(pic,1,8,fp);
  68. WriteBlock(8,8,8,8,65,pic);
  69. for(n=0;n<8;n++)
  70. {
  71. for(m=0;m<7;m++)
  72. {
  73. if(GetPoint(m+8,n+8)&&GetPoint(m+9,n+8))
  74. {
  75. Point(m/2+24,n+8,1);
  76. if(i<512)Point(31-m/2,n+8,1);
  77. }
  78. }
  79. }
  80. for(m=0;m<8;m++)
  81. {
  82. if(GetPoint(m+24,8)||GetPoint(m+24,9))Point(m+40,8,1);
  83. if(GetPoint(m+24,11)||GetPoint(m+24,12))Point(m+40,9,1);
  84. if(GetPoint(m+24,14)||GetPoint(m+24,15))Point(m+40,10,1);
  85. }
  86. GetBlock(40,8,8,4,64,mem+i*4);
  87. }
  88. fclose(fp);
  89. fp=fopen("/LavaData/字模.dat","w+");
  90. fwrite(mem,1,4096,fp);
  91. fclose(fp);
  92. exit(0);
  93. }
复制代码

淘金者.rar

23 KB, 下载次数: 229

您需要登录后才可以回帖 登录 | 加入易码

本版积分规则

Archiver|手机版|小黑屋|EMAX Studio

GMT+8, 2024-3-28 20:48 , Processed in 0.010678 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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