コード例 #1
0
ファイル: main.c プロジェクト: ez80/1010CE
void checkForTileRows() {
	bool columnsClear[10];
	bool rowsClear[10];

	int z;
	for (z = 0; z < 10; z++) {
		checkColumn(z);
		columnsClear[z] = lastClearCheck;
	}

	for (z = 0; z < 10; z++) {
		checkRow(z);
		rowsClear[z] = lastClearCheck;
	}

	for (z = 0; z < 10; z++) {
		if (columnsClear[z]) {
			clearColumn(z);
		}
	}

	for (z = 0; z < 10; z++) {
		if (rowsClear[z]) {
			clearRow(z);
		}
	}
}
コード例 #2
0
ファイル: WorldMap.cpp プロジェクト: jrbeck/longshot
// only clears/saves if it matches the indices
void WorldMap::clearColumn(int xIndex, int zIndex) {
  int columnIndex = getColumnIndexByRegionCoords(xIndex, zIndex);

  if (mColumns[columnIndex].mWorldIndex.x == xIndex && mColumns[columnIndex].mWorldIndex.z == zIndex) {
    clearColumn(columnIndex);
  }
}