Show / Hide Table of Contents

Class WoodsFile

Reads data from WOODS.WLD.

Inheritance
Object
WoodsFile
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class WoodsFile

Constructors

| Improve this Doc View Source

WoodsFile()

Default constructor.

Declaration
public WoodsFile()
| Improve this Doc View Source

WoodsFile(String, FileUsage, Boolean)

Load constructor.

Declaration
public WoodsFile(string filePath, FileUsage usage, bool readOnly)
Parameters
Type Name Description
String filePath

Absolute path to WOODS.WLD.

FileUsage usage

Specify if file will be accessed from disk, or loaded into RAM.

Boolean readOnly

File will be read-only if true, read-write if false.

Fields

| Improve this Doc View Source

mapHeightValue

Height of heightmap in bytes.

Declaration
public const int mapHeightValue = 500
Field Value
Type Description
Int32
| Improve this Doc View Source

mapWidthValue

Width of heightmap in bytes.

Declaration
public const int mapWidthValue = 1000
Field Value
Type Description
Int32

Properties

| Improve this Doc View Source

Buffer

Gets or sets extracted heightmap data.

Declaration
public byte[] Buffer { get; set; }
Property Value
Type Description
Byte[]
| Improve this Doc View Source

Filename

Gets default WOODS.WLD filename.

Declaration
public static string Filename { get; }
Property Value
Type Description
String
| Improve this Doc View Source

MapHeight

Height of heightmap data (always 500).

Declaration
public static int MapHeight { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

MapWidth

Width of heightmap data (always 1000).

Declaration
public static int MapWidth { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

GetHeightMapDFBitmap()

Get extracted heightmap data as an indexed image.

Declaration
public DFBitmap GetHeightMapDFBitmap()
Returns
Type Description
DFBitmap

DFBitmap object.

| Improve this Doc View Source

GetHeightMapValue(Int32, Int32)

Gets value for specified position in heightmap. Clamps range to ensure not outside array bounds.

Declaration
public byte GetHeightMapValue(int mapPixelX, int mapPixelY)
Parameters
Type Name Description
Int32 mapPixelX

X position in heightmap. 0 to MapWidth-1.

Int32 mapPixelY

Y position in heightmap. 0 to MapHeight-1.

Returns
Type Description
Byte

Value of heightmap data.

| Improve this Doc View Source

GetHeightMapValuesRange(Int32, Int32, Int32)

Gets range of small height map data.

Declaration
public byte[, ] GetHeightMapValuesRange(int mapPixelX, int mapPixelY, int dim)
Parameters
Type Name Description
Int32 mapPixelX

X position in heightmap. 0 to MapWidth-1.

Int32 mapPixelY

Y position in heightmap. 0 to MapHeight-1.

Int32 dim

Dimension of heightmap samples to read.

Returns
Type Description
Byte[,]

Byte array dim,dim in size.

| Improve this Doc View Source

GetHeightMapValuesRange1Dim(Int32, Int32, Int32)

Gets range of small height map data.

Declaration
public byte[] GetHeightMapValuesRange1Dim(int mapPixelX, int mapPixelY, int dim)
Parameters
Type Name Description
Int32 mapPixelX

X position in heightmap. 0 to MapWidth-1.

Int32 mapPixelY

Y position in heightmap. 0 to MapHeight-1.

Int32 dim

Dimension of heightmap samples to read.

Returns
Type Description
Byte[]

Byte 1D array dim * dim in size.

| Improve this Doc View Source

GetLargeHeightMapValuesRange(Int32, Int32, Int32)

Gets a range of large height map values with unknown grid stripped away. Also inverts Y order of height samples.

Declaration
public byte[, ] GetLargeHeightMapValuesRange(int mapPixelX, int mapPixelY, int dim)
Parameters
Type Name Description
Int32 mapPixelX

Start X position in heightmap. 0 to MapWidth-1.

Int32 mapPixelY

Start Y position in heightmap. 0 to MapHeight-1.

Int32 dim

Dimension of heightmap cells to read.

Returns
Type Description
Byte[,]

Byte array dim3,dim3 in size.

| Improve this Doc View Source

GetLargeMapData(Int32, Int32)

Gets 5x5 large map data for given map pixel. Read exactly as found in files.

Declaration
public byte[, ] GetLargeMapData(int mapPixelX, int mapPixelY)
Parameters
Type Name Description
Int32 mapPixelX

X position in heightmap. 0 to MapWidth-1.

Int32 mapPixelY

Y position in heightmap. 0 to MapHeight-1.

Returns
Type Description
Byte[,]

5x5 grid of map data.

| Improve this Doc View Source

Load(String, FileUsage, Boolean)

Load WOODS.WLD file.

Declaration
public bool Load(string filePath, FileUsage usage, bool readOnly)
Parameters
Type Name Description
String filePath

Absolute path to WOODS.WLD file.

FileUsage usage

Specify if file will be accessed from disk, or loaded into RAM.

Boolean readOnly

File will be read-only if true, read-write if false.

Returns
Type Description
Boolean

True if successful, otherwise false.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX