Class SkyFile
Connects to a SKY??.DAT file to enumerate and extract image data.
Inherited Members
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class SkyFile : BaseImageFile
Constructors
| Improve this Doc View SourceSkyFile()
Default constructor.
Declaration
public SkyFile()
SkyFile(String, FileUsage, Boolean)
Load constructor.
Declaration
public SkyFile(string filePath, FileUsage usage, bool readOnly)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to SKY??.DAT 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. |
Properties
| Improve this Doc View SourceDescription
Description of this file (always "SKY File" as the game files contain no text descriptions for this file type).
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourcePaletteName
SKY files are fully palettized per frame. This method always returns string.Empty and is implemented only to satisfy abstract base class DFImage. Use GetDFPalette(Frame) instead.
Declaration
public override string PaletteName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceRecordCount
Number of records in this Sky file. Always 2 for a SKY file (one animation each for east and west sky).
Declaration
public override int RecordCount { get; }
Property Value
Type | Description |
---|---|
Int32 |
Overrides
Methods
| Improve this Doc View SourceGetDFBitmap(Int32, Int32)
Gets bitmap data as indexed 8-bit byte array.
Declaration
public override DFBitmap GetDFBitmap(int record, int frame)
Parameters
Type | Name | Description |
---|---|---|
Int32 | record | Index of record. |
Int32 | frame | Index of frame. |
Returns
Type | Description |
---|---|
DFBitmap | DFBitmap object. Check DFBitmap.Data for null on failure. |
Overrides
| Improve this Doc View SourceGetDFPalette(Int32)
Gets palette data for specified record and frame.
Declaration
public DFPalette GetDFPalette(int frame)
Parameters
Type | Name | Description |
---|---|---|
Int32 | frame | Index of frame. |
Returns
Type | Description |
---|---|
DFPalette | DFPalette object or null. |
GetFrameCount(Int32)
Gets number of frames in specified record. Always 32 for SKY files.
Declaration
public override int GetFrameCount(int record)
Parameters
Type | Name | Description |
---|---|---|
Int32 | record | Index of record. |
Returns
Type | Description |
---|---|
Int32 | Number of frames or -1 on error. |
Overrides
| Improve this Doc View SourceGetSize(Int32)
Gets width and height of specified record. All frames of this record are the same dimensions.
Declaration
public override DFSize GetSize(int record)
Parameters
Type | Name | Description |
---|---|---|
Int32 | record | Index of record. |
Returns
Type | Description |
---|---|
DFSize | Size object. |
Overrides
| Improve this Doc View SourceIndexToFileName(Int32)
Returns a SKY??.DAT filename based on index. If the index is not valid, the returned filename will also be invalid.
Declaration
public static string IndexToFileName(int skyIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | skyIndex | Index of sky archive. |
Returns
Type | Description |
---|---|
String | Texture filename in the format SKY??.DAT. |
Load(String, FileUsage, Boolean)
Loads a SKY file.
Declaration
public override bool Load(string filePath, FileUsage usage, bool readOnly)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to SKY??.DAT 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. |