describe the room at x,y */
| 1273 | |
| 1274 | /* describe the room at x,y */ |
| 1275 | staticfn void |
| 1276 | lookaround_known_room(coordxy x, coordxy y) |
| 1277 | { |
| 1278 | struct selectionvar *sel = selection_new(); |
| 1279 | int rmno = u.urooms[0] - ROOMOFFSET; |
| 1280 | char qbuf[QBUFSZ]; |
| 1281 | |
| 1282 | set_selection_floodfillchk(dolookaround_floodfill_findroom); |
| 1283 | selection_floodfill(sel, x, y, TRUE); |
| 1284 | |
| 1285 | if (!u_at(x, y)) |
| 1286 | set_msg_xy(x, y); |
| 1287 | |
| 1288 | if (u_have_seen_whole_selection(sel)) { |
| 1289 | boolean u_in = (boolean) selection_getpoint(x, y, sel); |
| 1290 | |
| 1291 | You("%s %s %s.", |
| 1292 | u_at(x, y) && u_in && u_can_see_whole_selection(sel) ? "are in" |
| 1293 | : (u_at(x, y)) ? "remember this as" : "remember that as", |
| 1294 | an(selection_size_description(sel, qbuf)), |
| 1295 | rmno >= 0 ? "room" : "area"); |
| 1296 | } else if (u_have_seen_bounds_selection(sel)) { |
| 1297 | You("guess %s to be %s %s.", |
| 1298 | u_at(x, y) ? "this" : "that", |
| 1299 | an(selection_size_description(sel, qbuf)), |
| 1300 | rmno >= 0 ? "room" : "area"); |
| 1301 | } else { |
| 1302 | You("can't guess the size of %s area.", |
| 1303 | u_at(x, y) ? "this" : "that"); |
| 1304 | } |
| 1305 | selection_free(sel, TRUE); |
| 1306 | } |
| 1307 | |
| 1308 | /* #lookaround - describe what the hero can see, in text */ |
| 1309 | int |
no test coverage detected