可以花你两秒钟看一眼这个不起看的我吗? ( 积分: 0 )

  • 主题发起人 主题发起人 linuxcici
  • 开始时间 开始时间
L

linuxcici

Unregistered / Unconfirmed
GUEST, unregistred user!
#include<graphics.h>


#include<io.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<bios.h>
#include<mem.h>
#include<fcntl.h>
#include<stdlib.h>
#include<conio.h>
#include<process.h>
#define zi 45

#define green 19



float well=318.0;
int action=1;
float ik=279.5,ij=80.0;

int size,size1,size2;

void *buf,*buf1,*buf2;


unsigned char far *video_buffer=(char far *)0xA0000000L;
unsigned char far *rom_char_set=(char far *)0xF000FA6EL;



void display(int x,int y,int no,int color, int h)
{


static unsigned char cc_code_data[1280]=
{
0x07,0xc0,0x08,0x20,0x10,0x10,0x10,0x10, 0x10,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x02,0x00,
0x04,0x00,0x08,0x00,0x10,0x00,0x10,0x00, 0x10,0x00,0x10,0x00,0x1f,0xf0,0x07,0xe0,0x08,0x10,
0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10, 0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,
0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10, 0x07,0xe0,0x07,0xe0,0x08,0x20,0x08,0x00,0x08,0x00,
0x08,0x00,0x08,0x00,0x0f,0xc0,0x00,0x20, 0x00,0x20,0x00,0x20,0x00,0x20,0x08,0x20,0x08,0x20,
0x08,0x20,0x08,0x20,0x0f,0xc0,0x04,0x00, 0x0f,0xfc,0x10,0x80,0x27,0xf0,0x44,0x80,0x04,0x80,
0x04,0x80,0xff,0xff,0x00,0x80,0x00,0x80, 0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x00,0x80,0x04,0x20,0x04,0x20,0x04,0x20, 0x04,0x20,0x3f,0xfc,0x04,0x20,0x07,0xe0,0x04,0x20,
0x07,0xe0,0x01, 0x00,0x7f,0xfe,0x05,0x80,
0x09,0x40,0x11, 0x20,0x21,0x18,0x41,0x04,
0x00,0x00,0x00, 0x00,0x0f,0xf0,0x08, 0x10,0x08,0x10,0x08, 0x10,0x08,0x10,0x0f,0xf0,
0x08,0x10,0x08, 0x10,0x08,0x10,0x08, 0x10,0x08,0x10,0x08, 0x10,0x0f,0xf0,0x00,0x00,
0x00,0x40,0x00, 0x80,0x01,0x00,0xff, 0xff,0x04,0x00,0x07, 0xf0,0x0c,0x10,0x17,0xf0,
0x24,0x10,0x44, 0x10,0x87,0xf0,0x04, 0x10,0x04,0x10,0x04, 0x50,0x04,0x30,0x04,0x10,
0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,
0x3f,0xfc,0x00, 0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x10,0x80,0x10,0x00,0x30,0x00, 0xd7,0xfc,0x11,0x10,0x11,0x10,0x11,0x10,0x11,0x10,
0x11,0x10,0x11,0x10,0x11,0x10,0x11,0x10, 0x11,0x10,0x11,0x10,0x17,0xfc,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,0x80, 0x03,0x80,0x00,0xc0,0x01,0x40,0x02,0x40,0x04,0x40,
0x08,0x40,0x10,0x40,0x20,0x40,0x20,0x40, 0x3f,0xf8,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,
0x00,0x40,0x00,0x40,0x00,0x40,0x07,0xfc, 0x04,0x04,0x04,0x04,0x07,0xfc,0x04,0x00,0x08,0x40,
0x08,0x40,0x10,0x40,0x10,0x40,0x27,0xfc, 0x24,0x44,0x44,0x44,0xc7,0xfc,0x84,0x44,0x04,0x44,
0x07,0xfc,0x00,0x00,0xf8,0x9f,0x20,0x84, 0x20,0x84,0x20,0x84,0x22,0x84,0x22,0x84,0xfa,0x9f,
0x20,0x84,0x20,0x84,0x20,0x84,0x20,0x84, 0x20,0x84,0xfd,0x3f,0x00,0x00,0x00,0x00,0x03,0x00,
0x01,0x00,0x00,0x80,0x0f,0xf0,0x01,0x00, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x1f,0xf0,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00, 0x01,0x00,0x3f,0xfc,0x04,0x08,0x08,0x10,0x10,0x20,
0x30,0x60,0x50,0xa0,0x90,0x20,0x17,0xfe, 0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,
0x10,0x20,0x10,0x20,0x11,0xfc,0x00,0x00, 0x00,0x00,0x42,0x08,0x21,0x10,0x13,0xf8,0xf2,0x08,
0x12,0x08,0x13,0xf8,0x11,0x20,0x11,0x20, 0x11,0x20,0x11,0x20,0x11,0x20,0x15,0x20,0x1a,0x22,
0x14,0x22,0x08,0x3e,0x08,0x20,0x18,0x24, 0x28,0x22,0x48,0x21,0x08,0x20,0xff,0xff,0x08,0x20,
0x0c,0x20,0x08,0x24,0x18,0x24,0x28,0x28, 0x48,0x30,0x08,0x20,0x08,0x51,0x50,0x0a,0x20,0x04,
0x04,0x00,0x08,0x00,0x12,0x00,0x32,0x40, 0x52,0x40,0x97,0xfc,0x12,0x44,0x12,0x44,0x12,0x44,
0x12,0x44,0x12,0x44,0x12,0x14,0x12,0x0c, 0x12,0x01,0x12,0x01,0x13,0xff,0x09,0x00,0x11,0x00,
0x20,0x80,0x64,0x3c,0xa4,0x04,0x24,0x04, 0x24,0x04,0x24,0x04,0x24,0x04,0x24,0x04,0x24,0x04,0x24,
0x04,0x24,0x04,0x24,0x14,0x24,0x0c,0x24, 0x04,0x07,0xf0,0x04,0x10,0x07,0xf0,0x04,0x10,0x07,0xf0,
0x00,0x00,0xff,0xff,0x22,0x00,0x3e,0xfe,0x22,0x44,0x3e,0x28,0x22,0x10,0xfe,0x28,0x02,0x44,0x02,
0x82,0x02,0x00, 0x08,0xf8,0x08,0x08,0x08,
0x08,0x10,0x10, 0xfe,0x20,0x23,0xff,0x40,
0x20,0x44,0x20, 0x84,0x20,0x84,0x20,0x48,0x20,0x30,0x20,0x30, 0x20,0x48,0xa0,0x84,0x60,
0x02,0x20,0x00, 0x20,0x08,0x40,0x10,0x80,0x21,0x00,0xfd,0xfc, 0x84,0x04,0x84,0x04,0x84,
0x44,0x84,0x24, 0xfc,0x14,0x84,0x04,0x84,0x04,0x84,0x04,0x84, 0x04,0x84,0x04,0xfc,0x3c,
0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x3f,
0xfc,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x03,0x80,
0x05,0x40,0x09, 0x20, 0x11, 0x10,0x21,0x08,0x41,0x04,
0x81,0x02,0x01, 0x00, 0x01, 0x00,0x01,0x00,0x01,0x00,
0x01,0x00,0x01, 0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x03, 0xf0,0x02,0x10,0x03,0xf0,
0x02,0x10,0x03, 0xf0,0x00,0x00,0xff, 0xff,0x04,0x80,0x04, 0x80,0x08,0xf0,0x0c,0x80,
0x12,0x80,0x21, 0x80,0x40,0x80,0x80, 0x40,0x00,0x3f,0x04, 0x20,0x02,0x40,0x01,0x80,
0x03,0xc0,0x01, 0x00,0x07,0xe0,0x02, 0x00,0x3f,0xfc,0x04, 0x00,0x0f,0xf0,0x10,0x80,
0x20,0x80,0x40, 0x80,0x80,0x80,0x00, 0x80,0x0f,0xfc,0x03, 0x80,0x02,0x40,0x04,0x20,
0x08,0x10,0x10, 0x08,0x21,0x04,0x40, 0x82,0x80,0x41,0x0f, 0xf8,0x00,0x10,0x00,0x20,
0x00,0x40,0x00, 0x80, 0x01, 0x00,0x02,0x00,0x04,0x00,
0x0f,0xf0,0x01, 0x80, 0x01, 0x80,0x01,0x80,0x01,0x80,
0xff,0xff,0x01, 0x80,0x01,0x80,0x01, 0x80,0x02,0x40,0x04, 0x20,0x08,0x10,0x10,0x08,
0x20,0x04,0x40, 0x02,0x80,0x01,0xff, 0xfe,0x80,0x02,0x80, 0x02,0xc1,0x86,0xa2,0x4a,
0x94,0x32,0x98, 0x32,0x94,0x4a,0xa2, 0x86,0xc1,0x02,0x80, 0x02,0x80,0x02,0x80,0x02,
0x80,0x0a,0x80, 0x06,0x80,0x02,0x08, 0x10,0x10, 0x20, 0x20,0x40,0x44,0x80,0x81,
0xfc,0xf9,0x08, 0x10,0x90,0x20,0x60, 0x48,0x60, 0xf4, 0x90,0x09,0x08,0x12,0xfc,
0x24,0x8a,0x48, 0x89,0x80,0x88,0x00, 0xf8,0x00, 0x00, 0x08,0x80,0x09,0x00,0x0a,
0x00,0x0c,0x00, 0xff,0xff,0x0c,0x00, 0x0a,0x00,0x09,0x00, 0x08,0x80,0x08,0x40,0x08,
0x20,0x08,0x10, 0x0a,0x08,0x0c,0x04, 0x08,0x00,0x40,0x00, 0x27,0xff,0x70,0x10,0x90,
0x10,0x10,0x10, 0x10,0x10,0x10,0x1e, 0x10,0x10,0x11,0x10, 0x11,0x10,0x11,0x10,0x11,
0x10,0x11,0x10, 0x15, 0x10, 0x19,0x10,0x17,0xff,0x00,
0xff,0x00,0x81, 0x00, 0x81, 0xfc,0xff,0x84,0x81,0x84,
0x81,0x84,0x81, 0xfc,0xff,0x84,0x81,0x84,0x81,0x84,0x81,0xfc, 0x81,0x00,0x81,0x01,0x05,
0x02,0x03,0x04, 0x01,0x10,0x20,0x40,0x20,0x23,0xff,0xfd,0x02, 0x08,0x84,0x10,0x48,0x20,
0x30,0x40,0x30, 0xfc,0x48,0x08,0x84,0x11,0x02,0x22,0x01,0x44, 0x01,0x80,0x00,0x80,0x00,
0xff,0xff,0xff, 0xff,0x03,0x80,0x05,0x40,0x09,0x20,0x11,0x10, 0x21,0x08,0x41,0x04,0x81,
0x02,0x81,0x01, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x01,0x00,
0xff,0xff,0x00, 0x10,0x00,0x10,0x3f,0x10,
0x21,0x10,0x21, 0x10,0x21,0x10,0x21,0x10,
0x3f,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x90,0x00,0x50,0x00,0x30,0x00,0x30,0x10,0x32,0x20,0x44,0x48,0x48,
0x84,0x50,0xfe,0x61,0x00,0x41,0xfe,0x7f,0x81,0x00,0xfe,0x40,0x82,0x42,0x82,0x44,0xfe,0x48,0x82,
0x50,0x82,0x61,0x8a,0x41,0x86,0x7f,0xfc,0x04,0x88,0x08,0x91,0xff,0xa0,0x20,0xc0,0x40,0xfc,0x90,
0x89,0xff,0x90,0x10,0xa0,0x10,0xc0,0x94,0x81,0x12,0x82,0x11,0x80,0x10,0x80,0x10,0x80,0x50,0x80,
0x30,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,0x01,0x41,0x02,0x21,0x04,0x11,0x08,0x00,0x00,
0xff,0xff,0x04,0x40,0x08,0x20,0x10,0x10,0x20,0x08,0x40,0x04,0x80,0x02,0x0c,0x00,0x18,0x40,0x28,
0x44,0x48,0x48,0x88,0x50,0x08,0x61,0x08,0xc1,0x08,0x7f,0x01,0x00,0xff,0xff,0x01,0x00,0x01,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,};

unsigned char *c,*p,num[512];
int i,j,k,a,b,xx;
long int d;
c=cc_code_data;
c+=32*no;
p=num;
for(i=0;i<16;i++)
{
for(j=0;j<2;j++)
{
a=*c++;d=0;
for(k=0;k<8;k++)
{
if(a&128)d+=7;
a<<=1;d<<=3;
}
d>>=3;*p=*(p+6)=*(p+12)=d>>16;
b=d;
p++;
*p=*(p+6)=*(p+12)=b>>8;
p++;
*p=*(p+6)=*(p+12)=b&255;
p++;
}
p+=12;
}
p=num;xx=x;
for(i=0;i<16*3;i++)
{
for(j=0;j<2*3;j++)
{
a=*p++;
for(k=0;k<8;k++)
{
if(a&128)putpixel(x,y,color);a<<=1;x++; if(h==1)delay(50);
}}x=xx;y++;}


}



void DELAY(int clicks)
{
unsigned int far *clock=(unsigned int far *)0x0000046CL;
unsigned int now;
now=*clock;
while(abs(*clock-now)<clicks){}

}



void first_character(void)
{display(50,100,0,11,0);DELAY(30);
display(80,100,1,10,0);DELAY(10);
display(110,100,1,10,0);DELAY(10);
display(140,100,2,11,0);DELAY(3);
display(200,100,3,15,0);DELAY(3);
display(260,100,4,15,0);DELAY(3);
display(320,100,5,15,0);DELAY(3);
display(50,100,0,10,0);DELAY(2);
display(80,100,1,10,0);DELAY(2);
display(110,100,1,10,0);DELAY(2);
display(140,100,2,10,0);DELAY(2);
display(200,100,3,14,0);DELAY(2);
display(260,100,4,14,0);DELAY(2);
display(320,100,5,14,0);DELAY(2);
display(360,100,9,9,0);DELAY(2);
display(380,100,9,9,0);DELAY(2);
display(400,100,9,9,0);DELAY(2);
display(420,100,9,9,0);DELAY(2);
display(440,100,9,9,0);DELAY(2);
cleardevice();}




void second_character(void)
{
int i;

display(90,100,6,2,0);DELAY(2);
display(150,100,7,2,0);DELAY(2);
display(210,100,8,2,0);DELAY(2);
display(270,100,1,15,0);DELAY(2);
display(310,100,10,15,0);DELAY(2);
display(360,100,11,2,0);DELAY(2);
display(30,200,12,2,0);DELAY(2);
display(90,195,13,2,0);DELAY(2);
display(140,199,14,2,0);DELAY(2);
display(200,196,15,2,0);DELAY(2);
}
void third_character(void)
{
int i,k=4;
for(i=1;i<=2;i++)
{display(30,280,17,k,1);
display(90,280,18,k,1);
display(150,284,12,k,1);
display(213,283,19,k,1);
display(280,283,25,k,1);
display(345,282,21,k,1);
display(405,282,22,k,1);
display(470,284,23,k,1);
display(535,284,24,k,1);
display(30,370,16,k,1);
display(90,370,18,k,1);
display(150,370,12,k,1);
display(213,370,19,k,1);
display(280,370,20,k,1);
display(345,370,21,k,1);
display(405,370,22,k,1);
display(470,370,23,k,1);k=14;
}
cleardevice();
}

void fourth(void)
{
int i ;
for(i=0;i<2;i++)
display(20,60,26,10,1);
display(83,60,27,10,1);
display(150,60,16,10,1);
display(219,60,28,10,1);
display(285,62,29,10,1);
display(340,60,1,15,1);
display(373,60,10,15,1);
display(405,60,0,15,1);
display(455,65,12,10,1);
display(520,63,30,10,1);
display(18,160,31,10,1);
display(83,162,32,10,1);
display(190,163,33,15,1);
display(258,163,24,15,1);
display(331,165,34,15,1);
display(400,165,35,15,1);
display(470,164,36,15,1);

for(i=0;i<5;i++)
display(543,164,21,15,1);}

void move1(void)
{

int gdriver,gmode;
gdriver=VGA;
gmode=VGAHI;
initgraph(&gdriver,&gmode,"c://turboc2");

first_character();

second_character();

third_character();

fourth();

}




void Blit_Char(int xc,int yc,char c,int color,int trans_flag)
{int offset,x,y;char far *work_char;
unsigned char bit_mask=0x80;
work_char=rom_char_set+c*8;
offset=(yc<<8)+(yc<<6)+xc;
for(y=0;y<8;y++){bit_mask=0x80;
for(x=0;x<8;x++){
if((*work_char&bit_mask))
video_buffer[offset+x]=color;
else if(!trans_flag)
video_buffer[offset+x]=0;
bit_mask=(bit_mask>>1);}offset+=320;work_char++;}}
void Blit_String(int x,int y,int color,char *string,int trans_flag){int index;
for(index=0;string[index]!=0;index++){Blit_Char(x+(index<<3),y,string[index],color,trans_flag);}}
void
Set_Video_Mode(int mode){ union REGS inregs,outregs;inregs.h.ah=0;inregs.h.al=(unsigned char)mode;int86(0x10,&inregs,&outregs);}


void show_east_character()
{
Set_Video_Mode(19);
Blit_String(90,100,5,"So Said So Done ",1);
DELAY(40);


closegraph();
}





void character(int x,int y,int bei_shu)
{
int i=9;
char *cici[]={"1","2","3","4","5","6","7","8","9","10"};

settextjustify(CENTER_TEXT,CENTER_TEXT);
settextstyle(DEFAULT_FONT,HORIZ_DIR,bei_shu);
outtextxy(x,y,cici[9]);DELAY(20);
for(;i>=0;i--)
{
setcolor(i+38);

outtextxy(x,y,cici);
DELAY(7);
cleardevice();
}


}












main()
{


int gdriver,gmode,i;
void linux(void);
void(*p)();

/*
move1();
show_east_character();
*/

gdriver=DETECT;gmode;
registerbgidriver(IBM8514_driver);
initgraph(&gdriver,&gmode,"c://turboc2");
character(320,200,15);

p=linux;
(*p)();














}





void wall(int x){setcolor(7);setfillstyle(1,7);bar(0,0,317+x,480);bar(321-x,0,640,480);}
void camellialinux(void){if(action>=12){while(well<=320.0){line(well,280,well,ik);line(well,
0,well,ij);if(action>=8)if(action>=30)if(action>=32){ik-=0.35;ij+=0.35;}else;else{ ik-=0.59;
ij+=0.59;}well+=0.5;}}}void image(void){int i=250;setcolor(7);setfillstyle(1,7);setcolor(0);
setlinestyle(0,1,1);for(;i>180;i--){action++;DELAY(1);putimage(i,80,buf,COPY_PUT);well=318;
camellialinux();DELAY(0.3);}}void linux(void){static int c[10];int *num[10]={&c[0],&c[1],&c[2],
&c[3],&c[4],&c[5],&c[6],&c[7],&c[8],&c[9]};int **p,i=0;int x=3;wall(0);{int a[]={293,80,277,130,
277,230,293,280,327,280,343,230,343,130,327,80,293,80};int b[]={298,85,282,135,282,225,298,275,
322,275,337,225,338,135,322,85,298,85};setcolor(24);setfillstyle(1,24);fillpoly(9,a);setcolor(34);
setfillstyle(1,34);fillpoly(9,b);}setcolor(20);setfillstyle(1,24);bar(360,155,410,205);setcolor(1);
circle(310,180,60);setfillstyle(1,1);floodfill(310,180,1);setcolor(25);circle(310,180,53);setfillstyle
(1,25);floodfill(310,180,25);setcolor(43);setfillstyle(1,43);bar(270,160,350,206);setcolor(31);
rectangle(270+5,160+5,350-5,206-5);setfillstyle(1,31);floodfill(300,190,31);setcolor(1);rectangle
(270+5,160+5,350-5,206-5);setcolor(41);while(x<=24){moveto(276+10,158+x+10);linerel(0,2);moveto(
276+10+23,158+x+10);linerel(0,2);moveto(276+10,158+x+10);linerel(23,0);x+=3;}moveto(276+10,158+x
+10);linerel(23,0);setlinestyle(0,1,1);setcolor(1);moveto(270,160);linerel(5,5);moveto(350,206);
linerel(-5,-5);moveto(270,206);linerel(5,-5);moveto(350,160);linerel(-5,5);{int j=0,i,z=20,*p,y=
green;p=&i;while(j<11){if(z%2==0)*p=zi;else *p=42;setfillstyle(1,*p);bar(324,175,335,179);if(j==
10)y=RED;setfillstyle(1,y);bar(324,185,335,189);DELAY(10);z--;j++;}}p=num;while(i<39){**p=410-i;
**(p+1)=155;**(p+2)=410-i;**(p+3)=205;**(p+4)=420;**(p+5)=205;**(p+6)=420;**(p+7)=155;**(p+8)=410
;**(p+9)=155;i+=1;DELAY(1);setcolor(7);setfillstyle(1,7);fillpoly(5,c);}{int i=320,*p,count=1;p=&
i;setcolor(7);while(count<=8){arc(*p-count,180,320,40,60);count++;DELAY(2);}}size1=imagesize(255,
80,385,280);buf1=malloc(size1);getimage(255,80,385,280,buf1);size=imagesize(250,80,380,280);buf=
malloc(size);size=setgraphbufsize(99999999);getimage(250,80,374,280,buf);image();cleardevice();{int
q=180,free0=0;static int ic[10];int *num[10]={&ic[0],&ic[1],&ic[2],&ic[3],&ic[4],&ic[5],&ic[6],&ic[
7],&ic[8],&ic[9]};int **p;i=0;p=num;wall(0);while(i<323){putimage(q,80,buf,COPY_PUT);**p=318-i;**(p+
1)=0;**(p+2)=318-i;**(p+3)=480;**(p+4)=320+i;**(p+5)=480;**(p+6)=320+i;**(p+7)=0;**(p+8)=318-i;**(p+
9)=0;q-=2;setcolor(0);setfillstyle(1,0);fillpoly(5,ic);if(i>=179)if(i>=181){size2=imagesize(2,80,
130,280);buf2=malloc(size2);getimage(2,80,130,280,buf2);putimage(0,80,buf2,COPY_PUT);free(buf2);}else
if(free0==0){free(buf);free0=1;}i+=2;}}}







/********************************第一段****************************************/
/********************************第一段****************************************/
/********************************第一段****************************************/
/********************************第一段****************************************/
/********************************第一段****************************************/



#include<graphics.h>
#include<io.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<bios.h>
#include<mem.h>
#include<fcntl.h>
#include<stdlib.h>
#include<conio.h>
#include<process.h>


