1 /***********************************************************
2 * Rocks'n'Diamonds -- McDuffin Strikes Back! *
3 *----------------------------------------------------------*
4 * (c) 1995-98 Artsoft Entertainment *
8 * phone: ++49 +521 290471 *
9 * email: aeglos@valinor.owl.de *
10 *----------------------------------------------------------*
12 ***********************************************************/
19 #define INIT_COUNTER 0
20 #define READ_COUNTER 1
22 #define NEW_RANDOMIZE -1
25 #define ERR_WARN (1 << 0)
26 #define ERR_EXIT (1 << 1)
27 #define ERR_HELP (1 << 2)
28 #define ERR_SOUND_SERVER (1 << 3)
29 #define ERR_NETWORK_SERVER (1 << 4)
30 #define ERR_NETWORK_CLIENT (1 << 5)
31 #define ERR_FROM_SERVER (ERR_SOUND_SERVER | ERR_NETWORK_SERVER)
32 #define ERR_EXIT_HELP (ERR_EXIT | ERR_HELP)
33 #define ERR_EXIT_SOUND_SERVER (ERR_EXIT | ERR_SOUND_SERVER)
34 #define ERR_EXIT_NETWORK_SERVER (ERR_EXIT | ERR_NETWORK_SERVER)
35 #define ERR_EXIT_NETWORK_CLIENT (ERR_EXIT | ERR_NETWORK_CLIENT)
37 void InitCounter(void);
38 unsigned long Counter(void);
39 void Delay(unsigned long);
40 boolean FrameReached(unsigned long *, unsigned long);
41 boolean DelayReached(unsigned long *, unsigned long);
42 void WaitUntilDelayReached(unsigned long *, unsigned long);
43 char *int2str(int, int);
44 unsigned int SimpleRND(unsigned int);
45 unsigned int RND(unsigned int);
46 unsigned int InitRND(long);
47 char *getLoginName(void);
48 char *getHomeDir(void);
49 char *getPath2(char *, char *);
50 char *getPath3(char *, char *, char*);
51 char *getStringCopy(char *);
52 char *getStringToLower(char *);
53 void MarkTileDirty(int, int);
54 void GetOptions(char **);
55 void Error(int, char *, ...);
56 void *checked_malloc(unsigned long);
57 void *checked_calloc(unsigned long);
58 char *getKeyNameFromKeySym(KeySym);
59 char *getX11KeyNameFromKeySym(KeySym);
60 KeySym getKeySymFromX11KeyName(char *);
61 char *getJoyNameFromJoySymbol(int);
62 int getJoySymbolFromJoyName(char *);
63 int getJoystickNrFromDeviceName(char *);
65 void debug_print_timestamp(int, char *);
66 void print_debug(char *);