X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=e7c2e098f513cfebe52a6a97a01e45de043900f2;hb=cffcb1ebb7183c52253df6e8d2af6b5e92ebef0a;hp=bd93e1ce170af1cc4f74a2a2a37b5869f11e50f6;hpb=224535bfe9ef9bfae63168c8ed99c2b70d2f44b1;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index bd93e1ce..e7c2e098 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -557,7 +557,7 @@ boolean getTokenValueFromString(char *string, char **token, char **value) #define UUID_CHARS (UUID_BYTES * 2) #define UUID_LENGTH (UUID_CHARS + 4) -static char *getUUID(void) +char *getUUID(void) { static char uuid[UUID_LENGTH + 1]; int data[UUID_BYTES]; @@ -582,27 +582,6 @@ static char *getUUID(void) return uuid; } -char *GetPlayerUUID(void) -{ - return getUUID(); -} - -char *GetSystemUUID(void) -{ - if (program.system_uuid != NULL) - return program.system_uuid; - - return getUUID(); -} - -void SetSystemUUID(char *uuid) -{ - if (program.system_uuid != NULL) - checked_free(program.system_uuid); - - program.system_uuid = getStringCopy(uuid); -} - // ---------------------------------------------------------------------------- // counter functions @@ -1320,6 +1299,7 @@ void GetOptions(int argc, char *argv[], options.tape_log_filename = NULL; options.special_flags = NULL; options.debug_mode = NULL; + options.player_name = NULL; options.mytapes = FALSE; options.serveronly = FALSE; @@ -1457,6 +1437,15 @@ void GetOptions(int argc, char *argv[], if (option_arg != next_option) options.debug_mode = getStringCopy(option_arg); } + else if (strncmp(option, "-player-name", option_len) == 0) + { + if (option_arg == NULL) + FailWithHelp("option '%s' requires an argument", option_str); + + options.player_name = getStringCopy(option_arg); + if (option_arg == next_option) + options_left++; + } else if (strncmp(option, "-verbose", option_len) == 0) { options.verbose = TRUE;