weltkarte

This commit is contained in:
Enno Rehling 2001-12-15 15:55:31 +00:00
parent 893a2605f5
commit 74cce04268
1 changed files with 18 additions and 0 deletions

View File

@ -280,6 +280,21 @@ has_laen(region *r) {
} }
#endif #endif
static int
crwritemap(void)
{
FILE * F = fopen("world.cr", "w+");
region * r;
for (r=regions;r;r=r->next) {
plane * p = rplane(r);
fprintf(F, "REGION %d %d %d\n", r->x, r->y, p?p->id:0);
fprintf(F, "\"%s\";Name\n\"%s\";Terrain\n", rname(r, default_locale), LOC(default_locale, terrain[rterrain(r)].name));
}
fclose(F);
return 0;
}
void void
drawmap(boolean maponly) { drawmap(boolean maponly) {
int x, x1, y1, y2, s, q; int x, x1, y1, y2, s, q;
@ -715,6 +730,9 @@ movearound(int rx, int ry) {
DisplayRegList(1); DisplayRegList(1);
ch = 999999; ch = 999999;
break; break;
case 'W':
crwritemap();
break;
case 'q': case 'q':
if (yes_no(0, "Wirklich beenden?", 'n')) if (yes_no(0, "Wirklich beenden?", 'n'))
return; return;