MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / getMessage

Function getMessage

TheForceEngine/TFE_Asset/gameMessages.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 const char* getMessage(u32 msgId)
67 {
68 if (!s_loaded) { load(); }
69
70 std::map<u32, std::string>::iterator iMsg = s_msgMap.find(msgId);
71 if (iMsg == s_msgMap.end())
72 {
73 // cannot find the message.
74 return nullptr;
75 }
76
77 return iMsg->second.c_str();
78 }
79}

Callers

nothing calls this directly

Calls 3

c_strMethod · 0.80
loadFunction · 0.70
endMethod · 0.45

Tested by

no test coverage detected