Unit stone_cavern
Classes, Interfaces, Objects and Records
Description
Generate a cave using two passes of a cellular automata algorithm and then remove any unreachable areas by floodfilling the map and discarding maps that are less than 39% floor tiles. Stairs are placed on the top level and a connecting stairway is placed on the floor below. If the floor below has a wall tile where the stair should be, that floor is discarded and generated again. Pillars are also added to the generated floors.
Uses
Overview
Functions and Procedures
Types
Constants
Variables
Description
Functions and Procedures
procedure fillWithWalls; |
|
Fill array with walls
|
procedure randomTileFill; |
|
Fill array with random tiles
|
procedure digCave(floorNumber: byte); |
|
Dig out the cave
|
procedure generate(title: string; idNumber: smallint; totalDepth: byte); |
|
Generate a caves and place the stairs
|
function blockORnot(x, y: integer): Tbkinds; |
|
Determines if a tile is a wall or not
|
procedure calcDistances(x, y: smallint); |
|
Floodfill cave to find unreachable areas
|
function leftHasFloor(): boolean; |
|
Check that the left side of the map contains floor tiles
|
function rightHasFloor(): boolean; |
|
Check that the right side of the map contains floor tiles
|
procedure placePillar; |
|
Try to randomly place a pillar
|
Types
Constants
Variables
Generated by PasDoc 0.16.0.