samples/infinicity.c
/**
 * Adds a far away row of buildings
 * 
 */
Adds a far away row of buildings
Adds a far away row of buildings
void addRowFar(){
	for (int n = 0; n < 10; n++) {
		kuhl_geometry_delete(&building[n][0]);
		kuhl_geometry_delete(&windows[n][0]);
		if (isComplex[n][0] == 1) {
			kuhl_geometry_delete(&buildingTop[n][0]);
			kuhl_geometry_delete(&windowsTop[n][0]);
		}
	}
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 9; j++) {
			building[i][j] = building[i][j+1];
			windows[i][j] = windows[i][j+1];
			buildingTop[i][j] = buildingTop[i][j+1];
			windowsTop[i][j] = windowsTop[i][j+1];
			isComplex[i][j] = isComplex[i][j+1];
		}
	}
	for (int n = 0; n < 10; n++) {
		long seedNum = getSeed(n, 9-shiftBreak);
		isComplex[n][9] = init_geometryBuilding(&building[n][9], &windows[n][9], &buildingTop[n][9], &windowsTop[n][9], program, seedNum);
	}
}
void addRowFar ( ) { for ( int n = 0 ; n < 10 ; n ++ ) { kuhl_geometry_delete ( & building [ n ] [ 0 ] ) ; kuhl_geometry_delete ( & windows [ n ] [ 0 ] ) ; if ( isComplex [ n ] [ 0 ] == 1 ) { kuhl_geometry_delete ( & buildingTop [ n ] [ 0 ] ) ; kuhl_geometry_delete ( & windowsTop [ n ] [ 0 ] ) ; } } for ( int i = 0 ; i < 10 ; i ++ ) { for ( int j = 0 ; j < 9 ; j ++ ) { building [ i ] [ j ] = building [ i ] [ j + 1 ] ; windows [ i ] [ j ] = windows [ i ] [ j + 1 ] ; buildingTop [ i ] [ j ] = buildingTop [ i ] [ j + 1 ] ; windowsTop [ i ] [ j ] = windowsTop [ i ] [ j + 1 ] ; isComplex [ i ] [ j ] = isComplex [ i ] [ j + 1 ] ; } } for ( int n = 0 ; n < 10 ; n ++ ) { long seedNum = getSeed ( n , 9 - shiftBreak ) ; isComplex [ n ] [ 9 ] = init_geometryBuilding ( & building [ n ] [ 9 ] , & windows [ n ] [ 9 ] , & buildingTop [ n ] [ 9 ] , & windowsTop [ n ] [ 9 ] , program , seedNum ) ; } }
Adds a far away row of buildings
Adds a far away row of buildings
//delete current close row //move rows back //add new far row