From 6617c133c55146b508662acf9a32709604b28ab9 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 27 Mar 2002 21:52:29 +0000 Subject: [PATCH] mapper kompiliert auch wieder. --- src/mapper/map_modify.c | 27 ++++++++++++++++++++++++--- src/mapper/map_units.c | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/mapper/map_modify.c b/src/mapper/map_modify.c index e9c6f99f7..42433a716 100644 --- a/src/mapper/map_modify.c +++ b/src/mapper/map_modify.c @@ -561,6 +561,27 @@ NeuesSchiff(region * r) modified = 1; } +static const char * oldbuildings[MAXBUILDINGTYPES] = { + "castle", + "lighthouse", + "mine", + "quarry", + "harbour", + "academy", + "magictower", + "smithy", + "sawmill", + "stables", + "monument", + "dam", + "caravan", + "tunnel", + "inn", + "stonecircle", + "blessedstonecircle", + "illusion", +}; + void NeueBurg(region * r) { @@ -573,7 +594,7 @@ NeueBurg(region * r) y = 2; wmove(win, y, 4); for (i = 0; i < MAXBUILDINGTYPES; i++) { - sprintf(buf, "%d=%s; ", i, oldbuildings[i]->_name); + sprintf(buf, "%d=%s; ", i, oldbuildings[i]); q += strlen(buf); if (q > SX - 20) { q = strlen(buf); @@ -597,10 +618,10 @@ NeueBurg(region * r) waddch(win, '|'); } wmove(win, 1, 2); - wAddstr((char*)oldbuildings[q]->_name); + wAddstr((char*)oldbuildings[q]); wrefresh(win); - b = new_building(oldbuildings[q], r, NULL); + b = new_building(bt_find(oldbuildings[q]), r, NULL); b->size = map_input(win, 2, 2, "Größe", 1, 999, 1); diff --git a/src/mapper/map_units.c b/src/mapper/map_units.c index 7bafbc80d..4d0b1a534 100644 --- a/src/mapper/map_units.c +++ b/src/mapper/map_units.c @@ -962,7 +962,7 @@ showunits(region * r) refresh(); for (b = r->buildings; b; b = b->next) { - if (b->type == &bt_castle) { + if (b->type == bt_find("castle")) { sprintf(lbuf, "\002%s, Größe %d, %s", buildingname(b), b->size, buildingtype(b, b->size /*, NULL */)); } else { sprintf(lbuf, "\002%s, Größe %d, %s", buildingname(b),