X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmisc.h;h=004b7e438ddc0a10662ad223b59f395aa27f0796;hb=72b2940bea34cebf61175bc62a474cb78dcec467;hp=83aa074f4bc7c9681f360399628a7d1cf566c30e;hpb=19004e830980892c3abc3021bd1b868861836bb8;p=rocksndiamonds.git diff --git a/src/misc.h b/src/misc.h index 83aa074f..004b7e43 100644 --- a/src/misc.h +++ b/src/misc.h @@ -16,18 +16,30 @@ #include "main.h" -#define INIT_COUNTER 0 -#define READ_COUNTER 1 +/* values for InitCounter() and Counter() */ +#define INIT_COUNTER 0 +#define READ_COUNTER 1 -#define NEW_RANDOMIZE -1 +/* values for InitRND() */ +#define NEW_RANDOMIZE -1 -#define ERR_RETURN 0 -#define ERR_WARN (1 << 0) -#define ERR_EXIT (1 << 1) -#define ERR_HELP (1 << 2) -#define ERR_SOUNDSERVER (1 << 3) -#define ERR_EXIT_HELP (ERR_EXIT | ERR_HELP) -#define ERR_EXIT_SOUNDSERVER (ERR_EXIT | ERR_SOUNDSERVER) +/* values for Error() */ +#define ERR_RETURN 0 +#define ERR_WARN (1 << 0) +#define ERR_EXIT (1 << 1) +#define ERR_HELP (1 << 2) +#define ERR_SOUND_SERVER (1 << 3) +#define ERR_NETWORK_SERVER (1 << 4) +#define ERR_NETWORK_CLIENT (1 << 5) +#define ERR_FROM_SERVER (ERR_SOUND_SERVER | ERR_NETWORK_SERVER) +#define ERR_EXIT_HELP (ERR_EXIT | ERR_HELP) +#define ERR_EXIT_SOUND_SERVER (ERR_EXIT | ERR_SOUND_SERVER) +#define ERR_EXIT_NETWORK_SERVER (ERR_EXIT | ERR_NETWORK_SERVER) +#define ERR_EXIT_NETWORK_CLIENT (ERR_EXIT | ERR_NETWORK_CLIENT) + +/* values for getFileChunk() and putFileChunk() */ +#define BYTE_ORDER_BIG_ENDIAN 0 +#define BYTE_ORDER_LITTLE_ENDIAN 1 void InitCounter(void); unsigned long Counter(void); @@ -40,21 +52,29 @@ unsigned int SimpleRND(unsigned int); unsigned int RND(unsigned int); unsigned int InitRND(long); char *getLoginName(void); +char *getRealName(void); char *getHomeDir(void); char *getPath2(char *, char *); char *getPath3(char *, char *, char*); char *getStringCopy(char *); char *getStringToLower(char *); void MarkTileDirty(int, int); +void SetBorderElement(); void GetOptions(char **); void Error(int, char *, ...); void *checked_malloc(unsigned long); void *checked_calloc(unsigned long); +void getFileChunk(FILE *, char *, int *, int); +void putFileChunk(FILE *, char *, int, int); char *getKeyNameFromKeySym(KeySym); char *getX11KeyNameFromKeySym(KeySym); KeySym getKeySymFromX11KeyName(char *); +char getCharFromKeySym(KeySym); char *getJoyNameFromJoySymbol(int); int getJoySymbolFromJoyName(char *); +int getJoystickNrFromDeviceName(char *); + void debug_print_timestamp(int, char *); +void print_debug(char *); #endif /* MISC_H */