C# Class Nexus.Client.Games.Gamebryo.Tools.Shader.SDPArchives

Encapsulates working with shader archive files.
Show file Open project: NexusMods/NexusModManager-4.5 Class Usage Examples

Public Methods

Method Description
EditShader ( int package, string name, byte newData, byte &oldData ) : bool

Edits the specified shader.

GetPath ( int package ) : string

Gets the path of the specified shader package.

GetShader ( int package, string shader ) : byte[]

Gets the specified shader's data.

RestoreShader ( int package, string name, byte data, uint crc ) : bool

Restores the specified shader to the given data.

SDPArchives ( IGameModeEnvironmentInfo p_gmiGameModeInfo, FileUtil p_futFileUtility ) : System

A simple constructor that initializes the object with the given values.

Private Methods

Method Description
ReplaceShader ( string file, string shader, byte newdata, byte &OldData, uint crc ) : bool

Replaces the specified shader data.

Method Details

EditShader() public method

Edits the specified shader.
public EditShader ( int package, string name, byte newData, byte &oldData ) : bool
package int The id of the package containing the shader to edit.
name string The name of the shader to edit.
newData byte The data with which to replaced the existing shader data.
oldData byte Returns the existing shader data.
return bool

GetPath() public method

Gets the path of the specified shader package.
public GetPath ( int package ) : string
package int The id of the package whose path is to be returned.
return string

GetShader() public method

Gets the specified shader's data.
public GetShader ( int package, string shader ) : byte[]
package int The id of the package containing the shader to retrieve.
shader string The name of the shader to retrieve.
return byte[]

RestoreShader() public method

Restores the specified shader to the given data.
public RestoreShader ( int package, string name, byte data, uint crc ) : bool
package int The id of the package containing the shader to restore.
name string The name of the shader to restore.
data byte The data with which to replaced the existing shader data.
crc uint The CRC of the new shader data. Used to verify the replacement; use 0 if no validation is desired.
return bool

SDPArchives() public method

A simple constructor that initializes the object with the given values.
public SDPArchives ( IGameModeEnvironmentInfo p_gmiGameModeInfo, FileUtil p_futFileUtility ) : System
p_gmiGameModeInfo IGameModeEnvironmentInfo The environment info of the current game mode.
p_futFileUtility Nexus.Client.Util.FileUtil The file utility class.
return System