int finall_count=0;
int ilinex1=265; int change_iline_floor=0; int screen_count=0;



float up_newline_screen=0; /*线行内步增量参数 */
float up_newline_1=0;




int iline2x1=267; int iline2y1=198; int change_iline_floor1=0;

int iline2x2=363,iline2y2=198; int up_line=0;



float iline_d1=269; /*地面线*/
float iline_d11=365;


float iline_d2=271; /*地面线(白)*/
float iline_d22=363;


float interface_door_count=0; /* 门入口线渐变变量 */
float interface_door_count_fast=0;
float interface_door_special=0;



float iline_leftt=114; /*左边线*/
float iline_leftt2=200;
float iline_leftt3=114;
float iline_leftt4=198;



float iline_left2=113; /*右边线*/
float iline_left22=200;
float iline_left3=114;
float iline_left4=200;


int iline_main=180; /*线性之差内部变量*/

/********************************************* 开始线性渐变变量 ********************************************************/

float wall_change_line_control=640; /*右上角线 */
float wall_change_line_controlx=0;


float wall_change_line_control1=0; /*左上角线 */
float wall_change_line_control1x=0;

float wall_change_line_controlY=0; /* 右边竖线 */
float wall_change_line_controlL_Y=0; /* 左边竖线 */


float fdoor_count=0; /* 门口既增量 */
/************************************************* 最后判断 ************************************************************/
int last_left=1;
int yellow_thing=0;
/***********************************************************************************************************************/



void DELAY(int clicks)
{
unsigned int far *clock=(unsigned int far *)0x0000046CL;
unsigned int now;
now=*clock;
while(abs(*clock-now)<clicks){}
}







void wall_change_line(void) /*右边墙上角线渐变 */
{



if (wall_change_line_control>=450)
{
setcolor(7);
setlinestyle(0,1,3);

line
(
326+wall_change_line_controlx,
131-wall_change_line_controlx,
wall_change_line_control,
0
);

if(up_line % 4==0)
wall_change_line_controlx+=0.5;

wall_change_line_control-=2;


}

}






void wall_change_line_left(void) /*左上角线 */
{


if (wall_change_line_control1<=180)
{
setcolor(7);
setlinestyle(0,1,3);

line
(
304-wall_change_line_control1x,
131-wall_change_line_control1x,
wall_change_line_control1,
0
);

if(up_line % 4==0)
wall_change_line_control1x+=0.5;

wall_change_line_control1+=2;

}
}



/***************************************************************************************************************************/





void if_change_1(void) /* 第一组线复位 及 重合*/
{




if (up_newline_1==180)
{

while (iline_main<=183)
{


/**********************底边线变**********************/

setcolor(15);
setlinestyle(0,1,1);
if(finall_count %1==0)iline_d2-=0.97;
if(finall_count %1==0)iline_d22+=0.97;
line
(

iline_d2, /*271*/

198+iline_main,

iline_d22, /*363*/

198+iline_main

);


/********************左边线变***********************/
setcolor(7);
setlinestyle(0,1,1);

if(finall_count %4==0)iline_leftt3-=0.79+wall_change_line_controlL_Y;
if(finall_count %1==0)iline_leftt2+=1;
line(
267-iline_main,
iline_leftt3,

267-iline_main,

iline_leftt4
);



/*********************右边线变**********************/


setcolor(7);
setlinestyle(0,1,1);

if((finall_count<=2)&&(finall_count %4==0))iline_left3-=0.001;
if((finall_count %4 ==0) && (finall_count>=4) )iline_left3-=0.78+wall_change_line_controlY;

if(finall_count %1==0)iline_left4+=1;
line(

363+iline_main,



iline_left3, /*114*/

363+iline_main,

iline_left4
);




/**************************************************************************************************************************/




/*这里就运行多三次了,所以下次要加多3 */




iline_main+=1;

}

setcolor(7);
setlinestyle(0,1,1);












iline_main=180; /* 记得最后要修改啊醒目仔 */

iline_leftt=114; /*左边线*/
iline_leftt2=200;
iline_leftt3=114;
iline_leftt4=198;



iline_left2=113; /*右边线*/
iline_left22=200;

iline_left3=114;
iline_left4=200;


iline_d1=269; /*地面线*/
iline_d11=365;

iline_d2=271;
iline_d22=363;

change_iline_floor=0;
change_iline_floor1=0;

up_newline_1=0;

up_line++; /* 因为运行这个涵数时,就是进行线条最后的一次重合,所以up_line要运行多一次 */

}


}




/**************************************************************************************************************************/















void line_change_floor(void)
{

if(up_line>=960){up_line=0;last_left=0;}

if(up_newline_screen>=925)up_newline_screen=0;



if_change_1(); /*第一组线复位*/



/* 开始判断啦 */


if
(

(up_line>=200&&up_line<=380) ||


(up_line>=460&&up_line<=640) ||



(up_line>=780&&up_line<=960)




)
{





/***************************底面线***************************/
setcolor(1);
setlinestyle(0,1,1);

if(finall_count %1==0)iline_d1-=0.97;
if(finall_count %1==0)iline_d11+=0.97;
line
(
iline_d1,/*269*/
200+up_newline_1,
iline_d11,/*365*/
200+up_newline_1
);




setcolor(15);
setlinestyle(0,1,1);
if(finall_count %1==0)iline_d2-=0.98;
if(finall_count %1==0)iline_d22+=0.97;
line
(
iline_d2,/*271*/
198+up_newline_1,
iline_d22,/*363*/
198+up_newline_1
);


/*************************左边线***************************/



setcolor(1);
setlinestyle(0,1,1);
if(finall_count %4==0)iline_leftt-=0.79+wall_change_line_controlL_Y;
if(finall_count %1==0)iline_leftt2+=1;
line
(
265-up_newline_1,
iline_leftt,
265-up_newline_1,
iline_leftt2
);



setcolor(7);
setlinestyle(0,1,1);
if(finall_count %4==0)iline_leftt3-=0.78+wall_change_line_controlL_Y;
if(finall_count %1==0)iline_leftt4+=1;
line
(
267-up_newline_1,
iline_leftt3,
267-up_newline_1,
iline_leftt4
);


wall_change_line_controlL_Y+=0.00030;

if(wall_change_line_controlL_Y>=0.79100)wall_change_line_controlL_Y=0.79100;


/***********************右边线*****************************/



if(last_left==1)
{


setcolor(1);
setlinestyle(0,1,1);
if(finall_count %4==0)iline_left2-=0.7+wall_change_line_controlY;
if(finall_count %1==0)iline_left22+=1;

line
(
365+up_newline_1,
iline_left2, /*112*/
365+up_newline_1,
iline_left22 /*200*/
);



setcolor(7);
setlinestyle(0,1,1);


if((finall_count<=2)&&(finall_count %4==0))iline_left3-=0.001;
if((finall_count %4 ==0) && (finall_count>=4) )iline_left3-=0.78+wall_change_line_controlY;

if(finall_count %1==0)iline_left4+=1;
line
(
363+up_newline_1,
iline_left3,
363+up_newline_1,
iline_left4
);







wall_change_line_controlY+=0.00048;



if(wall_change_line_controlY>=0.900002)wall_change_line_controlY=0.900002;

}

up_newline_1++;

}







/**************************************************************************************************************************/

















up_line++;



change_iline_floor+=1;/*地下蓝线*/
change_iline_floor1+=1; /*地下白线*/






}



void door(void)/*******************门**********************/
{




static int idoor[10];

int *num_idoor[10]={&idoor[0],&idoor[1],&idoor[2],&idoor[3],&idoor[4],
&idoor[5],&idoor[6],&idoor[7],&idoor[8],&idoor[9]};

int **p_idoor=num_idoor;



**p_idoor=305;
**(p_idoor+ 1)= 130;


**(p_idoor+ 2)= 305;
**(p_idoor+ 3)= 160;


**(p_idoor+ 4)= 325;
**(p_idoor+ 5)= 160;


**(p_idoor+ 6)= 325;
**(p_idoor+ 7)= 130;


**(p_idoor+ 8)= 305;
**(p_idoor+ 9)= 130;



setcolor(25);
setfillstyle(1,25);
fillpoly(5,idoor);







}


void door_come(void)
{

setcolor(25);
setlinestyle(0,1,1);
rectangle
(
305-fdoor_count,
130-fdoor_count,
325+fdoor_count,
160+fdoor_count
);
/*line(0,140,300,140);*/


fdoor_count+=0.03;
}




void interface_door(void) /*门入口 */
{

static int iinterface_door[10];
static int iinterface_door_under[8];

int *num_iinterface_door[10]=
{
&iinterface_door[0],&iinterface_door[1],&iinterface_door[2],&iinterface_door[3],&iinterface_door[4],
&iinterface_door[5],&iinterface_door[6],&iinterface_door[7],&iinterface_door[8],&iinterface_door[9]};

int *num_iinterface_door_under[8]=
{
&iinterface_door_under[0],&iinterface_door_under[1],&iinterface_door_under[2],
&iinterface_door_under[3],&iinterface_door_under[4],&iinterface_door_under[5],
&iinterface_door_under[6],&iinterface_door_under[7]
};


int **p_door;
int **p_door_under;



p_door=num_iinterface_door;

p_door_under=num_iinterface_door_under;

**p_door=331+interface_door_count;
**(p_door+ 1)= 135-interface_door_count;


**(p_door+ 2)= 341+interface_door_count_fast;
**(p_door+ 3)= 130-interface_door_special; /*重要边界 0.16则会溢出*/


**(p_door+ 4)= 341+interface_door_count_fast;
**(p_door+ 5)= 166+interface_door_count;

**(p_door+ 6)= 331+interface_door_count;
**(p_door+ 7)= 166+interface_door_count;

**(p_door+ 8)= 331+interface_door_count;
**(p_door+ 9)= 135+interface_door_count;

setcolor(8);
setfillstyle(1,8);
fillpoly(5,iinterface_door);




/***************************************门下的三角形*************************************************/


**p_door_under=331+interface_door_count;
**(p_door_under+ 1)= 166+interface_door_count;


**(p_door_under+ 2)= 341+interface_door_count_fast;
**(p_door_under+ 3)= 180+interface_door_count_fast;

**(p_door_under+ 4)= 341+interface_door_count_fast;
**(p_door_under+ 5)= 166+interface_door_count;

**(p_door_under+ 6)= 331+interface_door_count;
**(p_door_under+ 7)= 166+interface_door_count;


setcolor(15);
setfillstyle(1,15);
fillpoly(4,iinterface_door_under);





/*************************************竖线复盖**********************************************************/



setcolor(7);
setlinestyle(0,1,1);
line
(
330+interface_door_count,
136-interface_door_count,
330+interface_door_count,
166+interface_door_count

);



interface_door_count+=0.08;

interface_door_count_fast+=0.16;

if(interface_door_special>=30)
if(interface_door_special>=70)
if(interface_door_special>=90)
{interface_door_special+=0.2;}
else
{interface_door_special+=0.3;}

else

{interface_door_special+=0.159;}

else


interface_door_special+=0.11;


}









