#define UP     72
#define DOWN   80
#define LEFT   75
#define RIGHT  77
#define ESC    27
#define ENTER  13
#define F1     0x3b
#define F2     0x3c
#define F3     0x3d
#define KEY_B  0x30
#define SPACE  67
#define L_WIN  30
#define R_WIN  224+59
#define D_WIN  386+59
#define TIMECOUNT 50000
#include<all256.h>
#include<time.h>
#include"Words.h"
                               /*Words.h包含较大汉字点阵字库*/
                               /*TIMECOUNT 初始下降速度*/


void drawmat(char *mat,int matsize,int x,int y,int color);  /*显示点阵汉字*/
void Pause(void);
void Init(void);
void Draw_Title(void);
void Window(void);
void Window_L(void);
void Draw_Box(int x,int y,char *Shape);
void Draw_SBox(int x,int y);      /*画基本小方格*/
int  Play(void);
char*  Creat_Box(void);
void Echo_Next_Box(char *Shape);
void Down_Box(char* Shp);
void Clean_Box(int x,int y,char *Shape);
char*  Change_Shape(int x,int y,char* Box);
int  Is_Out(int x,int y,char* Box);
int  Is_Down(int x,int y,char* Box);
int  Quick_Down(int x,int y,char* Box);
int  Count_Box(int x,int y,char* Box);
int  Cancel_Box(void);
int  Del_Box(int Pos);        /*删除行*/
void Echo_Score(long Score);
void Game_Over(void);
void Five(void);

 

char Src_Box[18][28]={0};
int  Speed=0;       /*速度级别*/
int main(void)
{

    int i,j,k;
    Init();
    Five();
   /* Play();  */

    Pause();

    
}

