diff --git a/bird.c b/bird.c new file mode 100644 index 0000000..bc345fa --- /dev/null +++ b/bird.c @@ -0,0 +1,100 @@ +#define __LIBRARY__ +#include +#include +#include +#include +#include +#include +#define vga_graph_memstart 0xA0000 +#define vga_graph_memsize 64000 +#define cursor_side 6 +#define vga_width 320 +#define vga_height 200 + +#define BIRD_X 120 +#define BIRD_Y 100 +#define BIRD_WIDTH 10 +#define BIRD_HEIGHT 8 +#define MAX 40 + +char *p; +int i,j,x_pos,y_pos,k; +struct message *msg; +int cnt; +int bird_y; +int px[MAX]; +int py[MAX]; +int h[MAX]; +char *pp; +int ii,jj; +int nn; + +_syscall0(int,init_graphics) +_syscall1(int,get_message,struct message * ,msg) +_syscall3(int,repaint,int ,x,int ,y,int ,h) +int main() +{ + x_pos=20; + y_pos=20; + bird_y=BIRD_Y; + init_graphics(); + px[0]=BIRD_X; + py[0]=bird_y; + h[0]=BIRD_HEIGHT; + cnt=30; + for(i=1;i0) + { + --k; + get_message(msg); + if(msg!=NULL)py[0]-=10; + sleep(2); + } + sleep(4); + for(k=1;kpx[k] && px[0]+6px[k] && px[0]+6199) + { + repaint(44,44,44); + return 0; + + } + } + + } + } +repaint(44,44,44); +return 0; +} +