1 #include <ncurses.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <signal.h>
5 #include <string.h>
6 #include <ctype.h>
7 
8 #define DIM(A)  (sizeof(A) / sizeof(*(A)))
9 
10 #ifndef FALSE
11 #define FALSE   0
12 #define TRUE    1
13 #endif
14 
15 #define DIMROW  20
16 #define DIMCOL  80
17 #define DIMSCRN 7
18 #define HISPEED 5
19 
20 #define CLAD    'g'
21 #define CDER    'o'
22 #define CGOLD   '&'
23 #define CRELEAS 'V'
24 #define CLADDER 'H'
25 #define CTARGET '$'
26 #define CEXIT   '*'
27 #define CBAR    '|'
28 #define CGROUND '='
29 #define CHAZARD '.'
30 #define CTRAP0  '^'
31 #define CTRAP1  '-'
32 #define CFREE   ' '
33 
34 typedef enum { NONE, STOP = 0, XUP = 1, XDOWN = 2, LEFT = 3, RIGHT = 4 } DIR;
35 typedef enum { NORMAL, NOTHING_HAPPENED = 0, EXIT, PAUSE, DEAD, FINISH } RESULT;
36 
37 #define AT  printf("%s: at %d\r\n",__FILE__,__LINE__); sleep(2)
38 
39 /* ladder.c */
40 void mexit0(void);
41 void mexit1();
42 char *unmerge(char *);
43 extern int lads, score, boni[DIMSCRN], level, scrno, speed;
44 
45 /* lscreens.c */
46 extern char *screens[DIMSCRN][DIMROW];
47 extern int hiders[DIMSCRN];
48 extern int st_boni[DIMSCRN];
49 
50 /* lplay.c */
51 RESULT lplay(void);
52 
53 /* ltime.c */
54 void ctplay(void);
55 void ctnplay(void);
56 void waitct(void);
57 
58 /* lscore.c */
59 void upd_score(void);
60 void prt_score(int,int);
61 
62