MCPcopy Create free account
hub / github.com/crawl/crawl / recent_error_messages

Function recent_error_messages

crawl-ref/source/message.cc:2193–2210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2191}
2192
2193bool 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.

Callers 3

UIStartupMenuMethod · 0.85
startup_stepFunction · 0.85

Calls 2

flush_prev_messageFunction · 0.85
get_storeMethod · 0.80

Tested by

no test coverage detected