MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / tmsg_get

Function tmsg_get

Source/tmsg.cpp:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33} // namespace
34
35uint8_t tmsg_get(std::unique_ptr<byte[]> *msg)
36{
37 if (TimedMsgList.empty())
38 return 0;
39
40 TMsg &head = TimedMsgList.front();
41 if ((int)(head.time - SDL_GetTicks()) >= 0)
42 return 0;
43
44 uint8_t len = head.len;
45 *msg = std::move(head.body);
46 TimedMsgList.pop_front();
47 return len;
48}
49
50void tmsg_add(const byte *msg, uint8_t len)
51{

Callers 1

ProcessTmsgsFunction · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected