| 1970 | } |
| 1971 | |
| 1972 | void compute_robot_path_info() { |
| 1973 | int i, j; |
| 1974 | |
| 1975 | for (i = 0; i <= Highest_room_index + BOA_num_terrain_regions; i++) { |
| 1976 | if (i <= Highest_room_index && (!Rooms[i].used)) |
| 1977 | continue; |
| 1978 | |
| 1979 | if (i <= Highest_room_index && (Rooms[i].flags & RF_EXTERNAL)) |
| 1980 | continue; |
| 1981 | |
| 1982 | if (i > Highest_room_index + BOA_num_terrain_regions) |
| 1983 | continue; |
| 1984 | |
| 1985 | for (j = 0; j <= Highest_room_index + BOA_num_terrain_regions; j++) { |
| 1986 | int cur_room = i; |
| 1987 | |
| 1988 | if (j <= Highest_room_index && (!Rooms[i].used)) |
| 1989 | continue; |
| 1990 | |
| 1991 | if (j <= Highest_room_index && (Rooms[i].flags & RF_EXTERNAL)) |
| 1992 | continue; |
| 1993 | |
| 1994 | if (i == j) |
| 1995 | continue; |
| 1996 | |
| 1997 | if (i == Highest_room_index + 1 && j > Highest_room_index) |
| 1998 | continue; |
| 1999 | |
| 2000 | if (j == Highest_room_index + 1 && i > Highest_room_index) |
| 2001 | continue; |
| 2002 | |
| 2003 | if (BOA_NEXT_ROOM(cur_room, j) != BOA_NO_PATH && BOA_NEXT_ROOM(cur_room, j) != cur_room) { |
| 2004 | int last_room = cur_room; |
| 2005 | |
| 2006 | do { |
| 2007 | last_room = cur_room; |
| 2008 | cur_room = BOA_NEXT_ROOM(cur_room, j); |
| 2009 | |
| 2010 | if (last_room != cur_room) { |
| 2011 | if (BOA_DetermineStartRoomPortal(last_room, NULL, cur_room, NULL, false, true) == -1) { |
| 2012 | BOA_Array[i][j] |= BOAF_TOO_SMALL_FOR_ROBOT; |
| 2013 | break; |
| 2014 | } |
| 2015 | } |
| 2016 | |
| 2017 | } while (cur_room != j); |
| 2018 | } |
| 2019 | } |
| 2020 | } |
| 2021 | } |
| 2022 | |
| 2023 | void MakeBOA(void) { |
| 2024 | ASSERT(BOA_ROOM_MASK > MAX_ROOMS + MAX_BOA_TERRAIN_REGIONS); |
no test coverage detected