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

Function RemoveDestinationQuads

src/tools/map_replace_area.cpp:403–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403bool RemoveDestinationQuads(const float aaGameArea[2][2], const CQuad *pQuads, const int NumQuads, const CMapItemGroup *pLayerGroup, CQuad *pDestQuads, int &QuadsCounter)
404{
405 bool DataChanged = false;
406
407 for(int i = 0; i < NumQuads; i++)
408 {
409 CMapObject Ob = CreateMapObject(pLayerGroup, fx2f(pQuads[i].m_aPoints[4].x), fx2f(pQuads[i].m_aPoints[4].y), 0, 0);
410
411 if(GetVisibleArea(aaGameArea, Ob))
412 {
413 DataChanged = true;
414 continue;
415 }
416
417 pDestQuads[QuadsCounter] = pQuads[i];
418 QuadsCounter++;
419 }
420
421 return DataChanged;
422}
423
424bool InsertDestinationQuads(const float aaaGameAreas[2][2][2], const CQuad *pQuads, const int NumQuads, const CMapItemGroup *apLayerGroups[2], CQuad *pDestQuads, int &QuadsCounter)
425{

Callers 1

ReplaceAreaQuadsFunction · 0.85

Calls 3

CreateMapObjectFunction · 0.85
fx2fFunction · 0.85
GetVisibleAreaFunction · 0.85

Tested by

no test coverage detected