int opt;
char *config_file = NULL;
int i = 0;
+ int seed_set = 0;
program_name = argv[0];
- rnd_seed = time(NULL);
+ rnd_seed = 0;
while ((opt = getopt(argc, argv, "ae:hioqR:s:v")) != EOF) {
switch (opt) {
break;
case 'R':
rnd_seed = strtoul(optarg, NULL, 10);
+ seed_set = 1;
break;
case 's':
outfile = optarg;
}
parse_args(argc - optind, argv + optind);
+ if (!seed_set)
+ rnd_seed = pick_seed();
seed_prng(rnd_seed);
empfile_init();
if (emp_config(config_file) < 0)
secs = 0;
if (!place_island(c, &x, &y))
return;
- isiz = 1 + roll0(2 * is - 1);
+ isiz = roll(2 * is - 1);
do {
++secs;
find_coast(c);
for (y = 0; y < WORLD_Y; ++y) {
for (x = y % 2; x < WORLD_X; x += 2) {
if (elev[x][y] == -INFINITY)
- elev[x][y] = -roll0((distance_to_land() * 20 + 27)) - 1;
+ elev[x][y] = -roll(distance_to_land() * 20 + 27);
}
}
}