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

Function CompareGroups

src/tools/map_replace_area.cpp:234–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void CompareGroups(const char aaMapNames[3][64], CDataFileReader aInputMaps[2])
235{
236 int aStart[2], aNum[2];
237 for(int i = 0; i < 2; i++)
238 aInputMaps[i].GetType(MAPITEMTYPE_GROUP, &aStart[i], &aNum[i]);
239
240 for(int i = 0; i < std::max(aNum[0], aNum[1]); i++)
241 {
242 CMapItemGroup *apItem[2];
243 for(int j = 0; j < 2; j++)
244 apItem[j] = (CMapItemGroup *)aInputMaps[j].GetItem(aStart[j] + i);
245
246 bool SameConfig = apItem[0]->m_ParallaxX == apItem[1]->m_ParallaxX && apItem[0]->m_ParallaxY == apItem[1]->m_ParallaxY && apItem[0]->m_OffsetX == apItem[1]->m_OffsetX && apItem[0]->m_OffsetY == apItem[1]->m_OffsetY && apItem[0]->m_UseClipping == apItem[1]->m_UseClipping && apItem[0]->m_ClipX == apItem[1]->m_ClipX && apItem[0]->m_ClipY == apItem[1]->m_ClipY && apItem[0]->m_ClipW == apItem[1]->m_ClipW && apItem[0]->m_ClipH == apItem[1]->m_ClipH;
247
248 if(!SameConfig)
249 dbg_msg("map_replace_area", "WARNING: different configuration on layergroup #%d, this might lead to unexpected results", i);
250 }
251}
252
253const CMapItemGroup *GetLayerGroup(CDataFileReader &InputMap, const int LayerNumber)
254{

Callers 1

ReplaceAreaFunction · 0.85

Calls 3

dbg_msgFunction · 0.85
GetTypeMethod · 0.45
GetItemMethod · 0.45

Tested by

no test coverage detected