Class PakFile
Connects to CLIMATE.PAK or POLITIC.PAK to extract and read meta-data about the Daggerfall world map.
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class PakFile
Constructors
| Improve this Doc View SourcePakFile()
Default constructor.
Declaration
public PakFile()
PakFile(String)
Load constructor.
Declaration
public PakFile(string filePath)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to PAK file. |
Fields
| Improve this Doc View SourcepakHeightValue
Number of PAK rows.
Declaration
public const int pakHeightValue = 500
Field Value
Type | Description |
---|---|
Int32 |
pakWidthValue
Length of each PAK row.
Declaration
public const int pakWidthValue = 1001
Field Value
Type | Description |
---|---|
Int32 |
Properties
| Improve this Doc View SourceBuffer
Gets or sets extracted PAK data.
Declaration
public byte[] Buffer { get; set; }
Property Value
Type | Description |
---|---|
Byte[] |
PakRowCount
Number of rows in PAK file (always 500).
Declaration
public int PakRowCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
PakRowLength
Number of bytes per PAK row (always 1001).
Declaration
public int PakRowLength { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
| Improve this Doc View SourceGetDFBitmap()
Get extracted PAK data as an indexed image.
Declaration
public DFBitmap GetDFBitmap()
Returns
Type | Description |
---|---|
DFBitmap | DFBitmap object. |
GetValue(Int32, Int32)
Gets value for specified position in world map.
Declaration
public int GetValue(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | X position in world map. 0 to PakRowLength-1. |
Int32 | y | Y position in world map. 0 to PakRowCount-1. |
Returns
Type | Description |
---|---|
Int32 | Value of pak data if valid, -1 if invalid. |
Load(String)
Load PAK file.
Declaration
public bool Load(string filePath)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to PAK file. |
Returns
Type | Description |
---|---|
Boolean | True if successful, otherwise false. |
SetValue(Int32, Int32, Byte)
Sets value for specified position in world map. Allows loaded data from Pak file to be modified at runtime by mods.
Declaration
public bool SetValue(int x, int y, byte value)
Parameters
Type | Name | Description |
---|---|---|
Int32 | x | X position in world map. 0 to PakRowLength-1. |
Int32 | y | Y position in world map. 0 to PakRowCount-1. |
Byte | value | Value of pak data to set. |
Returns
Type | Description |
---|---|
Boolean | True if pak data was set, false otherwise. |