X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.h;h=2a727278931a41c64f3853a84c83812d8c960922;hb=34ed45c14d923459972fecf7a3b46f44d7e03670;hp=92b9cce8a95f26ae86f13df99c767f7f59a4ab07;hpb=ee0895b12e544444db37febb1242bcc8a72d6ad8;p=rocksndiamonds.git diff --git a/src/libgame/misc.h b/src/libgame/misc.h index 92b9cce8..2a727278 100644 --- a/src/libgame/misc.h +++ b/src/libgame/misc.h @@ -27,6 +27,11 @@ /* values for InitRND() */ #define NEW_RANDOMIZE -1 +#define InitRND(seed) init_random_number(0, seed) +#define InitSimpleRND(seed) init_random_number(1, seed) +#define RND(max) get_random_number(0, max) +#define SimpleRND(max) get_random_number(1, max) + /* values for Error() */ #define ERR_RETURN 0 #define ERR_RETURN_LINE (1 << 0) @@ -52,7 +57,11 @@ /* values for general file handling stuff */ #define MAX_FILENAME_LEN 256 -#define MAX_LINE_LEN 1000 +#define MAX_LINE_LEN 1024 + +/* values for general username handling stuff */ +#define MAX_USERNAME_LEN 1024 + void fprintf_line(FILE *, char *, int); void printf_line(char *, int); @@ -65,9 +74,15 @@ boolean FrameReached(unsigned long *, unsigned long); boolean DelayReached(unsigned long *, unsigned long); void WaitUntilDelayReached(unsigned long *, unsigned long); +#if 0 unsigned int SimpleRND(unsigned int); +unsigned int InitSimpleRND(long); unsigned int RND(unsigned int); unsigned int InitRND(long); +#endif + +unsigned int init_random_number(int, long); +unsigned int get_random_number(int, unsigned int); char *getLoginName(void); char *getRealName(void); @@ -75,8 +90,10 @@ char *getHomeDir(void); char *getPath2(char *, char *); char *getPath3(char *, char *, char*); +char *getStringCat2(char *, char *); char *getStringCopy(char *); char *getStringToLower(char *); +void setString(char **, char *); void GetOptions(char **); @@ -135,11 +152,13 @@ boolean FileIsSound(char *); boolean FileIsMusic(char *); boolean FileIsArtworkType(char *, int); +int get_parameter_value(char *, char *, int); + struct FileInfo *getFileListFromConfigList(struct ConfigInfo *, - struct ConfigInfo *, int); + struct ConfigInfo *, char **, int); void LoadArtworkConfig(struct ArtworkListInfo *); void ReloadCustomArtworkList(struct ArtworkListInfo *); -void FreeCustomArtworkList(struct ArtworkListInfo *); +void FreeCustomArtworkLists(struct ArtworkListInfo *); #if !defined(PLATFORM_UNIX) void initErrorFile();