if a class name has been cleared, we may need to purge it from disco[] */
| 495 | |
| 496 | /* if a class name has been cleared, we may need to purge it from disco[] */ |
| 497 | void |
| 498 | undiscover_object(int oindx) |
| 499 | { |
| 500 | if (!objects[oindx].oc_name_known && !objects[oindx].oc_encountered) { |
| 501 | int dindx, acls = objects[oindx].oc_class; |
| 502 | boolean found = FALSE; |
| 503 | |
| 504 | /* find the object; shift those behind it forward one slot */ |
| 505 | for (dindx = svb.bases[acls]; |
| 506 | dindx < NUM_OBJECTS && svd.disco[dindx] != 0 |
| 507 | && objects[dindx].oc_class == acls; |
| 508 | dindx++) |
| 509 | if (found) |
| 510 | svd.disco[dindx - 1] = svd.disco[dindx]; |
| 511 | else if (svd.disco[dindx] == oindx) |
| 512 | found = TRUE; |
| 513 | |
| 514 | /* clear last slot */ |
| 515 | if (found) |
| 516 | svd.disco[dindx - 1] = 0; |
| 517 | else |
| 518 | impossible("named object not in disco"); |
| 519 | |
| 520 | if (objects[oindx].oc_class == GEM_CLASS) |
| 521 | gem_learned(oindx); /* ok, it's actually been unlearned */ |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | boolean |
| 526 | interesting_to_discover(int i) |
no test coverage detected