int Play(void)
{
    int i,j;
    char* Box;
    char* Next_Box[2];
    int n=0;
    int Temp=0;
    long Score=0;
    for(i=0;i<18;i+=17)           /*初实始化全局变量*/
        for(j=0;j<28;j++)
            Src_Box[i][j]=1;
    for(i=0;i<18;i++)
        for(j=0;j<28;j+=27)
            Src_Box[i][j]=1;
    /*for(i=0;i<18;i++)
        for(j=0;j<28;j++)
        Src_Box[i][j]=1;
        ; */
    puts256("Tetris Write By CoCobear 2006 CopyLeft..",12,6,LIGHTGRAY);
    puts256("Press ESC Pause.",400,370,LIGHTGRAY);
    while(1)
    {
        /*for(i=0;i<18;i++)
        for(j=0;j<28;j++)
        printf256(30+i*16-16,30+j*16-16,RED,"%d",Src_Box[i][j]);
        ;     */
                                   /*测试Src_Box是否可以充满屏幕*/

        Echo_Score(Score);
        if(0==n)
            Next_Box[0]=Shape[2][0];

        Next_Box[1]=Next_Box[0];
        Next_Box[0]=Creat_Box();
        Echo_Next_Box(Next_Box[0]);

        Down_Box(Next_Box[1]);

        for(i=1;i<17;i++)

            if(1==Src_Box[i][1]) {Game_Over();return 0;}
        Temp=Cancel_Box();
        Score+=10*Temp*Temp;

        n=1;
    }

}
void Game_Over(void)
{
    int i,j;
    for(i=0;i<18;i++)
        for(j=0;j<28;j++)
        Src_Box[i][j]=1;;;
    for(i=1;i<27;i++)
        for(j=1;j<17;j++)
            {Draw_SBox(30+(j-1)*16,30+(i-1)*16);vpost();}      /*使用vpost控制刷屏为逐行*/

    puts256("Game Over",640/2-6,460/2,GREEN);
}
void Echo_Score(long Score)         /*显示分数,以及计算下降速度*/
{

    if(Score>100000)  Speed=9;
    if(Score>50000)  Speed=8;
    if(Score>10000)  Speed=7;
    if(Score>5000)  Speed=6;
    if(Score>2000)  Speed=5;
    if(Score>1000)  Speed=4;
    if(Score>500)  Speed=3;
    if(Score>250)  Speed=2;
    if(Score>100)  Speed=1;
    bar(320,100,100,20,BROWN);
    bar(430,100,50,20,BROWN);
    printf256(320,100,LIGHTGRAY,"Points: %ld",Score);
    printf256(430,100,LIGHTGRAY,"Speed:%d",Speed);

}
void Echo_Next_Box(char* Next_Box)              /*显示下一个要出现的方块*/
{
    bar(350+30,150,70,70,BROWN);
    rectangle(348+30,148,348+72+30,148+72,BLUE);
    rectangle(349+30,149,348+71+30,148+71,BLACK);
    puts256("Next:",350+30,134,LIGHTGRAY);
    Draw_Box(350+30,150,Next_Box);

}
int Cancel_Box()              /*判断是否可以消去方块*/
{
    int i,j,k;
   /* int Tmp=1;  */
    int Step1=0;
    for(i=23;i>1;i--)
    {
        Step1=0;
        {
            for(j=0;j<4;j++)
            for(k=1;k<17;k++)
                Step1+=Src_Box[k][i+j];
        }
        if(64==Step1)  {Del_Box(i);Del_Box(i+1);Del_Box(i+2);Del_Box(i+3);/*puts256("四行",270+i*5,230,BLUE);vpost();*/return 4;}
    };

    for(i=24;i>1;i--)
    {
        Step1=0;
        {
            for(j=0;j<3;j++)
            for(k=1;k<17;k++)
                Step1+=Src_Box[k][i+j];
        }
        if(48==Step1)  {Del_Box(i);Del_Box(i+1);Del_Box(i+2);/*puts256("三行",300+i*5,130,BLUE);vpost();*/return 3;}
    }
    for(i=25;i>1;i--)
    {
        Step1=0;
        {
            for(j=0;j<2;j++)
            for(k=1;k<17;k++)
                Step1+=Src_Box[k][i+j];
        }
        if(32==Step1)  {Del_Box(i);Del_Box(i+1);/*puts256("二行",320+i*5,70,BLUE);vpost();*/return 2;}
    }

    /*for(i=1;i<17;i++) printf256(300,40+i*10,BLUE,"%d",Src_Box[i][26]);vpost();  */
    for(i=26;i>1;i--)
    {
        Step1=0;
        for(k=1;k<17;k++)
        {
            Step1+=Src_Box[k][i];

        }
        if(16==Step1)
        {
            Del_Box(i);/*puts256("一行",370+i*5,30,BLUE);vpost();*/return 1;
        }
    }
    return 0;


}
int Del_Box(int Pos)         /*删除一行方块*/
{
    int i,j;
    /*bar(29,29,256,26*16,BROWN);vpost();  */


    for(i=1;i<17;i++)
        Src_Box[i][Pos]=0;
    for(j=Pos;j>1;j--)
        for(i=1;i<17;i++)
            Src_Box[i][j]=Src_Box[i][j-1];
            ;;;
    for(j=26;j>1;j--)
        for(i=1;i<17;i++)
        {
            bar(30+(i-1)*16,30+(j-1)*16,16,16,BROWN);
            if(1==Src_Box[i][j]) Draw_SBox(30+(i-1)*16,30+(j-1)*16);
        }
            ;;

 

}
void Down_Box(char* Box)
{
    int i;
    float j;
    int x,y;
    int Tmp;
    char key;
    char* Temp;
    i=0,j=0;
    x=110,y=30;
    while(i<29)
    {


        if (kbhit())
        {

            key=getch();
            if(LEFT==key)
            {
                if(Is_Out(x-16,y,Box))
                {Clean_Box(x,y,Box);x-=16;Draw_Box(x,y,Box);}
            }
            if(RIGHT==key)
                if(Is_Out(x+16,y,Box))
                {Clean_Box(x,y,Box);x+=16;Draw_Box(x,y,Box);}
            if(UP==key)
            {
                Clean_Box(x,y,Box);
                Temp=Change_Shape(x,y,Box);
                Box=Temp;
                Draw_Box(x,y,Box);
            }
            if(DOWN==key)
                if(1==Is_Down(x,y+16,Box))
                {Clean_Box(x,y,Box);y+=16;Draw_Box(x,y,Box);}
            if(ENTER==key)

                {Quick_Down(x,y,Box);i=29;}
            if(ESC==key)
                Pause();


                          /*接受键盘信息*/
        }

 

        while(j>TIMECOUNT-Speed*5000)         /*时间计数器*/
        {
            Clean_Box(x,y,Box);
            y+=16;
            Draw_Box(x,y,Box);
            i++;
            j=0;
        }
        j++;
        if(0==Is_Down(x,y,Box)) {Count_Box(x,y,Box);break;}
    
    


    }

}
int Count_Box(int x,int y,char* Box)         /*计算方块下降后屏幕坐标填充情况*/
{
    int i,j;
    int Pos_x,Pos_y;
    i=j=0;
    Pos_x=(x-30)/16+1;
    Pos_y=(y-30)/16+1;


    for(i=0;i<4;i++)
        for(j=0;j<4;j++)
            if(1==*(Box+j*4+i))
                Src_Box[Pos_x+i][Pos_y+j]=1;
   /* for(j=26;j>1;j--)
        for(i=1;i<17;i++)
        {
            bar(30+(i-1)*16,30+(j-1)*16,16,16,BROWN);
            if(1==Src_Box[i][j]) Draw_SBox(30+(i-1)*16,30+(j-1)*16);
        }

    */                      /*测试全屏存储方块是否和已存在方块位置相同*/

}
int Quick_Down(int x,int y,char* Box)       /*按键后讯速下降到底部*/
{


    while(1)
    {
        Clean_Box(x,y,Box);
        y+=16;
        Draw_Box(x,y,Box);
        if(0==Is_Down(x,y,Box)) {Count_Box(x,y,Box);return 0; }
    }

}
char* Change_Shape(int x,int y,char* Box)      /*方块变形*/
{
    char Shp;
    /*printf256(450,300,BLUE,"%d",Box);
    printf256(480,330,BLUE,"%d",Shape[0][0]);
    vpost();  */ /*测试方块在内存中的位置*/
    Shp=(Box-Shape[0][0])/16;      /*计算是第几个形状*/
   /* printf256(370,229,BLUE,"%d",Shp);vpost();  */
    if(3==Shp || 7==Shp || 11==Shp || 13==Shp || 15==Shp || 17==Shp || 18==Shp)

    {
        if(3==Shp || 7==Shp || 11==Shp) Shp-=3;

        if(13==Shp || 15==Shp || 17==Shp) Shp-=1;

        if(18==Shp) Shp=Shp;
    }

    else Shp++;

    if(1==Is_Out(x,y,Shape[Shp][0]) || 1==Is_Down(x,y,Shape[Shp][0]))
        return Shape[Shp][0];
    else return Box;
}