void test(void)
{

float left_test=145;
float left_test1=145;
float left_test2=145;
float line_test=145;

float neibu_wall_thing=145;
float neibu_wall_thing_line=145;

/*
int wall_change1=295;
int wall_change2=295;
*/

/**********************************墙边渐变*************************************************/

static int iwall_change[10];
int *num_wall_change[10]={&iwall_change[0],&iwall_change[1],&iwall_change[2],&iwall_change[3],&iwall_change[4],
&iwall_change[5],&iwall_change[6],&iwall_change[7],&iwall_change[8],&iwall_change[9]};


int **wall_change;

int iwall_count=0;
float line_count=0;


wall_change=num_wall_change ; /*墙渐变*/



/********************************************** 最外部循环 **************************************************************/


while(finall_count<=1000)
{

if(finall_count==650)
{

yellow_thing++;
neibu_wall_thing-=3;

if(neibu_wall_thing<=108)neibu_wall_thing=108;




finall_count=0;

iwall_count=finall_count; /*当finall_count运行完一次之后就复位为0传给 iwall_count */






neibu_wall_thing_line-=2.7;
if(neibu_wall_thing_line<=112)neibu_wall_thing_line=112;

line_test=neibu_wall_thing_line;



line_count=0;


left_test1=neibu_wall_thing;
left_test2=neibu_wall_thing;
left_test=neibu_wall_thing;




}

if(yellow_thing<=3)

{
/************** 1 ****************/
**wall_change=270-iwall_count;
**(wall_change+ 1)= left_test1; /* 145 */
if(iwall_count %3==0)
left_test1=**(wall_change+ 1)=left_test1-2;


/************** 2 ****************/
**(wall_change+ 2)= 270-iwall_count;
**(wall_change+ 3)= 150+iwall_count;




/************** 3 ****************/
**(wall_change+ 4)= 265-iwall_count;
**(wall_change+ 5)= 155+iwall_count;



/************** 4 ****************/
**(wall_change+ 6)= 265-iwall_count;
**(wall_change+ 7)=left_test;
if(iwall_count %3==0)
left_test=**(wall_change+ 7)=left_test-2;



/************** 5 ****************/
**(wall_change+ 8)= 270-iwall_count;
**(wall_change+ 9)=left_test2;
if(iwall_count %3==0)
left_test2=**(wall_change+ 9)=left_test2+2;




setcolor(30);
setfillstyle(1,30);
fillpoly(5,iwall_change);




/*********************************线条的覆盖****************************/


setcolor(7);
setlinestyle(0,1,1);


if(iwall_count %3==0)line_test-=1.2;
line(280-line_count,line_test,280-line_count,150+line_count);

line_count+=1;


}




/********************************变量递增*******************************/

iwall_count+=2;
finall_count+=2;






/*********************************************************************/
/*********************************************************************/
/******************************线性渐变*******************************/

line_change_floor();








/*****************************墙开始渐变******************************/



if( up_line % 30==0)
{

wall_change_line();

wall_change_line_left();



}


if(up_line % 4==0)
{

door_come();
interface_door();
}





/* getch(); */

} /* 循环体内 */



}

/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/




void right_wall(void)
{


/*************************************右侧墙*****************************************************/
static int iright_wall[10];

int *num_right_wall[18]={&iright_wall[0],&iright_wall[1],&iright_wall[2],&iright_wall[3],&iright_wall[4],
&iright_wall[5],&iright_wall[6],
&iright_wall[7],&iright_wall[8],&iright_wall[9]
};

int **right_wall;

right_wall=num_right_wall;/*右侧墙*/

/*******************右侧墙********************/
**right_wall=640;
**(right_wall+ 1)= 0;


**(right_wall+ 2)= 326;
**(right_wall+ 3)= 130;

**(right_wall+ 4)= 326;
**(right_wall+ 5)= 160;

**(right_wall+ 6)= 640;/* */
**(right_wall+ 7)= 480;

**(right_wall+ 8)= 640;
**(right_wall+ 9)= 0;






setcolor(7);
setfillstyle(1,7);
fillpoly(5,iright_wall);




}





void terra(void) /* 地面 */
{


/***********************************地面****************************************************/

static int ifloor[10];
int *num_floor[10]={&ifloor[0],&ifloor[1],&ifloor[2],&ifloor[3],&ifloor[4],
&ifloor[5],&ifloor[6],&ifloor[7],&ifloor[8],&ifloor[9]};

int **floor;

floor=num_floor; /*地面*/

cleardevice();
/*******************地面*********************/

**floor=0;
**(floor+ 1)= 480;

**(floor+ 2)= 200;
**(floor+ 3)= 160;


**(floor+ 4)= 340;
**(floor+ 5)= 160;

**(floor+ 6)= 640;
**(floor+ 7)= 480;

**(floor+ 8)= 0;
**(floor+ 9)= 480;

setcolor(15);
setfillstyle(1,15);
fillpoly(5,ifloor);



}
























void start_moive(void)
{



/*******************************大的灯************************************************************/
static int ilight[21];

int *num_light[21]={&ilight[0],&ilight[1],&ilight[2],&ilight[3],&ilight[4],&ilight[5],&ilight[6],
&ilight[7],&ilight[8],&ilight[9],&ilight[10],&ilight[11],&ilight[12],&ilight[13],&ilight[14],
&ilight[15],&ilight[16],&ilight[17],&ilight[18],&ilight[19],&ilight[20]};






/************************************左侧墙****************************************************/
static int ileft_wall[10];

int *num_left_wall[10]={&ileft_wall[0],&ileft_wall[1],&ileft_wall[2],&ileft_wall[3],&ileft_wall[4],
&ileft_wall[5],&ileft_wall[6],&ileft_wall[7],&ileft_wall[8],&ileft_wall[9]};






int iwall_count=0;
float line_count=0;


int **p_light;





int **left_wall;







/********************左侧墙********************/

left_wall=num_left_wall;

**left_wall=0;
**(left_wall+ 1)= 0;


**(left_wall+ 2)= 0;
**(left_wall+ 3)= 480;


**(left_wall+ 4)= 305;
**(left_wall+ 5)= 160;


**(left_wall+ 6)= 305;
**(left_wall+ 7)= 130;


**(left_wall+ 8)= 0;
**(left_wall+ 9)= 0;



setcolor(7);
setfillstyle(1,7);
fillpoly(5,ileft_wall);










/********************灯*******************/
p_light=num_light;



**p_light=310;
**(p_light+1 )=10;


**(p_light+ 2)=310;
**(p_light+ 3)=20;



**(p_light+ 4)=285;
**(p_light+ 5)=20;



**(p_light+ 6)= 265;
**(p_light+ 7)= 50;


**(p_light+ 8)= 265;
**(p_light+ 9)=60;


**(p_light+ 10)=365;
**(p_light+ 11)=60;



**(p_light+ 12)=365;
**(p_light+ 13)=50;


**(p_light+ 14)=345;
**(p_light+ 15)=20;


**(p_light+ 16)=320;
**(p_light+ 17)=20;


**(p_light+ 18)=320;
**(p_light+ 19)=10;


**(p_light+ 20)=310;
**(p_light+ 21)=10;


setcolor(10);
setfillstyle(1,10);
fillpoly(10,ilight);

setcolor(15);
setlinestyle(0,1,1);
arc(315,40,220,320,30);

line(293,60,336,60);

setfillstyle(1,15);
floodfill(316,61,15);


/*在圆弧上画一条线以便可以用floodfill填充来防止颜色溢出*/







































}




main()
{

int gdriver,gmode,i;

gdriver=DETECT;gmode;
registerbgidriver(IBM8514_driver);
initgraph(&gdriver,&gmode,"c://turboc2");
cleardevice();
setbkcolor(8);

/*den_shan();*/



terra(); /*地面 */

start_moive();



right_wall(); /*右侧墙 */




interface_door();/*门入口 */


door();
getch();

test();

}


这里有两段代码是实现了三维的动画,是用C里面的<graphics.h>做的.
对于我这个垃圾大学一年级的班长来说,对着全同学说,我们学了半个学期,
下学期就用C来做个作品跟高年级的比赛,看谁能够拿到校软件比赛第一,

那C来为班争光真不是一件简单的工作,花了5个小时我做了39个汉字字模,为的可以在台上讲出一句话:本作品脱离了汉字平台.用中断号来启动图形模式,用rom*8调用西文字库.
在只学了半学期的C,用想象力编三维动画.(第二个程序就是一个画面).但最后有人说了一句:<graphics.h>落后了,学了也没有,浪费时间.......我没有流眼泪,因为已经没有流眼泪的功能......我没有办法知道它是怎么落后的,更没有办法知道什么东西不是落后的......
特意发此贴希望有心人能够帮助我这个迷了路的大一学生.
距离大二的日子还有二十几天,我........不知道该怎么做....开学怎么对同学说:"i can't do that" .LINUXCICI这个很好听的名字,因为叫linux只因它是一个很稳固的系统,就如我想很坚强一样,但........真的能做到吗?
 
#include<graphics.h>


#include<io.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<bios.h>
#include<mem.h>
#include<fcntl.h>
#include<stdlib.h>
#include<conio.h>
#include<process.h>
#define zi 45

#define green 19



float well=318.0;
int action=1;
float ik=279.5,ij=80.0;

int size,size1,size2;

void *buf,*buf1,*buf2;


unsigned char far *video_buffer=(char far *)0xA0000000L;
unsigned char far *rom_char_set=(char far *)0xF000FA6EL;



