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

Function PrintMapInfo

src/tools/map_extract.cpp:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11#include <game/mapitems.h>
12
13static void PrintMapInfo(CDataFileReader &Reader)
14{
15 const CMapItemInfo *pInfo = static_cast<CMapItemInfo *>(Reader.FindItem(MAPITEMTYPE_INFO, 0));
16 if(pInfo)
17 {
18 const char *pAuthor = Reader.GetDataString(pInfo->m_Author);
19 log_info("map_extract", "author: %s", pAuthor == nullptr ? "(error)" : pAuthor);
20 const char *pMapVersion = Reader.GetDataString(pInfo->m_MapVersion);
21 log_info("map_extract", "version: %s", pMapVersion == nullptr ? "(error)" : pMapVersion);
22 const char *pCredits = Reader.GetDataString(pInfo->m_Credits);
23 log_info("map_extract", "credits: %s", pCredits == nullptr ? "(error)" : pCredits);
24 const char *pLicense = Reader.GetDataString(pInfo->m_License);
25 log_info("map_extract", "license: %s", pLicense == nullptr ? "(error)" : pLicense);
26 }
27}
28
29static void ExtractMapImages(CDataFileReader &Reader, const char *pPathSave)
30{

Callers 1

ExtractMapFunction · 0.85

Calls 2

FindItemMethod · 0.45
GetDataStringMethod · 0.45

Tested by

no test coverage detected