| 2225 | } |
| 2226 | |
| 2227 | void load_messages(reader& inf) |
| 2228 | { |
| 2229 | unwind_bool save_more(crawl_state.show_more_prompt, false); |
| 2230 | |
| 2231 | // assumes that the store was cleared at the beginning of _restore_game! |
| 2232 | flush_prev_message(); |
| 2233 | store_t load_msgs = buffer.get_store(); // copy of messages during loading |
| 2234 | clear_message_store(); |
| 2235 | |
| 2236 | int num = unmarshallInt(inf); |
| 2237 | for (int i = 0; i < num; ++i) |
| 2238 | { |
| 2239 | string text; |
| 2240 | unmarshallString4(inf, text); |
| 2241 | |
| 2242 | msg_channel_type channel = (msg_channel_type) unmarshallInt(inf); |
| 2243 | int param = unmarshallInt(inf); |
| 2244 | #if TAG_MAJOR_VERSION == 34 |
| 2245 | if (inf.getMinorVersion() < TAG_MINOR_MESSAGE_REPEATS) |
| 2246 | unmarshallInt(inf); // was 'repeats' |
| 2247 | #endif |
| 2248 | int turn = unmarshallInt(inf); |
| 2249 | |
| 2250 | message_line msg(message_line(text, channel, param, turn)); |
| 2251 | if (msg) |
| 2252 | buffer.store_msg(msg); |
| 2253 | } |
| 2254 | flush_prev_message(); |
| 2255 | buffer.append_store(load_msgs); |
| 2256 | clear_messages(); // check for Options.message_clear |
| 2257 | } |
| 2258 | |
| 2259 | static void _replay_messages_core(formatted_scroller &hist) |
| 2260 | { |
no test coverage detected