0f2a6448705dae88cfac404d069a40d5222ef8d1
[rocksndiamonds.git] / src / game_em / global.h
1 #ifndef GLOBAL_H
2 #define GLOBAL_H
3
4 #include "main_em.h"
5
6 #define EM_GFX_DIR      "graphics.EM"
7 #define EM_SND_DIR      "sounds.EM"
8 #define EM_LVL_DIR      "levels.EM"
9
10 /* arbitrary maximum length of filenames (cos i am lazy) */
11 #define MAXNAME 1024
12
13 extern int debug;
14 extern char *progname;
15 extern char *arg_basedir;
16
17 #if 0
18 extern int TILEX, TILEY;
19 #endif
20
21 extern int frame;
22
23 extern short ulaw_to_linear[256];
24 extern unsigned char linear_to_ulaw[65536];
25
26 /* all global function prototypes */
27
28 int open_all(void);
29 void close_all(void);
30
31 #if 1
32 void readjoy(byte, struct PLAYER *);
33 #else
34 void readjoy(byte);
35 #endif
36 void input_eventloop(void);
37
38 void blitscreen(void);
39 void game_initscreen(void);
40 void game_animscreen(void);
41
42 void DrawGameDoorValues_EM();
43
44 void play_sound(int, int, int);
45 void sound_play(void);
46
47 int cave_convert(char *);
48
49 void game_init_vars(void);
50 void game_play_init(int, char *);
51 void game_loop(byte);
52
53 void synchro_1(void);
54 void synchro_2(void);
55 void synchro_3(void);
56
57 int  cleanup_em_level(unsigned char *, int, char *);
58 void convert_em_level(unsigned char *, int);
59 void prepare_em_level(void);
60
61 int sound_thread(void);
62 int read_sample(char *, short **, long *);
63
64 void read_cave_list(void);
65 void free_cave_list(void);
66
67 #endif