1 /*****************************************
2   xjump version 2
3 
4   xjump.h   �إå�( �쥳���ɴ�Ϣ���� )
5 
6   (C) Oct 28, 1997  ROYALPANDA
7 *****************************************/
8 
9 /* ��������� */
10 
11 #define KEY_UP    0
12 #define KEY_LEFT  1
13 #define KEY_RIGHT 2
14 
15 
16 /* ����Ƚ���� */
17 
18 #define DEAD -1
19 
20 
21 /* ���̥����� */
22 
23 #define WIDTH  32
24 #define HEIGHT 24
25 
26 
27 typedef struct{
28 
29   int x;         /* ��ɸ x */
30   int y;         /* ��ɸ y */
31   int vx;        /* ®�� x */
32   int vy;        /* ®�� y */
33   int jump;      /* �������� */
34   int pic;       /* ����ե��å� */
35   int dir;       /* ���� */
36   int g_count;   /* ���˥᡼������ѥ����� */
37 
38 } hero_t;
39 
40 
41 extern int Floor_L[];
42 extern int Floor_R[];
43 extern int Map_index;
44 
45 extern hero_t Hero;
46 
47 extern int Key[];
48 
49 extern int Floor_top;
50 
51 extern Display *Disp;
52 extern Drawable Scr_d;
53 extern Pixmap Floor_p;
54 extern Pixmap Back_p;
55 extern Pixmap Char_p;
56 extern Pixmap Char_m;
57 
58 extern GC Gc_nomask;
59 extern GC Gc_mask;
60 
61 void init_game( void );
62 int move( void );
63 void recover_scr( int x, int y, int x2, int y2 );
64 
65 int rnd( int range );
66 void srnd( void );
67 
68 void query_keycode( void );
69 void keymap( void );
70 void wait_keyup( void );
71 
72 /* �ޥ��� */
73 
74 #define floor_r(y)  Floor_R[ ( y+Map_index) % HEIGHT ]
75 #define floor_l(y)  Floor_L[ ( y+Map_index) % HEIGHT ]
76