has hero seen all location of the rectangular outline in the selection */
| 1210 | |
| 1211 | /* has hero seen all location of the rectangular outline in the selection */ |
| 1212 | staticfn boolean |
| 1213 | u_have_seen_bounds_selection(struct selectionvar *sel) |
| 1214 | { |
| 1215 | coordxy x, y; |
| 1216 | NhRect rect = cg.zeroNhRect; |
| 1217 | |
| 1218 | selection_getbounds(sel, &rect); |
| 1219 | |
| 1220 | for (x = rect.lx; x <= rect.hx; x++) { |
| 1221 | y = rect.ly; |
| 1222 | if (isok(x,y) && selection_getpoint(x, y, sel) |
| 1223 | && glyph_at(x, y) == GLYPH_UNEXPLORED) |
| 1224 | return FALSE; |
| 1225 | y = rect.hy; |
| 1226 | if (isok(x,y) && selection_getpoint(x, y, sel) |
| 1227 | && glyph_at(x, y) == GLYPH_UNEXPLORED) |
| 1228 | return FALSE; |
| 1229 | } |
| 1230 | for (y = rect.ly; y <= rect.hy; y++) { |
| 1231 | x = rect.lx; |
| 1232 | if (isok(x,y) && selection_getpoint(x, y, sel) |
| 1233 | && glyph_at(x, y) == GLYPH_UNEXPLORED) |
| 1234 | return FALSE; |
| 1235 | x = rect.hx; |
| 1236 | if (isok(x,y) && selection_getpoint(x, y, sel) |
| 1237 | && glyph_at(x, y) == GLYPH_UNEXPLORED) |
| 1238 | return FALSE; |
| 1239 | } |
| 1240 | |
| 1241 | return TRUE; |
| 1242 | } |
| 1243 | |
| 1244 | /* can hero currently see all locations in the selection */ |
| 1245 | staticfn boolean |
no test coverage detected