⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fdhz.h

📁 完整的仿真源程序
💻 H
字号:
/* Display Chinese Char & play Music */

#define UP 27
#define DOWN 80
#define RIGHT 77
#define LEFT 75
#define PGUP  73
#define SPEED 6
#define PGDN 81

#include "dos.h"
#include "conio.h"
#include "stdio.h"
#include "stdlib.h"
#include "graphics.h"
#include "fcntl.h"
#include <alloc.h>
#include <stdlib.h>
#include "io.h"


int fdhz24(int x,int y,int z,float x_zoom,float y_zoom,int color,char *p,char c)
{
	unsigned char nm,flag=0;
	unsigned char qm,wm;
	int handle,i,j,k,rec;
	char by[72];
	if(c=='s')
		handle=open("hzk24s",O_RDONLY|O_BINARY);
	if(c=='k')
		handle=open("c:\\ucdos\\fnt\\hzk24k",O_RDONLY|O_BINARY);
	if(c=='f')
		handle=open("c:\\ucdos\\fnt\\hzk24f",O_RDONLY|O_BINARY);
	if(c=='h')
		handle=open("c:\\ucdos\\fnt\\hzk24h",O_RDONLY|O_BINARY);
	if(c=='t')
		handle=open("c:\\ucdos\\fnt\\hzk24t",O_RDONLY|O_BINARY);
	if(c=='g')
		handle=open("title.dat",O_RDONLY|O_BINARY);

		while(*p)
		{
			nm=*p++;
			if(nm>0xa1)
			if(flag==0)
				{
				qm=(nm-0xa1)&0x7f;
				flag=1;}
			else
				{
				wm=(nm-0xa1)&0x7f;
				flag=0;
				if(c=='t')
					rec=(qm)*94+wm;
				else
					rec=(qm-15)*94+wm;
				//if (c=='g')
				//	rec=rec_num;

				lseek(handle,rec*72L,SEEK_SET);
				read(handle,by,72);
				//if (c=='g')
				//	rec_num=rec_num+1;

				for(i=0;i<24;i++)
				for(j=0;j<=2;j++)
				for(k=0;k<8;k++)
				if((by[i*3+j]>>(7-k))&1)
				putpixel(x_zoom*(x+i),y_zoom*(y+j*8+k),color);

				x=x+24+z;
			}

		}

	close(handle);
	return(x);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -