MCPcopy Create free account
hub / github.com/ddnet/ddnet / PrintLine

Method PrintLine

src/game/client/components/console.cpp:766–777  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764}
765
766void CGameConsole::CInstance::PrintLine(const char *pLine, int Len, ColorRGBA PrintColor)
767{
768 // We must ensure that no log messages are printed while owning
769 // m_BacklogPendingLock or this will result in a dead lock.
770 const CLockScope LockScope(m_BacklogPendingLock);
771 CBacklogEntry *pEntry = m_BacklogPending.Allocate(sizeof(CBacklogEntry) + Len);
772 pEntry->m_YOffset = -1.0f;
773 pEntry->m_PrintColor = PrintColor;
774 pEntry->m_Length = Len;
775 pEntry->m_LineCount = -1;
776 str_copy(pEntry->m_aText, pLine, Len + 1);
777}
778
779int CGameConsole::CInstance::GetLinesToScroll(int Direction, int LinesToScroll)
780{

Callers 3

OnRconLineMethod · 0.80
LogMethod · 0.80
ExecuteLineMethod · 0.80

Calls 5

str_lengthFunction · 0.85
TextRenderFunction · 0.85
DefaultTextColorMethod · 0.80
str_copyFunction · 0.50
AllocateMethod · 0.45

Tested by

no test coverage detected