X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmisc.c;h=ec16eeee4568f1b7c95a23b5d810a64c1edfcad9;hb=1786288765edb99711ec0eb06520969879d62cc2;hp=916ce2bdc4a3fff781f9b546f339adecf39e3443;hpb=ac86d841daa4ecafff3128110a1db109e03fb355;p=rocksndiamonds.git diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 916ce2bd..ec16eeee 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -328,17 +328,8 @@ void WaitUntilDelayReached(unsigned long *counter_var, unsigned long delay) /* random generator functions */ /* ------------------------------------------------------------------------- */ -#if 0 -static int foo = -1; -#endif - unsigned int init_random_number(int nr, long seed) { -#if 0 - if (nr == 0) - foo = 0; -#endif - if (seed == NEW_RANDOMIZE) { #if defined(TARGET_SDL) @@ -358,26 +349,7 @@ unsigned int init_random_number(int nr, long seed) unsigned int get_random_number(int nr, int max) { -#if 0 - if (max > 0) - { - long int rnd_raw = random_linux_libc(nr); - unsigned int rnd = rnd_raw % max; - - if (nr == 0) - { - printf("::: %d: %d [%d MOD %d]\n", foo++, rnd, rnd_raw, max); - } - - return rnd; - } - else - { - return 0; - } -#else return (max > 0 ? random_linux_libc(nr) % max : 0); -#endif } @@ -1789,6 +1761,12 @@ int get_parameter_value(char *value_raw, char *suffix, int type) strEqual(value, "up") ? MV_UP : strEqual(value, "down") ? MV_DOWN : MV_NONE); } + else if (strEqual(suffix, ".align")) + { + result = (strEqual(value, "left") ? ALIGN_LEFT : + strEqual(value, "right") ? ALIGN_RIGHT : + strEqual(value, "center") ? ALIGN_CENTER : ALIGN_DEFAULT); + } else if (strEqual(suffix, ".anim_mode")) { result = (string_has_parameter(value, "none") ? ANIM_NONE : @@ -1802,6 +1780,7 @@ int get_parameter_value(char *value_raw, char *suffix, int type) string_has_parameter(value, "ce_delay") ? ANIM_CE_DELAY : string_has_parameter(value, "horizontal") ? ANIM_HORIZONTAL : string_has_parameter(value, "vertical") ? ANIM_VERTICAL : + string_has_parameter(value, "centered") ? ANIM_CENTERED : ANIM_DEFAULT); if (string_has_parameter(value, "reverse"))