version 1.97 | | version 1.98 |
---|
| | |
/* | | /* |
* static char *rcsid_map_c = | | * static char *rcsid_map_c = |
* "$Id: map.c,v 1.97 2006/01/06 18:55:35 qal21 Exp $"; | | * "$Id: map.c,v 1.98 2006/01/07 06:33:07 qal21 Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
static mapstruct *load_and_link_tiled_map(mapstruct *orig_map, int tile_num) | | static mapstruct *load_and_link_tiled_map(mapstruct *orig_map, int tile_num) |
{ | | { |
int dest_tile = (tile_num +2) % 4; | | int dest_tile = (tile_num +2) % 4; |
| | |
/* Tile paths can be reletive unless the orig_map is unique. | | |
*/ | | |
if (!orig_map->unique) { | | |
char *path = path_combine_and_normalize(orig_map->path, orig_map->tile_path[tile_num]); | | char *path = path_combine_and_normalize(orig_map->path, orig_map->tile_path[tile_num]); |
| | |
orig_map->tile_map[tile_num] = ready_map_name(path, 0); | | orig_map->tile_map[tile_num] = ready_map_name(path, 0); |
} else { | | |
orig_map->tile_map[tile_num] = ready_map_name(orig_map->tile_path[tile_num], 0); | | |
} | | |
| | |
/* need to do a strcmp here as the orig_map->path is not a shared string */ | | /* need to do a strcmp here as the orig_map->path is not a shared string */ |
if (orig_map->tile_map[tile_num]->tile_path[dest_tile] && | | if (orig_map->tile_map[tile_num]->tile_path[dest_tile] && |