version 1.14 | | version 1.15 |
---|
| | |
/* | | /* |
* static char *rcsid_style_c = | | * static char *rcsid_style_c = |
* "$Id: style.c,v 1.14 2001/05/13 08:21:54 mwedel Exp $"; | | * "$Id: style.c,v 1.15 2001/07/14 04:08:06 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* way is not good. | | * way is not good. |
*/ | | */ |
do { | | do { |
i = RANDOM () % (style->map_object->x * style->map_object->y); | | i = RANDOM () % (MAP_WIDTH(style) * MAP_HEIGHT(style)); |
| | |
x = i / style->map_object->y; | | x = i / MAP_HEIGHT(style); |
y = i % style->map_object->y; | | y = i % MAP_HEIGHT(style); |
new_obj = get_map_ob(style,x,y); | | new_obj = get_map_ob(style,x,y); |
} while (new_obj == NULL); | | } while (new_obj == NULL); |
if (new_obj->head) return new_obj->head; | | if (new_obj->head) return new_obj->head; |
| | |
} | | } |
LOG(llevDebug,"free_style_maps: Freed %d maps\n", style_maps); | | LOG(llevDebug,"free_style_maps: Freed %d maps\n", style_maps); |
} | | } |
| | |