}
}
+void
+link_doors_rooms()
+{
+ xchar x,y;
+ for (y = 0; y < ROWNO; y++)
+ for (x = 0; x < COLNO; x++)
+ if (IS_DOOR(levl[x][y].typ) || levl[x][y].typ == SDOOR) {
+ struct mkroom *droom = rooms;
+ /* Now the complicated part, list it with each subroom */
+ /* The dog move and mail daemon routines use this */
+ while(droom->hx >= 0 && doorindex < DOORMAX) {
+ if(droom->hx >= x-1 && droom->lx <= x+1 &&
+ droom->hy >= y-1 && droom->ly <= y+1) {
+ /* Found it */
+ add_door(x, y, droom);
+ }
+ droom++;
+ }
+ }
+}
+
void
fill_rooms()
{
impossible("create_door: Can't find a proper place!");
return;
}
- add_door(x,y,broom);
levl[x][y].typ = (dd->secret ? SDOOR : DOOR);
levl[x][y].doormask = dd->mask;
}
if(okdoor(sx,sy)) {
levl[sx][sy].typ = SDOOR;
levl[sx][sy].doormask = D_CLOSED;
- add_door(sx,sy,croom);
return;
}
}
xchar typ = (*(xchar *)arg);
xchar x = dx;
xchar y = dy;
- struct mkroom *droom;
- droom = &rooms[0];
/*get_location(&x, &y, DRY, (struct mkroom *)0);*/
if (!IS_DOOR(levl[x][y].typ) && levl[x][y].typ != SDOOR)
levl[x][y].typ = (typ & D_SECRET) ? SDOOR : DOOR;
}
levl[x][y].doormask = typ;
SpLev_Map[x][y] = 1;
-
- /* Now the complicated part, list it with each subroom */
- /* The dog move and mail daemon routines use this */
- while(droom->hx >= 0 && doorindex < DOORMAX) {
- if(droom->hx >= x-1 && droom->lx <= x+1 &&
- droom->hy >= y-1 && droom->ly <= y+1) {
- /* Found it */
- add_door(x, y, droom);
- }
- droom++;
- }
-
}
coder->frame->n_opcode++;
} /*while*/
+ link_doors_rooms();
fill_rooms();
remove_boundary_syms();
wallification(1, 0, COLNO-1, ROWNO-1);