X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=7c2f4353851cb803d8dc8bd43fd1474e65711df8;hb=959794cfda1f83edc51512211ae5a9f6b1e0b179;hp=38c062dec0724f267527d79649c54c78e8bfb1fc;hpb=786d4ea93b159a7f4cc09c4f05ec75939d8928d4;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 38c062de..7c2f4353 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -223,18 +223,6 @@ boolean getTokenValueFromString(char *string, char **token, char **value) /* counter functions */ /* ------------------------------------------------------------------------- */ -#if defined(PLATFORM_MSDOS) -volatile unsigned int counter = 0; - -void increment_counter() -{ - counter++; -} - -END_OF_FUNCTION(increment_counter); -#endif - - /* maximal allowed length of a command line option */ #define MAX_OPTION_LEN 256 @@ -323,22 +311,12 @@ static unsigned int mainCounter(int mode) void InitCounter() /* set counter back to zero */ { -#if !defined(PLATFORM_MSDOS) mainCounter(INIT_COUNTER); -#else - LOCK_VARIABLE(counter); - LOCK_FUNCTION(increment_counter); - install_int_ex(increment_counter, BPS_TO_TIMER(100)); -#endif } unsigned int Counter() /* get milliseconds since last call of InitCounter() */ { -#if !defined(PLATFORM_MSDOS) return mainCounter(READ_COUNTER); -#else - return (counter * 10); -#endif } static void sleep_milliseconds(unsigned int milliseconds_delay) @@ -474,7 +452,7 @@ unsigned int get_random_number(int nr, int max) /* system info functions */ /* ------------------------------------------------------------------------- */ -#if !defined(PLATFORM_MSDOS) && !defined(PLATFORM_ANDROID) +#if !defined(PLATFORM_ANDROID) static char *get_corrected_real_name(char *real_name) { char *real_name_new = checked_malloc(MAX_USERNAME_LEN + 1);