void display(int x,int y,int no,int color, int h)
{


static unsigned char cc_code_data[1280]=
{
0x07,0xc0,0x08,0x20,0x10,0x10,0x10,0x10, 0x10,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x02,0x00,
0x04,0x00,0x08,0x00,0x10,0x00,0x10,0x00, 0x10,0x00,0x10,0x00,0x1f,0xf0,0x07,0xe0,0x08,0x10,
0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10, 0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,
0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10, 0x07,0xe0,0x07,0xe0,0x08,0x20,0x08,0x00,0x08,0x00,
0x08,0x00,0x08,0x00,0x0f,0xc0,0x00,0x20, 0x00,0x20,0x00,0x20,0x00,0x20,0x08,0x20,0x08,0x20,
0x08,0x20,0x08,0x20,0x0f,0xc0,0x04,0x00, 0x0f,0xfc,0x10,0x80,0x27,0xf0,0x44,0x80,0x04,0x80,
0x04,0x80,0xff,0xff,0x00,0x80,0x00,0x80, 0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x00,0x80,0x04,0x20,0x04,0x20,0x04,0x20, 0x04,0x20,0x3f,0xfc,0x04,0x20,0x07,0xe0,0x04,0x20,
0x07,0xe0,0x01, 0x00,0x7f,0xfe,0x05,0x80,
0x09,0x40,0x11, 0x20,0x21,0x18,0x41,0x04,
0x00,0x00,0x00, 0x00,0x0f,0xf0,0x08, 0x10,0x08,0x10,0x08, 0x10,0x08,0x10,0x0f,0xf0,
0x08,0x10,0x08, 0x10,0x08,0x10,0x08, 0x10,0x08,0x10,0x08, 0x10,0x0f,0xf0,0x00,0x00,
0x00,0x40,0x00, 0x80,0x01,0x00,0xff, 0xff,0x04,0x00,0x07, 0xf0,0x0c,0x10,0x17,0xf0,
0x24,0x10,0x44, 0x10,0x87,0xf0,0x04, 0x10,0x04,0x10,0x04, 0x50,0x04,0x30,0x04,0x10,
0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,
0x3f,0xfc,0x00, 0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x10,0x80,0x10,0x00,0x30,0x00, 0xd7,0xfc,0x11,0x10,0x11,0x10,0x11,0x10,0x11,0x10,
0x11,0x10,0x11,0x10,0x11,0x10,0x11,0x10, 0x11,0x10,0x11,0x10,0x17,0xfc,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,0x80, 0x03,0x80,0x00,0xc0,0x01,0x40,0x02,0x40,0x04,0x40,
0x08,0x40,0x10,0x40,0x20,0x40,0x20,0x40, 0x3f,0xf8,0x00,0x40,0x00,0x40,0x00,0x40,0x00,0x40,
0x00,0x40,0x00,0x40,0x00,0x40,0x07,0xfc, 0x04,0x04,0x04,0x04,0x07,0xfc,0x04,0x00,0x08,0x40,
0x08,0x40,0x10,0x40,0x10,0x40,0x27,0xfc, 0x24,0x44,0x44,0x44,0xc7,0xfc,0x84,0x44,0x04,0x44,
0x07,0xfc,0x00,0x00,0xf8,0x9f,0x20,0x84, 0x20,0x84,0x20,0x84,0x22,0x84,0x22,0x84,0xfa,0x9f,
0x20,0x84,0x20,0x84,0x20,0x84,0x20,0x84, 0x20,0x84,0xfd,0x3f,0x00,0x00,0x00,0x00,0x03,0x00,
0x01,0x00,0x00,0x80,0x0f,0xf0,0x01,0x00, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x1f,0xf0,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00, 0x01,0x00,0x3f,0xfc,0x04,0x08,0x08,0x10,0x10,0x20,
0x30,0x60,0x50,0xa0,0x90,0x20,0x17,0xfe, 0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,
0x10,0x20,0x10,0x20,0x11,0xfc,0x00,0x00, 0x00,0x00,0x42,0x08,0x21,0x10,0x13,0xf8,0xf2,0x08,
0x12,0x08,0x13,0xf8,0x11,0x20,0x11,0x20, 0x11,0x20,0x11,0x20,0x11,0x20,0x15,0x20,0x1a,0x22,
0x14,0x22,0x08,0x3e,0x08,0x20,0x18,0x24, 0x28,0x22,0x48,0x21,0x08,0x20,0xff,0xff,0x08,0x20,
0x0c,0x20,0x08,0x24,0x18,0x24,0x28,0x28, 0x48,0x30,0x08,0x20,0x08,0x51,0x50,0x0a,0x20,0x04,
0x04,0x00,0x08,0x00,0x12,0x00,0x32,0x40, 0x52,0x40,0x97,0xfc,0x12,0x44,0x12,0x44,0x12,0x44,
0x12,0x44,0x12,0x44,0x12,0x14,0x12,0x0c, 0x12,0x01,0x12,0x01,0x13,0xff,0x09,0x00,0x11,0x00,
0x20,0x80,0x64,0x3c,0xa4,0x04,0x24,0x04, 0x24,0x04,0x24,0x04,0x24,0x04,0x24,0x04,0x24,0x04,0x24,
0x04,0x24,0x04,0x24,0x14,0x24,0x0c,0x24, 0x04,0x07,0xf0,0x04,0x10,0x07,0xf0,0x04,0x10,0x07,0xf0,
0x00,0x00,0xff,0xff,0x22,0x00,0x3e,0xfe,0x22,0x44,0x3e,0x28,0x22,0x10,0xfe,0x28,0x02,0x44,0x02,
0x82,0x02,0x00, 0x08,0xf8,0x08,0x08,0x08,
0x08,0x10,0x10, 0xfe,0x20,0x23,0xff,0x40,
0x20,0x44,0x20, 0x84,0x20,0x84,0x20,0x48,0x20,0x30,0x20,0x30, 0x20,0x48,0xa0,0x84,0x60,
0x02,0x20,0x00, 0x20,0x08,0x40,0x10,0x80,0x21,0x00,0xfd,0xfc, 0x84,0x04,0x84,0x04,0x84,
0x44,0x84,0x24, 0xfc,0x14,0x84,0x04,0x84,0x04,0x84,0x04,0x84, 0x04,0x84,0x04,0xfc,0x3c,
0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x3f,
0xfc,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x03,0x80,
0x05,0x40,0x09, 0x20, 0x11, 0x10,0x21,0x08,0x41,0x04,
0x81,0x02,0x01, 0x00, 0x01, 0x00,0x01,0x00,0x01,0x00,
0x01,0x00,0x01, 0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x03, 0xf0,0x02,0x10,0x03,0xf0,
0x02,0x10,0x03, 0xf0,0x00,0x00,0xff, 0xff,0x04,0x80,0x04, 0x80,0x08,0xf0,0x0c,0x80,
0x12,0x80,0x21, 0x80,0x40,0x80,0x80, 0x40,0x00,0x3f,0x04, 0x20,0x02,0x40,0x01,0x80,
0x03,0xc0,0x01, 0x00,0x07,0xe0,0x02, 0x00,0x3f,0xfc,0x04, 0x00,0x0f,0xf0,0x10,0x80,
0x20,0x80,0x40, 0x80,0x80,0x80,0x00, 0x80,0x0f,0xfc,0x03, 0x80,0x02,0x40,0x04,0x20,
0x08,0x10,0x10, 0x08,0x21,0x04,0x40, 0x82,0x80,0x41,0x0f, 0xf8,0x00,0x10,0x00,0x20,
0x00,0x40,0x00, 0x80, 0x01, 0x00,0x02,0x00,0x04,0x00,
0x0f,0xf0,0x01, 0x80, 0x01, 0x80,0x01,0x80,0x01,0x80,
0xff,0xff,0x01, 0x80,0x01,0x80,0x01, 0x80,0x02,0x40,0x04, 0x20,0x08,0x10,0x10,0x08,
0x20,0x04,0x40, 0x02,0x80,0x01,0xff, 0xfe,0x80,0x02,0x80, 0x02,0xc1,0x86,0xa2,0x4a,
0x94,0x32,0x98, 0x32,0x94,0x4a,0xa2, 0x86,0xc1,0x02,0x80, 0x02,0x80,0x02,0x80,0x02,
0x80,0x0a,0x80, 0x06,0x80,0x02,0x08, 0x10,0x10, 0x20, 0x20,0x40,0x44,0x80,0x81,
0xfc,0xf9,0x08, 0x10,0x90,0x20,0x60, 0x48,0x60, 0xf4, 0x90,0x09,0x08,0x12,0xfc,
0x24,0x8a,0x48, 0x89,0x80,0x88,0x00, 0xf8,0x00, 0x00, 0x08,0x80,0x09,0x00,0x0a,
0x00,0x0c,0x00, 0xff,0xff,0x0c,0x00, 0x0a,0x00,0x09,0x00, 0x08,0x80,0x08,0x40,0x08,
0x20,0x08,0x10, 0x0a,0x08,0x0c,0x04, 0x08,0x00,0x40,0x00, 0x27,0xff,0x70,0x10,0x90,
0x10,0x10,0x10, 0x10,0x10,0x10,0x1e, 0x10,0x10,0x11,0x10, 0x11,0x10,0x11,0x10,0x11,
0x10,0x11,0x10, 0x15, 0x10, 0x19,0x10,0x17,0xff,0x00,
0xff,0x00,0x81, 0x00, 0x81, 0xfc,0xff,0x84,0x81,0x84,
0x81,0x84,0x81, 0xfc,0xff,0x84,0x81,0x84,0x81,0x84,0x81,0xfc, 0x81,0x00,0x81,0x01,0x05,
0x02,0x03,0x04, 0x01,0x10,0x20,0x40,0x20,0x23,0xff,0xfd,0x02, 0x08,0x84,0x10,0x48,0x20,
0x30,0x40,0x30, 0xfc,0x48,0x08,0x84,0x11,0x02,0x22,0x01,0x44, 0x01,0x80,0x00,0x80,0x00,
0xff,0xff,0xff, 0xff,0x03,0x80,0x05,0x40,0x09,0x20,0x11,0x10, 0x21,0x08,0x41,0x04,0x81,
0x02,0x81,0x01, 0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01, 0x00,0x01,0x00,0x01,0x00,
0xff,0xff,0x00, 0x10,0x00,0x10,0x3f,0x10,
0x21,0x10,0x21, 0x10,0x21,0x10,0x21,0x10,
0x3f,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x90,0x00,0x50,0x00,0x30,0x00,0x30,0x10,0x32,0x20,0x44,0x48,0x48,
0x84,0x50,0xfe,0x61,0x00,0x41,0xfe,0x7f,0x81,0x00,0xfe,0x40,0x82,0x42,0x82,0x44,0xfe,0x48,0x82,
0x50,0x82,0x61,0x8a,0x41,0x86,0x7f,0xfc,0x04,0x88,0x08,0x91,0xff,0xa0,0x20,0xc0,0x40,0xfc,0x90,
0x89,0xff,0x90,0x10,0xa0,0x10,0xc0,0x94,0x81,0x12,0x82,0x11,0x80,0x10,0x80,0x10,0x80,0x50,0x80,
0x30,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,0x01,0x41,0x02,0x21,0x04,0x11,0x08,0x00,0x00,
0xff,0xff,0x04,0x40,0x08,0x20,0x10,0x10,0x20,0x08,0x40,0x04,0x80,0x02,0x0c,0x00,0x18,0x40,0x28,
0x44,0x48,0x48,0x88,0x50,0x08,0x61,0x08,0xc1,0x08,0x7f,0x01,0x00,0xff,0xff,0x01,0x00,0x01,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,};

unsigned char *c,*p,num[512];
int i,j,k,a,b,xx;
long int d;
c=cc_code_data;
c+=32*no;
p=num;
for(i=0;i<16;i++)
{
for(j=0;j<2;j++)
{
a=*c++;d=0;
for(k=0;k<8;k++)
{
if(a&128)d+=7;
a<<=1;d<<=3;
}
d>>=3;*p=*(p+6)=*(p+12)=d>>16;
b=d;
p++;
*p=*(p+6)=*(p+12)=b>>8;
p++;
*p=*(p+6)=*(p+12)=b&255;
p++;
}
p+=12;
}
p=num;xx=x;
for(i=0;i<16*3;i++)
{
for(j=0;j<2*3;j++)
{
a=*p++;
for(k=0;k<8;k++)
{
if(a&128)putpixel(x,y,color);a<<=1;x++; if(h==1)delay(50);
}}x=xx;y++;}


}



void DELAY(int clicks)
{
unsigned int far *clock=(unsigned int far *)0x0000046CL;
unsigned int now;
now=*clock;
while(abs(*clock-now)<clicks){}

}



void first_character(void)
{display(50,100,0,11,0);DELAY(30);
display(80,100,1,10,0);DELAY(10);
display(110,100,1,10,0);DELAY(10);
display(140,100,2,11,0);DELAY(3);
display(200,100,3,15,0);DELAY(3);
display(260,100,4,15,0);DELAY(3);
display(320,100,5,15,0);DELAY(3);
display(50,100,0,10,0);DELAY(2);
display(80,100,1,10,0);DELAY(2);
display(110,100,1,10,0);DELAY(2);
display(140,100,2,10,0);DELAY(2);
display(200,100,3,14,0);DELAY(2);
display(260,100,4,14,0);DELAY(2);
display(320,100,5,14,0);DELAY(2);
display(360,100,9,9,0);DELAY(2);
display(380,100,9,9,0);DELAY(2);
display(400,100,9,9,0);DELAY(2);
display(420,100,9,9,0);DELAY(2);
display(440,100,9,9,0);DELAY(2);
cleardevice();}




