(WORLD_SZ): New.

(isok, ef_init, bmaps_intersect, bp_init, player_accept)
(finish_sects, main): Use it.

(bp_neighbors, bp_lbcost, pathcost): Use XYOFFSET().  No
functional change.
This commit is contained in:
Markus Armbruster 2007-07-28 12:12:17 +00:00
parent e24b608dc6
commit 56de7a2151
8 changed files with 18 additions and 16 deletions

View file

@ -203,12 +203,12 @@ isok(int x, int y)
nmin = ngold = noil = nur = 0;
navail = nfree = nowned = 0;
if ((map = malloc((WORLD_X * WORLD_Y) / 2)) == 0) {
if (!(map = malloc(WORLD_SZ()))) {
logerror("malloc failed in isok\n");
pr("Memory error. Tell the deity.\n");
return 0;
}
memset(map, 0, (WORLD_X * WORLD_Y) / 2);
memset(map, 0, WORLD_SZ());
ok(map, x, y);
free(map);
if (nfree < 5)