1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <X11/Xlib.h> 4 #include <X11/xpm.h> 5 #include <X11/Xos.h> 6 #include <X11/extensions/shape.h> 7 8 9 #define LEFT 0 10 #define RIGHT 1 11 #define ERASE 2 12 13 #define BLUE 0 14 #define GREEN 1 15 #define YELLOW 2 16 #define RED 3 17 #define WHITE 4 18 #define BLACK 5 19 20 #define MAXLINE 512 21 22 #define WRITE 1 23 #define READ 0 24 25 #define LTURN 0 26 #define FALL 1 27 #define RTURN 2 28 29 extern void Setcursor() , tama_put() , tama_draw() , timer() , net_map() , net_tama() ; 30 extern int MoveWindow( int color1 , int color2 , int tx1 , int ty1 , int tx2 ,int ty2 ,int sw , int xx1 , int yy1 , int xx2 , int yy2 , Window win ) ; 31 int Map() ; 32 extern Bool tama_timer() ,net_getmessage() ; 33 34 extern Pixmap back_xpm , vmask[2] , titl_xpm , title_msk , ball[12] , 35 titl2_xpm , title2_msk , animation[5][5] , animation_mask[5] , 36 effect[4] , spa[4] , tama[4] , over[3] , pdemo[3] , 37 pdemo_mask[3] , sele_xpm[5] ,char_xpm , char_msk , 38 cursor_mask , cursor[5] , number[12] ; 39 40 41 extern Window frame , back , score , title2 , char_win , sele , vsback ; 42 43 extern Cursor setcursor[5] ; 44 45 extern Display *dpy ; 46 extern GC gc , gc2 , gc3 ; 47 48 extern Colormap cmap ; 49 extern unsigned long iro[12] ; 50 51 extern int map[8][19] , Score , tamakazu , rensa , Dairensa , level , 52 sockfd , erase , fdc , mode , mous[3] , crr ; 53 54 extern Bool gameover , practice , net , mouse ; 55 56 extern fd_set readfd ; 57 58