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

Method Dump

src/game/mapbugs.cpp:99–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void CMapBugs::Dump() const
100{
101 CMapBugsInternal *pInternal = (CMapBugsInternal *)m_pData;
102 unsigned int Flags;
103 if(pInternal)
104 {
105 Flags = pInternal->m_BugFlags;
106 }
107 else if(m_Extra)
108 {
109 Flags = m_Extra;
110 }
111 else
112 {
113 return;
114 }
115 char aBugs[NUM_BUGS + 1] = {0};
116 for(int i = 0; i < NUM_BUGS; i++)
117 {
118 aBugs[i] = IsBugFlagSet(i, Flags) ? 'X' : 'O';
119 }
120
121 dbg_msg("mapbugs", "enabling map compatibility mode %s", aBugs);
122 if(pInternal)
123 {
124 char aSha256[SHA256_MAXSTRSIZE];
125 sha256_str(pInternal->m_Map.m_Sha256, aSha256, sizeof(aSha256));
126 dbg_msg("mapbugs", "map='%s' map_size=%d map_sha256=%s",
127 pInternal->m_Map.m_pName,
128 pInternal->m_Map.m_Size,
129 aSha256);
130 }
131}

Callers 1

TESTFunction · 0.45

Calls 3

IsBugFlagSetFunction · 0.85
dbg_msgFunction · 0.85
sha256_strFunction · 0.85

Tested by 1

TESTFunction · 0.36