Пример #1
0
void
mr_map_rooms (void)
{
  int x, y;
  clear_multi_room_cells ();
  mr_map_room_adj (mr.room, mr.x, mr.y);
  while (next_multi_room_cell (&x, &y))
    mr_map_room_adj (mr.cell[x][y].room, x, y);
  for (x = 0; x < mr.w; x++)
    for (y = 0; y < mr.h; y++) {
      if (mr.cell[x][y].room < 0) mr.cell[x][y].room = 0;
    }
}
Пример #2
0
void
mr_set_origin (int room, int rx, int ry)
{
  mr.room = room;
  mr.x = rx;
  mr.y = ry;

  int x, y;
  clear_multi_room_cells ();
  mr_map_room (mr.room, mr.x, mr.y);
  while (next_multi_room_cell (&x, &y))
    mr_map_room (mr.cell[x][y].room, x, y);
  for (x = 0; x < mr.w; x++)
    for (y = 0; y < mr.h; y++) {
      if (mr.cell[x][y].room < 0) mr.cell[x][y].room = 0;
    }
}