int Is_Out(int x,int y, char* Box)  /*左右移测试*/
{
    int i,j;
    int Pos_x,Pos_y;
    i=j=0;
    Pos_x=(x-30)/16+1;
    Pos_y=(y-30)/16+1;
   /* printf256(200+Pos_x*10,30+Pos_y*10,BLUE,"%d   %d",Pos_x,Pos_y);vpost(); */
    for(i=0;i<4;i++)
        for(j=0;j<4;j++)
            if(1==*(Box+j*4+i))
                if(1==Src_Box[Pos_x+i][Pos_y+j]) return 0;           /*判断是否能左,右移,根据方块形状测试移动后是否覆盖已有的方块*/
                ;;;;;;

    return 1;
}
int Is_Down(int x,int y,char* Box)
{
    int i,j;
    int Pos_x,Pos_y;
    i=j=0;
    Pos_x=(x-30)/16+1;
    Pos_y=(y-30)/16+2;
    for(i=0;i<4;i++)
        for(j=0;j<4;j++)
            if(1==*(Box+j*4+i))
                if(1==Src_Box[Pos_x+i][Pos_y+j]) {/*printf256(200,220,BLUE,"%d   %d",Pos_x+i,Pos_y+i);*/return 0;}           /*判断是否能下移,根据方块形状测试移动后是否覆盖已有的方块*/
                ;;;;

    return 1;
}
char *Creat_Box(void)     /*随机产生一个方块*/
{
    int choose;
    time_t t;
    choose=0;
    srand((unsigned) time(&t));
    choose=rand()%19;

 

    /*Draw_Box(110,30,Shape[choose][0]); */         /*(110,30),方块初始下降位置*/
    return Shape[choose][0];

 

}


