  for(int g = 0; g < NumGroups(); g++)  {   CMapItemGroup *pGroup = GetGroup(g);   for(int l = 0; l < pGroup->m_NumLayers; l++)   {    CMapItemLayer *pLayer = GetLayer(pGroup->m_StartLayer+l);     if(pLayer->m_Type == LAYERTYPE_TILES)    {     CMapItemLayerTilemap *pT