Class CfaFile
Connects to *.CFA files to extract image data. CFA is a legacy Arena image file format that is largely unused in Daggerfall. Most significant usage is first-person horse and cart transport modes. Notes: This implementation is limited in that it only supports 8-bit wide indexed pixels without muxing. Thanks to creator of WinArena for releasing source to decode Arena CFA files. This made it significantly easier to research Daggerfall's CFA files for DFTFU.
Inherited Members
Namespace: DaggerfallConnect.Arena2
Assembly: Assembly-CSharp.dll
Syntax
public class CfaFile : BaseImageFile
Constructors
| Improve this Doc View SourceCfaFile()
Default constructor.
Declaration
public CfaFile()
CfaFile(String, FileUsage, Boolean)
Load constructor.
Declaration
public CfaFile(string filePath, FileUsage usage, bool readOnly)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to *.CFA 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 "CFA File" as game data 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
Gets palette name for CFA file.
Declaration
public override string PaletteName { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
| Improve this Doc View SourceRecordCount
Number of image records in this CFA file.
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 for specified record and frame.
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. |
Overrides
| Improve this Doc View SourceGetFrameCount(Int32)
Gets number of frames.
Declaration
public override int GetFrameCount(int record)
Parameters
Type | Name | Description |
---|---|---|
Int32 | record | Record index. Only 1 record in Daggerfall CFA files so value should be 0. |
Returns
Type | Description |
---|---|
Int32 | Number of frames. |
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 | DFSize object. |
Overrides
| Improve this Doc View SourceLoad(String, FileUsage, Boolean)
Loads a CFA file.
Declaration
public override bool Load(string filePath, FileUsage usage, bool readOnly)
Parameters
Type | Name | Description |
---|---|---|
String | filePath | Absolute path to *.CFA 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 |