void Init(void)    /*系统,界面实始化*/
{
    init256(0);
    cls(0);
    Draw_Title();
    Window();

}
 void drawmat(char *mat,int matsize,int x,int y,int color)
/*依次：字模指针、点阵大小、起始坐标(x,y)、颜色*/
{int i,j,k,n;
 n=(matsize-1)/8+1;
 for(j=0;j<matsize;j++)
  for(i=0;i<n;i++)
   for(k=0;k<8;k++)
    if(mat[j*n+i]&(0x80>>k))  /*测试为1的位则显示*/
     putpixel(x+i*8+k,y+j,color);
}
void Draw_Title(void)
{
    int i;


    for(i=0;i<5;i++)
        drawmat(Title+i*288,48,120+i*75,60,RED);

    vpost();

    delay(50000);

}
void Window(void)         /*背景,边框,窗口*/
{
    rectangle(0,0,639,459,BLACK);
    bar(1,1,638,458,LIGHTGRAY);
    line(4,4,4,451,BLACK);
    line(5,5,5,451,BLACK);
    line(4,4,635,4,BLACK);
    line(5,5,635,5,BLACK);
    bar(6,6,629,449,BROWN);
    bar(6,20,629,5,LIGHTGRAY);
    line(6,25,635,25,BLACK);
    bar(6,6,630,16,82);
    Window_L();
    vpost();
    
}
void Window_L(void)                              /*方块活动范围:(29,29)---(224+59,386+59),横向容纳16个方块,纵向:26*/
{
    /*rectangle(29,29,224+59,386+59,BLACK);*/
    rectangle(27,27,224+63,386+61,LIGHTGRAY);
    rectangle(28,28,224+62,386+60,LIGHTGRAY);
    line(29,29,29,386+59,BLACK);
    line(29,29,224+59,29,BLACK);
}
void Draw_Box(int x,int y,char *Shape)    /*画方块*/
{
    int i,j;

    for(i=0;i<4;i++)
    for(j=0;j<4;j++)

        {
            if(1==*(Shape+j*4+i))
                Draw_SBox(x+i*16,y+j*16);
        }
    ;;
    vpost();
    
}
void Draw_SBox(int x,int y)               /*画最小方块,大小:16X16*/
{
    line(x,y,x+15,y,LIGHTGRAY);
    line(x,y,x,y+15,LIGHTGRAY);
    bar(x+1,y+1,14 ,14,BLUE);

 

}

void Clean_Box(int x,int y,char *Shape)     /*清除方块*/
{
    int i,j;

    for(i=0;i<4;i++)
    for(j=0;j<4;j++)

        {
            if(1==*(Shape+j*4+i))
                bar(x+i*16,y+j*16,16,16,BROWN);
        }
    ;;

}
    

WORDS.H

 

char Title[]={/* 以下是 '俄' 的 48点阵黑体 字模，288 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0C,0x00,0x00,0xE0,0x00,
0x00,0x1E,0x00,0x00,0xE0,0x00,0x00,0x1C,
0x00,0x00,0xE0,0x00,0x00,0x1C,0x00,0x70,
0xE0,0x00,0x00,0x3C,0x03,0xF0,0xE0,0x80,
0x00,0x38,0x7F,0xE0,0xE3,0x80,0x00,0x38,
0x3F,0x00,0xE1,0xC0,0x00,0x70,0x23,0x00,
0xE0,0xE0,0x00,0x70,0x03,0x00,0xE0,0xE0,
0x00,0xF0,0x03,0x00,0xE0,0x40,0x00,0xF0,
0x03,0x00,0xE0,0x00,0x00,0xF0,0x03,0x00,
0xE0,0x00,0x01,0xF0,0x03,0x00,0xE0,0x00,
0x03,0xF0,0x03,0x00,0xE0,0x00,0x03,0xF0,
0xFF,0xFF,0xFF,0xF8,0x07,0x70,0xFF,0xFF,
0xFF,0xF8,0x07,0x70,0x03,0x00,0xE0,0x00,
0x0E,0x70,0x03,0x00,0xE0,0x00,0x0C,0x70,
0x03,0x00,0xE0,0x00,0x04,0x70,0x03,0x00,
0x60,0x00,0x00,0x70,0x03,0x00,0x60,0x00,
0x00,0x70,0x03,0x00,0x60,0x80,0x00,0x70,
0x03,0x00,0x60,0xC0,0x00,0x70,0x03,0x18,
0x61,0xC0,0x00,0x70,0x03,0xF8,0x61,0xC0,
0x00,0x70,0x0F,0xE0,0x73,0x80,0x00,0x70,
0xFF,0x00,0x33,0x00,0x00,0x71,0xFF,0x00,
0x37,0x00,0x00,0x71,0xC3,0x00,0x3E,0x00,
0x00,0x70,0x03,0x00,0x3C,0x00,0x00,0x70,
0x03,0x00,0x3C,0x00,0x00,0x70,0x03,0x00,
0x38,0x00,0x00,0x70,0x03,0x00,0x7C,0x00,
0x00,0x70,0x03,0x01,0xEC,0x00,0x00,0x70,
0x03,0x03,0xCE,0x10,0x00,0x70,0x03,0x0F,
0x86,0x1C,0x00,0x70,0x03,0x06,0x07,0x18,
0x00,0x70,0x7F,0x04,0x03,0x98,0x00,0x70,
0x3F,0x00,0x01,0xF8,0x00,0x70,0x3E,0x00,
0x01,0xF0,0x00,0x70,0x30,0x00,0x00,0xF0,
0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/* 以下是 '罗' 的 48点阵黑体 字模，288 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,
0xFF,0x80,0x03,0xFF,0xFF,0xFF,0xFF,0x80,
0x03,0x80,0x70,0x0E,0x03,0x80,0x03,0x80,
0x70,0x0E,0x03,0x80,0x03,0x80,0x70,0x0E,
0x03,0x80,0x03,0x80,0x70,0x0E,0x03,0x80,
0x03,0x80,0x70,0x0E,0x03,0x80,0x03,0x80,
0x70,0x0E,0x03,0x80,0x03,0x80,0x70,0x0E,
0x03,0x80,0x03,0x80,0x70,0x0E,0x03,0x80,
0x03,0xFF,0xFF,0xFF,0xFF,0x80,0x03,0xFF,
0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,
0x3C,0x00,0x00,0x00,0x00,0x00,0x78,0x00,
0x00,0x00,0x00,0x00,0xF0,0x00,0x00,0x00,
0x00,0x01,0xFF,0xFF,0xFC,0x00,0x00,0x01,
0xFF,0xFF,0xF8,0x00,0x00,0x03,0xFF,0xFF,
0xF8,0x00,0x00,0x07,0x80,0x00,0x70,0x00,
0x00,0x1F,0x00,0x00,0x70,0x00,0x00,0x3C,
0x00,0x00,0x60,0x00,0x00,0x78,0x00,0x00,
0xE0,0x00,0x00,0xF0,0x0C,0x00,0xE0,0x00,
0x00,0x60,0x1F,0x01,0xC0,0x00,0x00,0x00,
0x07,0x83,0x80,0x00,0x00,0x00,0x03,0xC7,
0x80,0x00,0x00,0x00,0x01,0xE7,0x00,0x00,
0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,
0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0xF8,
0x00,0x00,0x00,0x00,0x03,0xE0,0x00,0x00,
0x00,0x00,0x1F,0xC0,0x00,0x00,0x00,0x07,
0xFF,0x00,0x00,0x00,0x01,0xFF,0xF8,0x00,
0x00,0x00,0x01,0xFF,0xC0,0x00,0x00,0x00,
0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/* 以下是 '斯' 的 48点阵黑体 字模，288 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xE0,0x18,0x00,0x00,0x00,
0x00,0xE0,0x18,0x00,0x01,0xE0,0x00,0xE0,
0x18,0x0F,0xFF,0xF0,0x00,0xE0,0x18,0x0F,
0xFF,0xF0,0x00,0xE0,0x18,0x0C,0x00,0x00,
0x00,0xE0,0x18,0x0C,0x00,0x00,0x0F,0xFF,
0xFF,0x8C,0x00,0x00,0x0F,0xFF,0xFF,0x8C,
0x00,0x00,0x00,0xE0,0x18,0x0C,0x00,0x00,
0x00,0xE0,0x18,0x0C,0x00,0x00,0x00,0xE0,
0x18,0x0C,0x00,0x00,0x00,0xE0,0x18,0x0C,
0x00,0x00,0x00,0xE0,0x18,0x0C,0x00,0x00,
0x00,0xFF,0xF8,0x0C,0x00,0x00,0x00,0xFF,
0xF8,0x0C,0x00,0x00,0x00,0xE0,0x18,0x0F,
0xFF,0xF8,0x00,0xE0,0x18,0x0F,0xFF,0xF8,
0x00,0xE0,0x18,0x0E,0x07,0x00,0x00,0xE0,
0x18,0x0E,0x07,0x00,0x00,0xE0,0x18,0x0E,
0x07,0x00,0x00,0xFF,0xF8,0x0C,0x07,0x00,
0x00,0xFF,0xF8,0x0C,0x07,0x00,0x00,0xE0,
0x18,0x0C,0x07,0x00,0x00,0xE0,0x18,0x0C,
0x07,0x00,0x00,0xE0,0x18,0x1C,0x07,0x00,
0x00,0xE0,0x18,0x1C,0x07,0x00,0x00,0xE0,
0x18,0x1C,0x07,0x00,0x1F,0xFF,0xFF,0x9C,
0x07,0x00,0x1F,0xFF,0xFF,0x9C,0x07,0x00,
0x00,0x00,0x00,0x1C,0x07,0x00,0x00,0x00,
0x00,0x1C,0x07,0x00,0x00,0x00,0x00,0x38,
0x07,0x00,0x00,0x60,0x60,0x38,0x07,0x00,
0x00,0xF0,0x70,0x38,0x07,0x00,0x00,0xE0,
0x38,0x70,0x07,0x00,0x01,0xC0,0x1C,0x70,
0x07,0x00,0x03,0x80,0x08,0xE0,0x07,0x00,
0x07,0x00,0x00,0xE0,0x07,0x00,0x0F,0x00,
0x01,0xC0,0x07,0x00,0x06,0x00,0x03,0xC0,
0x07,0x00,0x00,0x00,0x07,0x80,0x07,0x00,
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/* 以下是 '方' 的 48点阵黑体 字模，288 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,
0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,
0x03,0xC0,0x00,0x00,0x00,0x00,0x03,0xC0,
0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,
0x00,0x00,0x01,0xE0,0x00,0x00,0x00,0x00,
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xF8,
0x1F,0xFF,0xFF,0xFF,0xFF,0xF8,0x1F,0xFF,
0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x38,0x00,
0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,
0x38,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,
0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,
0x78,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,
0xFC,0x00,0x00,0x00,0x7F,0xFF,0xFC,0x00,
0x00,0x00,0x70,0x00,0x3C,0x00,0x00,0x00,
0x70,0x00,0x3C,0x00,0x00,0x00,0x70,0x00,
0x38,0x00,0x00,0x00,0xF0,0x00,0x38,0x00,
0x00,0x00,0xF0,0x00,0x38,0x00,0x00,0x00,
0xE0,0x00,0x38,0x00,0x00,0x01,0xE0,0x00,
0x38,0x00,0x00,0x01,0xE0,0x00,0x38,0x00,
0x00,0x03,0xC0,0x00,0x38,0x00,0x00,0x03,
0xC0,0x00,0x38,0x00,0x00,0x07,0x80,0x00,
0x38,0x00,0x00,0x07,0x80,0x00,0x38,0x00,
0x00,0x0F,0x00,0x00,0x78,0x00,0x00,0x1E,
0x00,0x00,0x70,0x00,0x00,0x3C,0x00,0x00,
0x70,0x00,0x00,0x7C,0x00,0x00,0x70,0x00,
0x01,0xF8,0x00,0x00,0xF0,0x00,0x03,0xE0,
0x00,0x3F,0xF0,0x00,0x03,0xC0,0x00,0x3F,
0xE0,0x00,0x01,0x80,0x00,0x1F,0xC0,0x00,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/* 以下是 '块' 的 48点阵黑体 字模，288 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1C,0x00,0x00,
0x00,0x70,0x00,0x1C,0x00,0x00,0x00,0x70,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1C,
0x00,0x00,0x00,0x70,0x00,0x1C,0x00,0x00,
0x00,0x70,0x00,0x1C,0x00,0x00,0x00,0x70,
0x00,0x1C,0x00,0x00,0x00,0x70,0x00,0x1C,
0x00,0x00,0x00,0x70,0x1F,0xFF,0xFF,0x00,
0x00,0x70,0x1F,0xFF,0xFF,0x00,0x00,0x70,
0x00,0x1C,0x07,0x00,0x00,0x70,0x00,0x1C,
0x07,0x00,0x00,0x70,0x00,0x1C,0x07,0x00,
0x1F,0xFF,0xC0,0x1C,0x07,0x00,0x1F,0xFF,
0xC0,0x1C,0x07,0x00,0x00,0x70,0x00,0x1C,
0x07,0x00,0x00,0x70,0x00,0x1C,0x07,0x00,
0x00,0x70,0x00,0x1C,0x07,0x00,0x00,0x70,
0x00,0x1C,0x07,0x00,0x00,0x70,0x00,0x1C,
0x07,0x00,0x00,0x70,0x00,0x1C,0x07,0x00,
0x00,0x70,0x7F,0xFF,0xFF,0xF0,0x00,0x70,
0x7F,0xFF,0xFF,0xF0,0x00,0x70,0x7F,0xFF,
0xFF,0xF0,0x00,0x70,0x00,0x3C,0x00,0x00,
0x00,0x70,0x00,0x3E,0x00,0x00,0x00,0x70,
0x00,0x3E,0x00,0x00,0x00,0x70,0x00,0x37,
0x00,0x00,0x00,0x70,0x60,0x73,0x00,0x00,
0x00,0x77,0xE0,0x63,0x80,0x00,0x00,0x7F,
0x80,0xE1,0x80,0x00,0x03,0xFE,0x00,0xC1,
0xC0,0x00,0x1F,0xF0,0x01,0xC0,0xE0,0x00,
0x0F,0x80,0x03,0x80,0x70,0x00,0x0E,0x00,
0x07,0x00,0x38,0x00,0x08,0x00,0x0F,0x00,
0x1E,0x00,0x00,0x00,0x1E,0x00,0x0F,0x80,
0x00,0x00,0x7C,0x00,0x07,0xE0,0x00,0x01,
0xF8,0x00,0x03,0xF8,0x00,0x03,0xE0,0x00,
0x00,0xF0,0x00,0x03,0xC0,0x00,0x00,0x20,
0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

};

char Shape[19][4][4]=
        {
            0,1,0,0,
            1,1,1,0,
            0,0,0,0,
            0,0,0,0,

            1,0,0,0,
            1,1,0,0,
            1,0,0,0,
            0,0,0,0,

            1,1,1,0,
            0,1,0,0,
            0,0,0,0,
            0,0,0,0,

            0,1,0,0,
            1,1,0,0,
            0,1,0,0,
            0,0,0,0,

            1,0,0,0,
            1,0,0,0,
            1,1,0,0,
            0,0,0,0,

            1,1,1,0,
            1,0,0,0,
            0,0,0,0,
            0,0,0,0,

            1,1,0,0,
            0,1,0,0,
            0,1,0,0,
            0,0,0,0,

            0,0,1,0,
            1,1,1,0,
            0,0,0,0,
            0,0,0,0,

            0,1,0,0,
            0,1,0,0,
            1,1,0,0,
            0,0,0,0,

            1,0,0,0,
            1,1,1,0,
            0,0,0,0,
            0,0,0,0,

            1,1,0,0,
            1,0,0,0,
            1,0,0,0,
            0,0,0,0,

            1,1,1,0,
            0,0,1,0,
            0,0,0,0,
            0,0,0,0,


            1,0,0,0,
            1,1,0,0,
            0,1,0,0,
            0,0,0,0,

            0,1,1,0,
            1,1,0,0,
            0,0,0,0,
            0,0,0,0,

            0,1,0,0,
            1,1,0,0,
            1,0,0,0,
            0,0,0,0,

            1,1,0,0,
            0,1,1,0,
            0,0,0,0,
            0,0,0,0,


            1,0,0,0,
            1,0,0,0,
            1,0,0,0,
            1,0,0,0,

            1,1,1,1,
            0,0,0,0,
            0,0,0,0,
            0,0,0,0,


            1,1,0,0,
            1,1,0,0,
            0,0,0,0,
            0,0,0,0,

        };

void Pause(void)
{
    vpost();
    getche();
}

