add identified artifact to discoveries list */
| 1110 | |
| 1111 | /* add identified artifact to discoveries list */ |
| 1112 | void |
| 1113 | discover_artifact(xint16 m) |
| 1114 | { |
| 1115 | int i; |
| 1116 | |
| 1117 | /* look for this artifact in the discoveries list; |
| 1118 | if we hit an empty slot then it's not present, so add it */ |
| 1119 | for (i = 0; i < NROFARTIFACTS; i++) |
| 1120 | if (artidisco[i] == 0 || artidisco[i] == m) { |
| 1121 | artidisco[i] = m; |
| 1122 | return; |
| 1123 | } |
| 1124 | /* there is one slot per artifact, so we should never reach the |
| 1125 | end without either finding the artifact or an empty slot... */ |
| 1126 | impossible("couldn't discover artifact (%d)", (int) m); |
| 1127 | } |
| 1128 | |
| 1129 | /* used to decide whether an artifact has been fully identified */ |
| 1130 | boolean |
no test coverage detected