protected void paintWater( Level l, ArrayList<Room> rooms ){ boolean[] lake = Patch.generate( l.width(), l.height(), waterFill, waterSmoothness, true ); if (!rooms.isEmpty()){ for (Room r : rooms){ for (Point p : r.waterPlaceablePoints()){ int i = l.pointToCell(p); if (lake[i] && l.map[i] == Terrain.EMPTY){ l.map[i] = Terrain.WATER; } } } } else { for (int i = 0; i < l.length(); i ++) { if (lake[i] && l.map[i] == Terrain.EMPTY){ l.map[i] = Terrain.WATER; } } } }
protected void paintWater( Level l, ArrayList<Room> rooms ){ boolean[] lake = Patch.generate( l.width(), l.height(), waterFill, waterSmoothness, true ); if (!rooms.isEmpty()){ for (Room r : rooms){ for (Point p : r.waterPlaceablePoints()){ int i = l.pointToCell(p); if (lake[i] && l.map[i] == Terrain.EMPTY){ l.map[i] = Terrain.WATER; } } } } else { for (int i = 0; i < l.length(); i ++) { if (lake[i] && l.map[i] == Terrain.EMPTY){ l.map[i] = Terrain.WATER; } } } }
protected void paintGrass( Level l, ArrayList<Room> rooms ) { boolean[] grass = Patch.generate( l.width(), l.height(), grassFill, grassSmoothness, true );
protected void paintGrass( Level l, ArrayList<Room> rooms ) { boolean[] grass = Patch.generate( l.width(), l.height(), grassFill, grassSmoothness, true );
Painter.fill( level, this, 1, Terrain.GRASS ); boolean[] grass = Patch.generate(width()-2, height()-2, 0.5f, 0, true); for (int i=top + 1; i < bottom; i++) { for (int j=left + 1; j < right; j++) {
Painter.fill( level, this, 1, Terrain.GRASS ); boolean[] grass = Patch.generate(width()-2, height()-2, 0.5f, 0, true); for (int i=top + 1; i < bottom; i++) { for (int j=left + 1; j < right; j++) {
map[entrance] = Terrain.ENTRANCE; boolean[] patch = Patch.generate(width, height, 0.30f, 6, true); for (int i = 0; i < length(); i++) { if (map[i] == Terrain.EMPTY && patch[i]) {
map[entrance] = Terrain.ENTRANCE; boolean[] patch = Patch.generate(width, height, 0.30f, 6, true); for (int i = 0; i < length(); i++) { if (map[i] == Terrain.EMPTY && patch[i]) {
map[entrance] = Terrain.ENTRANCE; boolean[] patch = Patch.generate( width, height, 0.30f, 6, true ); for (int i=0; i < length(); i++) { if (map[i] == Terrain.EMPTY && patch[i]) {
map[entrance] = Terrain.ENTRANCE; boolean[] patch = Patch.generate( width, height, 0.30f, 6, true ); for (int i=0; i < length(); i++) { if (map[i] == Terrain.EMPTY && patch[i]) {