just some indentation fixes

This commit is contained in:
Enno Rehling 2005-06-11 08:18:26 +00:00
parent 1a1dc417c4
commit b95b7fd9b1
1 changed files with 11 additions and 4 deletions

View File

@ -524,27 +524,34 @@ read_borders(FILE * f)
fscanf(f, "%s", zText); fscanf(f, "%s", zText);
if (!strcmp(zText, "end")) break; if (!strcmp(zText, "end")) break;
fscanf(f, "%u %hd %hd %hd %hd", &bid, &fx, &fy, &tx, &ty); fscanf(f, "%u %hd %hd %hd %hd", &bid, &fx, &fy, &tx, &ty);
from = findregion(fx, fy); from = findregion(fx, fy);
if (from==NULL) { if (from==NULL) {
if (!incomplete_data) log_error(("border for unknown region %d,%d\n", fx, fy)); if (!incomplete_data) {
log_error(("border for unknown region %d,%d\n", fx, fy));
}
from = new_region(fx, fy); from = new_region(fx, fy);
} }
to = findregion(tx, ty); to = findregion(tx, ty);
if (to==NULL) { if (to==NULL) {
if (!incomplete_data) log_error(("border for unknown region %d,%d\n", tx, ty)); if (!incomplete_data) {
log_error(("border for unknown region %d,%d\n", tx, ty));
}
to = new_region(tx, ty); to = new_region(tx, ty);
} }
type = find_bordertype(zText); type = find_bordertype(zText);
if (type==NULL) { if (type==NULL) {
log_error(("[read_borders] unknown border type %s in %s\n", zText, regionname(from, NULL))); log_error(("[read_borders] unknown border type %s in %s\n", zText,
regionname(from, NULL)));
assert(type || !"border type not registered"); assert(type || !"border type not registered");
} }
if (to==from) { if (to==from) {
direction_t dir = (direction_t) (rand() % MAXDIRECTIONS); direction_t dir = (direction_t) (rand() % MAXDIRECTIONS);
region * r = rconnect(from, dir); region * r = rconnect(from, dir);
log_error(("[read_borders] invalid %s in %s\n", type->__name, regionname(from, NULL))); log_error(("[read_borders] invalid %s in %s\n", type->__name,
regionname(from, NULL)));
if (r!=NULL) to = r; if (r!=NULL) to = r;
} }
b = new_border(type, from, to); b = new_border(type, from, to);