lib/dun.js
function DunFile(startCoord, rawPillarData, dunName) {
    this.startCol = startCoord[0];
    this.startRow = startCoord[1];
    this.fileName = dunName;

    this.rawPillarData = rawPillarData;
    this.rawColCount = this.rawPillarData.length;
    this.rawRowCount = (this.rawColCount > 0) ? this.rawPillarData[0].length : 0;

    this.pillarData = null;     // Initialized during unpack operation.
    this.colCount = this.rawColCount * 2;
    this.rowCount = this.rawRowCount * 2;
}
function DunFile(startCoord, rawPillarData, dunName) {
    this.startCol = startCoord[0];
    this.startRow = startCoord[1];
    this.fileName = dunName;

    this.rawPillarData = rawPillarData;
    this.rawColCount = this.rawPillarData.length;
    this.rawRowCount = (this.rawColCount > 0) ? this.rawPillarData[0].length : 0;

    this.pillarData = null;     // Initialized during unpack operation.
    this.colCount = this.rawColCount * 2;
    this.rowCount = this.rawRowCount * 2;
}
function DunFile ( startCoord , rawPillarData , dunName ) { this . startCol = startCoord [ 0 ] ; this . startRow = startCoord [ 1 ] ; this . fileName = dunName ; this . rawPillarData = rawPillarData ; this . rawColCount = this . rawPillarData . length ; this . rawRowCount = ( this . rawColCount > 0 ) ? this . rawPillarData [ 0 ] . length : 0 ; this . pillarData = null ; // Initialized during unpack operation. this . colCount = this . rawColCount * 2 ; this . rowCount = this . rawRowCount * 2 ; }
DUN files contain information for arranging the squares of a TIL file.
Multiple DUN files can be pieced together to form entire levels.
For example, the 'town' level is a combination of 4 DUN files.

In addition, DUN files also provide information regarding dungeon
monsters and object ids.
DUN files contain information for arranging the squares of a TIL file . Multiple DUN files can be pieced together to form entire levels . For example the town level is a combination of 4 DUN files .