discard saved persistent inventory data */
| 43 | |
| 44 | /* discard saved persistent inventory data */ |
| 45 | void |
| 46 | curs_purge_perminv_data(boolean everything) |
| 47 | { |
| 48 | if (pi.array) { |
| 49 | unsigned idx; |
| 50 | |
| 51 | for (idx = 0; idx < pi.inuseindx; ++idx) |
| 52 | free(pi.array[idx].invtxt), pi.array[idx].invtxt = 0; |
| 53 | |
| 54 | if (everything) |
| 55 | free(pi.array), pi.array = 0, pi.allocsize = 0; |
| 56 | } |
| 57 | |
| 58 | pi.inuseindx = 0; |
| 59 | pi.rowoffset = pi.coloffset = 0; |
| 60 | pi.widest = 0; |
| 61 | } |
| 62 | |
| 63 | /* Runs when the game indicates that the inventory has been updated */ |
| 64 | void |
no outgoing calls
no test coverage detected