X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.h;h=92b9cce8a95f26ae86f13df99c767f7f59a4ab07;hb=ee0895b12e544444db37febb1242bcc8a72d6ad8;hp=27838aa7a82cfe22db9571315173b56bce9cfe03;hpb=05ca3ceb489c27197cf846441c1464536479a5cb;p=rocksndiamonds.git diff --git a/src/libgame/misc.h b/src/libgame/misc.h index 27838aa7..92b9cce8 100644 --- a/src/libgame/misc.h +++ b/src/libgame/misc.h @@ -29,12 +29,13 @@ /* 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_RETURN_LINE (1 << 0) +#define ERR_WARN (1 << 1) +#define ERR_EXIT (1 << 2) +#define ERR_HELP (1 << 3) +#define ERR_SOUND_SERVER (1 << 4) +#define ERR_NETWORK_SERVER (1 << 5) +#define ERR_NETWORK_CLIENT (1 << 6) #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) @@ -53,19 +54,25 @@ #define MAX_FILENAME_LEN 256 #define MAX_LINE_LEN 1000 +void fprintf_line(FILE *, char *, int); +void printf_line(char *, int); +char *int2str(int, int); + void InitCounter(void); unsigned long Counter(void); void Delay(unsigned long); boolean FrameReached(unsigned long *, unsigned long); boolean DelayReached(unsigned long *, unsigned long); void WaitUntilDelayReached(unsigned long *, unsigned long); -char *int2str(int, int); + 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 *); @@ -80,6 +87,7 @@ void Error(int, char *, ...); void *checked_malloc(unsigned long); void *checked_calloc(unsigned long); void *checked_realloc(void *, unsigned long); + inline void swap_numbers(int *, int *); inline void swap_number_pairs(int *, int *, int *, int *); @@ -116,14 +124,12 @@ char getCharFromKey(Key); int get_integer_from_string(char *); boolean get_boolean_from_string(char *); - ListNode *newListNode(void); void addNodeToList(ListNode **, char *, void *); void deleteNodeFromList(ListNode **, char *, void (*function)(void *)); ListNode *getNodeFromKey(ListNode *, char *); int getNumNodes(ListNode *); - boolean FileIsGraphic(char *); boolean FileIsSound(char *); boolean FileIsMusic(char *); @@ -131,18 +137,16 @@ boolean FileIsArtworkType(char *, int); struct FileInfo *getFileListFromConfigList(struct ConfigInfo *, struct ConfigInfo *, int); +void LoadArtworkConfig(struct ArtworkListInfo *); void ReloadCustomArtworkList(struct ArtworkListInfo *); void FreeCustomArtworkList(struct ArtworkListInfo *); - #if !defined(PLATFORM_UNIX) void initErrorFile(); FILE *openErrorFile(); void dumpErrorFile(); #endif -void printf_line(char, int); - void debug_print_timestamp(int, char *); #endif /* MISC_H */