| 2191 | } |
| 2192 | |
| 2193 | bool recent_error_messages() |
| 2194 | { |
| 2195 | // TODO: track whether player has seen error messages so this can be |
| 2196 | // more generally useful? |
| 2197 | flush_prev_message(); |
| 2198 | |
| 2199 | const store_t& msgs = buffer.get_store(); |
| 2200 | int mcount = NUM_STORED_MESSAGES; |
| 2201 | for (int i = -1; mcount > 0; --i, --mcount) |
| 2202 | { |
| 2203 | const message_line msg = msgs[i]; |
| 2204 | if (!msg) |
| 2205 | break; |
| 2206 | if (msg.channel == MSGCH_ERROR) |
| 2207 | return true; |
| 2208 | } |
| 2209 | return false; |
| 2210 | } |
| 2211 | |
| 2212 | // We just write out the whole message store including empty/unused |
| 2213 | // messages. They'll be ignored when restoring. |
no test coverage detected