Material editor 2099

This commit is contained in:
Exter-N 2023-08-24 05:51:21 +02:00
parent f64fdd2b26
commit b8d09ab660
15 changed files with 1221 additions and 651 deletions

View file

@ -27,8 +27,16 @@ public partial class ModEditWindow
public ShpkTab(FileDialogService fileDialog, byte[] bytes)
{
FileDialog = fileDialog;
Shpk = new ShpkFile(bytes, true);
Header = $"Shader Package for DirectX {(int)Shpk.DirectXVersion}";
try
{
Shpk = new ShpkFile(bytes, true);
}
catch (NotImplementedException)
{
Shpk = new ShpkFile(bytes, false);
}
Header = $"Shader Package for DirectX {(int)Shpk.DirectXVersion}";
Extension = Shpk.DirectXVersion switch
{
ShpkFile.DxVersion.DirectX9 => ".cso",