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

Method IsEmpty

src/game/editor/mapitems/layer_switch.cpp:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60bool CLayerSwitch::IsEmpty() const
61{
62 for(int y = 0; y < m_Height; y++)
63 {
64 for(int x = 0; x < m_Width; x++)
65 {
66 const int Index = GetTile(x, y).m_Index;
67 if(Index == 0)
68 {
69 continue;
70 }
71 if(Editor()->IsAllowPlaceUnusedTiles() || IsValidSwitchTile(Index))
72 {
73 return false;
74 }
75 }
76 }
77 return true;
78}
79
80void CLayerSwitch::BrushDraw(CLayer *pBrush, vec2 WorldPos)
81{

Callers 2

BrushDrawMethod · 0.45
FillSelectionMethod · 0.45

Calls 2

IsValidSwitchTileFunction · 0.85

Tested by

no test coverage detected