void second_character(void)
{
int i;

display(90,100,6,2,0);DELAY(2);
display(150,100,7,2,0);DELAY(2);
display(210,100,8,2,0);DELAY(2);
display(270,100,1,15,0);DELAY(2);
display(310,100,10,15,0);DELAY(2);
display(360,100,11,2,0);DELAY(2);
display(30,200,12,2,0);DELAY(2);
display(90,195,13,2,0);DELAY(2);
display(140,199,14,2,0);DELAY(2);
display(200,196,15,2,0);DELAY(2);
}
void third_character(void)
{
int i,k=4;
for(i=1;i<=2;i++)
{display(30,280,17,k,1);
display(90,280,18,k,1);
display(150,284,12,k,1);
display(213,283,19,k,1);
display(280,283,25,k,1);
display(345,282,21,k,1);
display(405,282,22,k,1);
display(470,284,23,k,1);
display(535,284,24,k,1);
display(30,370,16,k,1);
display(90,370,18,k,1);
display(150,370,12,k,1);
display(213,370,19,k,1);
display(280,370,20,k,1);
display(345,370,21,k,1);
display(405,370,22,k,1);
display(470,370,23,k,1);k=14;
}
cleardevice();
}

void fourth(void)
{
int i ;
for(i=0;i<2;i++)
display(20,60,26,10,1);
display(83,60,27,10,1);
display(150,60,16,10,1);
display(219,60,28,10,1);
display(285,62,29,10,1);
display(340,60,1,15,1);
display(373,60,10,15,1);
display(405,60,0,15,1);
display(455,65,12,10,1);
display(520,63,30,10,1);
display(18,160,31,10,1);
display(83,162,32,10,1);
display(190,163,33,15,1);
display(258,163,24,15,1);
display(331,165,34,15,1);
display(400,165,35,15,1);
display(470,164,36,15,1);

for(i=0;i<5;i++)
display(543,164,21,15,1);}

void move1(void)
{

int gdriver,gmode;
gdriver=VGA;
gmode=VGAHI;
initgraph(&gdriver,&gmode,"c://turboc2");

first_character();

second_character();

third_character();

fourth();

}




void Blit_Char(int xc,int yc,char c,int color,int trans_flag)
{int offset,x,y;char far *work_char;
unsigned char bit_mask=0x80;
work_char=rom_char_set+c*8;
offset=(yc<<8)+(yc<<6)+xc;
for(y=0;y<8;y++){bit_mask=0x80;
for(x=0;x<8;x++){
if((*work_char&bit_mask))
video_buffer[offset+x]=color;
else if(!trans_flag)
video_buffer[offset+x]=0;
bit_mask=(bit_mask>>1);}offset+=320;work_char++;}}
void Blit_String(int x,int y,int color,char *string,int trans_flag){int index;
for(index=0;string[index]!=0;index++){Blit_Char(x+(index<<3),y,string[index],color,trans_flag);}}
void
Set_Video_Mode(int mode){ union REGS inregs,outregs;inregs.h.ah=0;inregs.h.al=(unsigned char)mode;int86(0x10,&inregs,&outregs);}


void show_east_character()
{
Set_Video_Mode(19);
Blit_String(90,100,5,"So Said So Done ",1);
DELAY(40);


closegraph();
}





void character(int x,int y,int bei_shu)
{
int i=9;
char *cici[]={"1","2","3","4","5","6","7","8","9","10"};

settextjustify(CENTER_TEXT,CENTER_TEXT);
settextstyle(DEFAULT_FONT,HORIZ_DIR,bei_shu);
outtextxy(x,y,cici[9]);DELAY(20);
for(;i>=0;i--)
{
setcolor(i+38);

outtextxy(x,y,cici);
DELAY(7);
cleardevice();
}


}












main()
{


int gdriver,gmode,i;
void linux(void);
void(*p)();

/*
move1();
show_east_character();
*/

gdriver=DETECT;gmode;
registerbgidriver(IBM8514_driver);
initgraph(&gdriver,&gmode,"c://turboc2");
character(320,200,15);

p=linux;
(*p)();














}





void wall(int x){setcolor(7);setfillstyle(1,7);bar(0,0,317+x,480);bar(321-x,0,640,480);}
void camellialinux(void){if(action>=12){while(well<=320.0){line(well,280,well,ik);line(well,
0,well,ij);if(action>=8)if(action>=30)if(action>=32){ik-=0.35;ij+=0.35;}else;else{ ik-=0.59;
ij+=0.59;}well+=0.5;}}}void image(void){int i=250;setcolor(7);setfillstyle(1,7);setcolor(0);
setlinestyle(0,1,1);for(;i>180;i--){action++;DELAY(1);putimage(i,80,buf,COPY_PUT);well=318;
camellialinux();DELAY(0.3);}}void linux(void){static int c[10];int *num[10]={&c[0],&c[1],&c[2],
&c[3],&c[4],&c[5],&c[6],&c[7],&c[8],&c[9]};int **p,i=0;int x=3;wall(0);{int a[]={293,80,277,130,
277,230,293,280,327,280,343,230,343,130,327,80,293,80};int b[]={298,85,282,135,282,225,298,275,
322,275,337,225,338,135,322,85,298,85};setcolor(24);setfillstyle(1,24);fillpoly(9,a);setcolor(34);
setfillstyle(1,34);fillpoly(9,b);}setcolor(20);setfillstyle(1,24);bar(360,155,410,205);setcolor(1);
circle(310,180,60);setfillstyle(1,1);floodfill(310,180,1);setcolor(25);circle(310,180,53);setfillstyle
(1,25);floodfill(310,180,25);setcolor(43);setfillstyle(1,43);bar(270,160,350,206);setcolor(31);
rectangle(270+5,160+5,350-5,206-5);setfillstyle(1,31);floodfill(300,190,31);setcolor(1);rectangle
(270+5,160+5,350-5,206-5);setcolor(41);while(x<=24){moveto(276+10,158+x+10);linerel(0,2);moveto(
276+10+23,158+x+10);linerel(0,2);moveto(276+10,158+x+10);linerel(23,0);x+=3;}moveto(276+10,158+x
+10);linerel(23,0);setlinestyle(0,1,1);setcolor(1);moveto(270,160);linerel(5,5);moveto(350,206);
linerel(-5,-5);moveto(270,206);linerel(5,-5);moveto(350,160);linerel(-5,5);{int j=0,i,z=20,*p,y=
green;p=&i;while(j<11){if(z%2==0)*p=zi;else *p=42;setfillstyle(1,*p);bar(324,175,335,179);if(j==
10)y=RED;setfillstyle(1,y);bar(324,185,335,189);DELAY(10);z--;j++;}}p=num;while(i<39){**p=410-i;
**(p+1)=155;**(p+2)=410-i;**(p+3)=205;**(p+4)=420;**(p+5)=205;**(p+6)=420;**(p+7)=155;**(p+8)=410
;**(p+9)=155;i+=1;DELAY(1);setcolor(7);setfillstyle(1,7);fillpoly(5,c);}{int i=320,*p,count=1;p=&
i;setcolor(7);while(count<=8){arc(*p-count,180,320,40,60);count++;DELAY(2);}}size1=imagesize(255,
80,385,280);buf1=malloc(size1);getimage(255,80,385,280,buf1);size=imagesize(250,80,380,280);buf=
malloc(size);size=setgraphbufsize(99999999);getimage(250,80,374,280,buf);image();cleardevice();{int
q=180,free0=0;static int ic[10];int *num[10]={&ic[0],&ic[1],&ic[2],&ic[3],&ic[4],&ic[5],&ic[6],&ic[
7],&ic[8],&ic[9]};int **p;i=0;p=num;wall(0);while(i<323){putimage(q,80,buf,COPY_PUT);**p=318-i;**(p+
1)=0;**(p+2)=318-i;**(p+3)=480;**(p+4)=320+i;**(p+5)=480;**(p+6)=320+i;**(p+7)=0;**(p+8)=318-i;**(p+
9)=0;q-=2;setcolor(0);setfillstyle(1,0);fillpoly(5,ic);if(i>=179)if(i>=181){size2=imagesize(2,80,
130,280);buf2=malloc(size2);getimage(2,80,130,280,buf2);putimage(0,80,buf2,COPY_PUT);free(buf2);}else
if(free0==0){free(buf);free0=1;}i+=2;}}}







/********************************第一段****************************************/
/********************************第一段****************************************/
/********************************第一段****************************************/
/********************************第一段****************************************/
/********************************第一段****************************************/



#include<graphics.h>
#include<io.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<bios.h>
#include<mem.h>
#include<fcntl.h>
#include<stdlib.h>
#include<conio.h>
#include<process.h>


int finall_count=0;
int ilinex1=265; int change_iline_floor=0; int screen_count=0;



float up_newline_screen=0; /*线行内步增量参数 */
float up_newline_1=0;




int iline2x1=267; int iline2y1=198; int change_iline_floor1=0;

int iline2x2=363,iline2y2=198; int up_line=0;



float iline_d1=269; /*地面线*/
float iline_d11=365;


float iline_d2=271; /*地面线(白)*/
float iline_d22=363;


float interface_door_count=0; /* 门入口线渐变变量 */
float interface_door_count_fast=0;
float interface_door_special=0;



float iline_leftt=114; /*左边线*/
float iline_leftt2=200;
float iline_leftt3=114;
float iline_leftt4=198;



float iline_left2=113; /*右边线*/
float iline_left22=200;
float iline_left3=114;
float iline_left4=200;


int iline_main=180; /*线性之差内部变量*/

/********************************************* 开始线性渐变变量 ********************************************************/

float wall_change_line_control=640; /*右上角线 */
float wall_change_line_controlx=0;


float wall_change_line_control1=0; /*左上角线 */
float wall_change_line_control1x=0;

float wall_change_line_controlY=0; /* 右边竖线 */
float wall_change_line_controlL_Y=0; /* 左边竖线 */


float fdoor_count=0; /* 门口既增量 */
/************************************************* 最后判断 ************************************************************/
int last_left=1;
int yellow_thing=0;
/***********************************************************************************************************************/



void DELAY(int clicks)
{
unsigned int far *clock=(unsigned int far *)0x0000046CL;
unsigned int now;
now=*clock;
while(abs(*clock-now)<clicks){}
}







void wall_change_line(void) /*右边墙上角线渐变 */
{



if (wall_change_line_control>=450)
{
setcolor(7);
setlinestyle(0,1,3);

line
(
326+wall_change_line_controlx,
131-wall_change_line_controlx,
wall_change_line_control,
0
);

if(up_line % 4==0)
wall_change_line_controlx+=0.5;

wall_change_line_control-=2;


}

}






void wall_change_line_left(void) /*左上角线 */
{


if (wall_change_line_control1<=180)
{
setcolor(7);
setlinestyle(0,1,3);

line
(
304-wall_change_line_control1x,
131-wall_change_line_control1x,
wall_change_line_control1,
0
);

if(up_line % 4==0)
wall_change_line_control1x+=0.5;

wall_change_line_control1+=2;

}
}



/***************************************************************************************************************************/





