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

Function GetSignificantScreenPos

src/tools/map_replace_area.cpp:614–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612}
613
614void GetSignificantScreenPos(const CMapObject &Ob, const float aaVisibleArea[2][2], const float aaReplaceableArea[2][2], float aScreen[2])
615{
616 for(int i = 0; i < 2; i++)
617 {
618 if(!Ob.m_aSpeed[i])
619 {
620 aScreen[i] = aaVisibleArea[i][0] + Ob.m_aaScreenOffset[i][1];
621 continue;
622 }
623
624 float BaseOffset = aaReplaceableArea ? aaReplaceableArea[i][0] : 0;
625 aScreen[i] = (aaVisibleArea[i][0] - Ob.m_aaBaseArea[i][0] - BaseOffset) / Ob.m_aSpeed[i];
626 }
627}
628
629void ConvertToTiles(const float aaArea[2][2], int aaTiles[2][2])
630{

Callers 2

AdaptReplaceableAreasFunction · 0.85
AdaptVisiblePointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected