… | |
… | |
339 | * Mark Wedel |
339 | * Mark Wedel |
340 | */ |
340 | */ |
341 | void |
341 | void |
342 | draw_magic_map (object *pl) |
342 | draw_magic_map (object *pl) |
343 | { |
343 | { |
344 | char *map_mark = (char *)calloc (MAGIC_MAP_SIZE * MAGIC_MAP_SIZE, 1); |
344 | char *map_mark; |
345 | int xmin, xmax, ymin, ymax; |
345 | int xmin, xmax, ymin, ymax; |
346 | |
346 | |
347 | if (pl->type != PLAYER) |
347 | if (pl->type != PLAYER) |
348 | { |
348 | { |
349 | LOG (llevError, "Non player object called draw_map.\n"); |
349 | LOG (llevError, "Non player object called draw_map.\n"); |
350 | return; |
350 | return; |
351 | } |
351 | } |
|
|
352 | |
|
|
353 | map_mark = (char *)calloc (MAGIC_MAP_SIZE * MAGIC_MAP_SIZE, 1); |
|
|
354 | assert(("Out of memory!", map_mark != NULL)); |
352 | |
355 | |
353 | /* First, we figure out what spaces are 'reachable' by the player */ |
356 | /* First, we figure out what spaces are 'reachable' by the player */ |
354 | magic_mapping_mark (pl, map_mark, 3); |
357 | magic_mapping_mark (pl, map_mark, 3); |
355 | |
358 | |
356 | /* We now go through and figure out what spaces have been |
359 | /* We now go through and figure out what spaces have been |