void if_change_1(void) /* 第一组线复位 及 重合*/
{




if (up_newline_1==180)
{

while (iline_main<=183)
{


/**********************底边线变**********************/

setcolor(15);
setlinestyle(0,1,1);
if(finall_count %1==0)iline_d2-=0.97;
if(finall_count %1==0)iline_d22+=0.97;
line
(

iline_d2, /*271*/

198+iline_main,

iline_d22, /*363*/

198+iline_main

);


/********************左边线变***********************/
setcolor(7);
setlinestyle(0,1,1);

if(finall_count %4==0)iline_leftt3-=0.79+wall_change_line_controlL_Y;
if(finall_count %1==0)iline_leftt2+=1;
line(
267-iline_main,
iline_leftt3,

267-iline_main,

iline_leftt4
);



/*********************右边线变**********************/


setcolor(7);
setlinestyle(0,1,1);

if((finall_count<=2)&&(finall_count %4==0))iline_left3-=0.001;
if((finall_count %4 ==0) && (finall_count>=4) )iline_left3-=0.78+wall_change_line_controlY;

if(finall_count %1==0)iline_left4+=1;
line(

363+iline_main,



iline_left3, /*114*/

363+iline_main,

iline_left4
);




/**************************************************************************************************************************/




/*这里就运行多三次了,所以下次要加多3 */




iline_main+=1;

}

setcolor(7);
setlinestyle(0,1,1);












iline_main=180; /* 记得最后要修改啊醒目仔 */

iline_leftt=114; /*左边线*/
iline_leftt2=200;
iline_leftt3=114;
iline_leftt4=198;



iline_left2=113; /*右边线*/
iline_left22=200;

iline_left3=114;
iline_left4=200;


iline_d1=269; /*地面线*/
iline_d11=365;

iline_d2=271;
iline_d22=363;

change_iline_floor=0;
change_iline_floor1=0;

up_newline_1=0;

up_line++; /* 因为运行这个涵数时,就是进行线条最后的一次重合,所以up_line要运行多一次 */

}


}




/**************************************************************************************************************************/















void line_change_floor(void)
{

if(up_line>=960){up_line=0;last_left=0;}

if(up_newline_screen>=925)up_newline_screen=0;



if_change_1(); /*第一组线复位*/



/* 开始判断啦 */


if
(

(up_line>=200&&up_line<=380) ||


(up_line>=460&&up_line<=640) ||



(up_line>=780&&up_line<=960)




)
{





/***************************底面线***************************/
setcolor(1);
setlinestyle(0,1,1);

if(finall_count %1==0)iline_d1-=0.97;
if(finall_count %1==0)iline_d11+=0.97;
line
(
iline_d1,/*269*/
200+up_newline_1,
iline_d11,/*365*/
200+up_newline_1
);




setcolor(15);
setlinestyle(0,1,1);
if(finall_count %1==0)iline_d2-=0.98;
if(finall_count %1==0)iline_d22+=0.97;
line
(
iline_d2,/*271*/
198+up_newline_1,
iline_d22,/*363*/
198+up_newline_1
);


/*************************左边线***************************/



setcolor(1);
setlinestyle(0,1,1);
if(finall_count %4==0)iline_leftt-=0.79+wall_change_line_controlL_Y;
if(finall_count %1==0)iline_leftt2+=1;
line
(
265-up_newline_1,
iline_leftt,
265-up_newline_1,
iline_leftt2
);



setcolor(7);
setlinestyle(0,1,1);
if(finall_count %4==0)iline_leftt3-=0.78+wall_change_line_controlL_Y;
if(finall_count %1==0)iline_leftt4+=1;
line
(
267-up_newline_1,
iline_leftt3,
267-up_newline_1,
iline_leftt4
);


wall_change_line_controlL_Y+=0.00030;

if(wall_change_line_controlL_Y>=0.79100)wall_change_line_controlL_Y=0.79100;


/***********************右边线*****************************/



if(last_left==1)
{


setcolor(1);
setlinestyle(0,1,1);
if(finall_count %4==0)iline_left2-=0.7+wall_change_line_controlY;
if(finall_count %1==0)iline_left22+=1;

line
(
365+up_newline_1,
iline_left2, /*112*/
365+up_newline_1,
iline_left22 /*200*/
);



setcolor(7);
setlinestyle(0,1,1);


if((finall_count<=2)&&(finall_count %4==0))iline_left3-=0.001;
if((finall_count %4 ==0) && (finall_count>=4) )iline_left3-=0.78+wall_change_line_controlY;

if(finall_count %1==0)iline_left4+=1;
line
(
363+up_newline_1,
iline_left3,
363+up_newline_1,
iline_left4
);







wall_change_line_controlY+=0.00048;



if(wall_change_line_controlY>=0.900002)wall_change_line_controlY=0.900002;

}

up_newline_1++;

}







/**************************************************************************************************************************/

















up_line++;



change_iline_floor+=1;/*地下蓝线*/
change_iline_floor1+=1; /*地下白线*/






}



void door(void)/*******************门**********************/
{




static int idoor[10];

int *num_idoor[10]={&idoor[0],&idoor[1],&idoor[2],&idoor[3],&idoor[4],
&idoor[5],&idoor[6],&idoor[7],&idoor[8],&idoor[9]};

int **p_idoor=num_idoor;



**p_idoor=305;
**(p_idoor+ 1)= 130;


**(p_idoor+ 2)= 305;
**(p_idoor+ 3)= 160;


**(p_idoor+ 4)= 325;
**(p_idoor+ 5)= 160;


**(p_idoor+ 6)= 325;
**(p_idoor+ 7)= 130;


**(p_idoor+ 8)= 305;
**(p_idoor+ 9)= 130;



setcolor(25);
setfillstyle(1,25);
fillpoly(5,idoor);







}


void door_come(void)
{

setcolor(25);
setlinestyle(0,1,1);
rectangle
(
305-fdoor_count,
130-fdoor_count,
325+fdoor_count,
160+fdoor_count
);
/*line(0,140,300,140);*/


fdoor_count+=0.03;
}




void interface_door(void) /*门入口 */
{

static int iinterface_door[10];
static int iinterface_door_under[8];

int *num_iinterface_door[10]=
{
&iinterface_door[0],&iinterface_door[1],&iinterface_door[2],&iinterface_door[3],&iinterface_door[4],
&iinterface_door[5],&iinterface_door[6],&iinterface_door[7],&iinterface_door[8],&iinterface_door[9]};

int *num_iinterface_door_under[8]=
{
&iinterface_door_under[0],&iinterface_door_under[1],&iinterface_door_under[2],
&iinterface_door_under[3],&iinterface_door_under[4],&iinterface_door_under[5],
&iinterface_door_under[6],&iinterface_door_under[7]
};


int **p_door;
int **p_door_under;



p_door=num_iinterface_door;

p_door_under=num_iinterface_door_under;

**p_door=331+interface_door_count;
**(p_door+ 1)= 135-interface_door_count;


**(p_door+ 2)= 341+interface_door_count_fast;
**(p_door+ 3)= 130-interface_door_special; /*重要边界 0.16则会溢出*/


**(p_door+ 4)= 341+interface_door_count_fast;
**(p_door+ 5)= 166+interface_door_count;

**(p_door+ 6)= 331+interface_door_count;
**(p_door+ 7)= 166+interface_door_count;

**(p_door+ 8)= 331+interface_door_count;
**(p_door+ 9)= 135+interface_door_count;

setcolor(8);
setfillstyle(1,8);
fillpoly(5,iinterface_door);




/***************************************门下的三角形*************************************************/


**p_door_under=331+interface_door_count;
**(p_door_under+ 1)= 166+interface_door_count;


**(p_door_under+ 2)= 341+interface_door_count_fast;
**(p_door_under+ 3)= 180+interface_door_count_fast;

**(p_door_under+ 4)= 341+interface_door_count_fast;
**(p_door_under+ 5)= 166+interface_door_count;

**(p_door_under+ 6)= 331+interface_door_count;
**(p_door_under+ 7)= 166+interface_door_count;


setcolor(15);
setfillstyle(1,15);
fillpoly(4,iinterface_door_under);





/*************************************竖线复盖**********************************************************/



setcolor(7);
setlinestyle(0,1,1);
line
(
330+interface_door_count,
136-interface_door_count,
330+interface_door_count,
166+interface_door_count

);



interface_door_count+=0.08;

interface_door_count_fast+=0.16;

if(interface_door_special>=30)
if(interface_door_special>=70)
if(interface_door_special>=90)
{interface_door_special+=0.2;}
else
{interface_door_special+=0.3;}

else

{interface_door_special+=0.159;}

else


interface_door_special+=0.11;


}









void test(void)
{

float left_test=145;
float left_test1=145;
float left_test2=145;
float line_test=145;

float neibu_wall_thing=145;
float neibu_wall_thing_line=145;

/*
int wall_change1=295;
int wall_change2=295;
*/

/**********************************墙边渐变*************************************************/

static int iwall_change[10];
int *num_wall_change[10]={&iwall_change[0],&iwall_change[1],&iwall_change[2],&iwall_change[3],&iwall_change[4],
&iwall_change[5],&iwall_change[6],&iwall_change[7],&iwall_change[8],&iwall_change[9]};


int **wall_change;

int iwall_count=0;
float line_count=0;


wall_change=num_wall_change ; /*墙渐变*/



/********************************************** 最外部循环 **************************************************************/


while(finall_count<=1000)
{

if(finall_count==650)
{

yellow_thing++;
neibu_wall_thing-=3;

if(neibu_wall_thing<=108)neibu_wall_thing=108;




finall_count=0;

iwall_count=finall_count; /*当finall_count运行完一次之后就复位为0传给 iwall_count */






neibu_wall_thing_line-=2.7;
if(neibu_wall_thing_line<=112)neibu_wall_thing_line=112;

line_test=neibu_wall_thing_line;



line_count=0;


left_test1=neibu_wall_thing;
left_test2=neibu_wall_thing;
left_test=neibu_wall_thing;




}

if(yellow_thing<=3)

{
/************** 1 ****************/
**wall_change=270-iwall_count;
**(wall_change+ 1)= left_test1; /* 145 */
if(iwall_count %3==0)
left_test1=**(wall_change+ 1)=left_test1-2;


/************** 2 ****************/
**(wall_change+ 2)= 270-iwall_count;
**(wall_change+ 3)= 150+iwall_count;




/************** 3 ****************/
**(wall_change+ 4)= 265-iwall_count;
**(wall_change+ 5)= 155+iwall_count;



/************** 4 ****************/
**(wall_change+ 6)= 265-iwall_count;
**(wall_change+ 7)=left_test;
if(iwall_count %3==0)
left_test=**(wall_change+ 7)=left_test-2;



/************** 5 ****************/
**(wall_change+ 8)= 270-iwall_count;
**(wall_change+ 9)=left_test2;
if(iwall_count %3==0)
left_test2=**(wall_change+ 9)=left_test2+2;




setcolor(30);
setfillstyle(1,30);
fillpoly(5,iwall_change);




/*********************************线条的覆盖****************************/


setcolor(7);
setlinestyle(0,1,1);


if(iwall_count %3==0)line_test-=1.2;
line(280-line_count,line_test,280-line_count,150+line_count);

line_count+=1;


}




/********************************变量递增*******************************/

iwall_count+=2;
finall_count+=2;






/*********************************************************************/
/*********************************************************************/
/******************************线性渐变*******************************/

line_change_floor();








/*****************************墙开始渐变******************************/



if( up_line % 30==0)
{

wall_change_line();

wall_change_line_left();



}


if(up_line % 4==0)
{

door_come();
interface_door();
}





/* getch(); */

} /* 循环体内 */



}

/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/
/********************************************test******************************************************************/




