コード例 #1
0
 @Override
 public int getVisibilityData(
     final int x, final int y, final CellVisibilityData[] cellVisibilityData, final int index) {
   assert this.checkGetVisibilityData(x, y, cellVisibilityData);
   int numZ = 1;
   final CellVisibilityData data = cellVisibilityData[index];
   data.m_x = x;
   data.m_y = y;
   data.m_z = this.getZ(x, y);
   data.m_height = (byte) Math.max(0, data.m_z);
   data.m_hollow = false;
   if (this.m_attachedBuilding.length != 0) {
     for (final AbstractBuildingStruct building : this.m_attachedBuilding) {
       final int result = building.getVisibilityData(x, y, cellVisibilityData, index + numZ);
       if (result != -1) {
         numZ += mergeSameAltitude(cellVisibilityData, index, index + numZ, result);
       }
     }
   }
   return numZ;
 }