void right_wall(void)
{


/*************************************右侧墙*****************************************************/
static int iright_wall[10];

int *num_right_wall[18]={&iright_wall[0],&iright_wall[1],&iright_wall[2],&iright_wall[3],&iright_wall[4],
&iright_wall[5],&iright_wall[6],
&iright_wall[7],&iright_wall[8],&iright_wall[9]
};

int **right_wall;

right_wall=num_right_wall;/*右侧墙*/

/*******************右侧墙********************/
**right_wall=640;
**(right_wall+ 1)= 0;


**(right_wall+ 2)= 326;
**(right_wall+ 3)= 130;

**(right_wall+ 4)= 326;
**(right_wall+ 5)= 160;

**(right_wall+ 6)= 640;/* */
**(right_wall+ 7)= 480;

**(right_wall+ 8)= 640;
**(right_wall+ 9)= 0;






setcolor(7);
setfillstyle(1,7);
fillpoly(5,iright_wall);




}





void terra(void) /* 地面 */
{


/***********************************地面****************************************************/

static int ifloor[10];
int *num_floor[10]={&ifloor[0],&ifloor[1],&ifloor[2],&ifloor[3],&ifloor[4],
&ifloor[5],&ifloor[6],&ifloor[7],&ifloor[8],&ifloor[9]};

int **floor;

floor=num_floor; /*地面*/

cleardevice();
/*******************地面*********************/

**floor=0;
**(floor+ 1)= 480;

**(floor+ 2)= 200;
**(floor+ 3)= 160;


**(floor+ 4)= 340;
**(floor+ 5)= 160;

**(floor+ 6)= 640;
**(floor+ 7)= 480;

**(floor+ 8)= 0;
**(floor+ 9)= 480;

setcolor(15);
setfillstyle(1,15);
fillpoly(5,ifloor);



}
























void start_moive(void)
{



/*******************************大的灯************************************************************/
static int ilight[21];

int *num_light[21]={&ilight[0],&ilight[1],&ilight[2],&ilight[3],&ilight[4],&ilight[5],&ilight[6],
&ilight[7],&ilight[8],&ilight[9],&ilight[10],&ilight[11],&ilight[12],&ilight[13],&ilight[14],
&ilight[15],&ilight[16],&ilight[17],&ilight[18],&ilight[19],&ilight[20]};






/************************************左侧墙****************************************************/
static int ileft_wall[10];

int *num_left_wall[10]={&ileft_wall[0],&ileft_wall[1],&ileft_wall[2],&ileft_wall[3],&ileft_wall[4],
&ileft_wall[5],&ileft_wall[6],&ileft_wall[7],&ileft_wall[8],&ileft_wall[9]};






int iwall_count=0;
float line_count=0;


int **p_light;





int **left_wall;







/********************左侧墙********************/

left_wall=num_left_wall;

**left_wall=0;
**(left_wall+ 1)= 0;


**(left_wall+ 2)= 0;
**(left_wall+ 3)= 480;


**(left_wall+ 4)= 305;
**(left_wall+ 5)= 160;


**(left_wall+ 6)= 305;
**(left_wall+ 7)= 130;


**(left_wall+ 8)= 0;
**(left_wall+ 9)= 0;



setcolor(7);
setfillstyle(1,7);
fillpoly(5,ileft_wall);










/********************灯*******************/
p_light=num_light;



**p_light=310;
**(p_light+1 )=10;


**(p_light+ 2)=310;
**(p_light+ 3)=20;



**(p_light+ 4)=285;
**(p_light+ 5)=20;



**(p_light+ 6)= 265;
**(p_light+ 7)= 50;


**(p_light+ 8)= 265;
**(p_light+ 9)=60;


**(p_light+ 10)=365;
**(p_light+ 11)=60;



**(p_light+ 12)=365;
**(p_light+ 13)=50;


**(p_light+ 14)=345;
**(p_light+ 15)=20;


**(p_light+ 16)=320;
**(p_light+ 17)=20;


**(p_light+ 18)=320;
**(p_light+ 19)=10;


**(p_light+ 20)=310;
**(p_light+ 21)=10;


setcolor(10);
setfillstyle(1,10);
fillpoly(10,ilight);

setcolor(15);
setlinestyle(0,1,1);
arc(315,40,220,320,30);

line(293,60,336,60);

setfillstyle(1,15);
floodfill(316,61,15);


/*在圆弧上画一条线以便可以用floodfill填充来防止颜色溢出*/







































}




main()
{

int gdriver,gmode,i;

gdriver=DETECT;gmode;
registerbgidriver(IBM8514_driver);
initgraph(&gdriver,&gmode,"c://turboc2");
cleardevice();
setbkcolor(8);

/*den_shan();*/



terra(); /*地面 */

start_moive();



right_wall(); /*右侧墙 */




interface_door();/*门入口 */


door();
getch();

test();

}


这里有两段代码是实现了三维的动画,是用C里面的<graphics.h>做的.
对于我这个垃圾大学一年级的班长来说,对着全同学说,我们学了半个学期,
下学期就用C来做个作品跟高年级的比赛,看谁能够拿到校软件比赛第一,

那C来为班争光真不是一件简单的工作,花了5个小时我做了39个汉字字模,为的可以在台上讲出一句话:本作品脱离了汉字平台.用中断号来启动图形模式,用rom*8调用西文字库.
在只学了半学期的C,用想象力编三维动画.(第二个程序就是一个画面).但最后有人说了一句:<graphics.h>落后了,学了也没有,浪费时间.......我没有流眼泪,因为已经没有流眼泪的功能......我没有办法知道它是怎么落后的,更没有办法知道什么东西不是落后的......
特意发此贴希望有心人能够帮助我这个迷了路的大一学生.
距离大二的日子还有二十几天,我........不知道该怎么做....开学怎么对同学说:"i can't do that" .LINUXCICI这个很好听的名字,因为叫linux只因它是一个很稳固的系统,就如我想很坚强一样,但........真的能做到吗?
 
.......可怜啊.......
 
去做嵌入式开发
 
为什么发到delphibbs来..炫耀吗?
 
才大一 啊
已经不错了撒,想我大一的时候 比这差多了撒
好好搞撒,不要把大学 几年浪费就好了
我也刚毕业撒 呵呵
 
to sxper:这不是炫耀,我只是一个学生,很多问题肯定不懂,不懂就要拿源代码出来谈,
想我当初第一次上到"文件"那章的fopen涵数,下课我马上翻手册来编那所胃的病毒,发了上来原来才知道自己无知,我做每一个代码都会给我老师看,看他的评价,当然也发上网,每个网都是,流量多的我就发,我需要更多的评价,不管你们骂,赞.我都要发,只有给出源代码别人才可以正面评论,正所胃技术是有高低的.

当我编写了800行后发了上网别人才告诉我<graphics.h>不用了,汉字取模落后了.
你说我汉字都取好模了,还有问题要发上去问吗?如果不把完整的代码发表整能让人知道你所写的正确代码或错误的代码是否存在客观或主观的问题呢?

请问嵌入式开发是怎么回事的啊?可以讲清楚一点吗?
你们的评论是我最大的帮助谢谢.
(某人都说过了,学校里面的老师90%都是SP,我能要谁的意见,只能靠网上的每个论坛)
 
楼主不会是来炫耀的,因为这个的确过时了,象这样老掉牙的长篇大作在DOS时代很盛行啊,感觉象是十多年前的代码,精力用错地方了,选对方向是最重要的,选对一条路走下去倒反而简单。
 
就是嵌入到硬件系统中的软件,手机、掌上电脑等等设备中的程序,要实现操作系统的部分功能,和硬件接口紧密,你DOS下C程序写得不错,早点转向嵌入式开发,不要去学Windows或Linux的图形界面下的开发,专门走这条路,钱途大大的。
 
那请问嵌入式开发是只的是单片机还是别的呢?

LINUX也可以做嵌入式开发吗?

我还不明白嵌入式开发是只的是什么?跟LINUX关系大吗?跟DELPHI关系大吗?

有没有些权威的教程呢? 请各位说详细点好吗?
(我是拨96263挨着我妈骂来上来看你们的意见的啊)

我的学习环境真的不太好,学校图书馆的书不多,得外帮助的也不多.
方向是最重要的.......
 
嵌入式开发应该包括单片机开发
我也不太懂哦,不过这方面人比较少,而计算机的发展是逐渐地融入各种各样的产品中去,所以现在学好这个,以后这方面人才会供不应求。
其实网上很多资料,上网困难,可以借这方面的书看:
Windows CE开发
uClinux开发
vxworks开发
uC/OS-II开发
 
Windows CE开发
uClinux开发
vxworks开发
uC/OS-II开发
这些要具备什么知识才可以看得懂呢?
因为我只学了半个学期的C,学校也只开了半个学期的课.
我从明天起继续看<C陷阱>,这本可以吗?
还有每天都看<汇编>的视频.不过只有32集,够不够呢?
汇编都要很熟的吗?
C的底层是都是都要弄懂呢? 包括音频方面的吗?都要弄懂?
只要7200个小时就毕业了,我是读专科的,要把握好时间
 
你时间紧迫,我还是不给你乱指方向了
你现在看的都有用,以你学半年C能写出这段程序的能力,随便学什么都有出路。
 
说真的,其实我很笨的,因为写这东西用了我大约10天,
没有学过计算机图形,哎...里面的浮点数都是经调试出来的,不是前人作出的什么什么算法,
所以效果不太好.
 
我知道我们班的同学有天会光临这网站的,如果你们看到这贴,请原谅我没有能力为大家用C来争气了.很对不起....说过的话不算数...对不起
 
厉害,已经很不错了!
不过你那个转弯的地方还是没实现啊,另外最好响应个用户按键事件(比如按ESC退出程序),现在我只能CTRL+BREAK。
另外给点建议,你这个程序恐怕只有你自己才看的懂吧,其实C一样可以写出很好的规范来,写之前多想下设计,算法什么的。。。会取得事半功倍的效果的。
我记得你应该是20天前还不知道怎么调试呢,士别三日当刮目相看啊,继续加油!
我现在真的很忙,抱歉!
 
在这里我很感谢ak_2005大侠,他在前些日子帮了我不少忙,很多谢他,你说得对.
转弯的地方如果是用反画图法来做真的是一件非常复杂的事,这代码我并没有什么设计,只是想做积木似的一块一块的添加上去,主要是外部变量和很多个的外部变量控制,finall_count就是最外部的变量了.
如果可以
size=imagesize(0,0,640,480);
getimage(0,0,640,480)
把整个屏幕放紧内存里面我就可以做到转弯的地方,
因为可以
for(x=?x<?x++)
{
size=imagesize(1,0,640,480);
getimage(1,0,640,480,buf)
putimage(0,0,buf,COPY_PUT);

}
这样就可以将整个屏幕向左移走,这是我无意中想到了,第一段画面这是这样,
但是将整个屏幕保存会出现内存不足......跳出了dos....哎...
 
嵌入式开发应该包括单片机开发.TCP/IP协议,时序电路.
简单来说.用单片机实现一个有IP的设备.能通过指定端口通信.
uClinux开发,推荐
单片机如果用汇编,那是90%的sb老师教的,现在多用c,也可以混编.但是汇编只用在对延时要求严格的情况下.
了解不多.欢迎批评指正,
 
看你心浮气燥的,用3年的时间专一样就够了,想这么多干嘛? 饭要一口一口的吃,真是小孩子一个。
 
3年的时间专一样?
我想LINUX的底层开发,够时间吗?下学期就大二开始了.
我的确是挺心浮气燥,只能怪我的性格做什么都要立刻.
用单片机实现一个有IP的设备.能通过指定端口通信,我起不是要学电路之类的东西了?
请问delphi和linux连系大吗?
 

Similar threads

I
回复
0
查看
658
import
I
I
回复
0
查看
843
import
I
I
回复
0
查看
687
import
I
后退
顶部