mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-01-02 05:43:42 +01:00
Fix Shader Flags, add Additional Flags
This commit is contained in:
parent
50b6d773ef
commit
92e9b472ed
1 changed files with 21 additions and 2 deletions
|
|
@ -325,6 +325,7 @@ public partial class MtrlTab
|
||||||
{
|
{
|
||||||
ret |= DrawPackageNameInput(disabled);
|
ret |= DrawPackageNameInput(disabled);
|
||||||
ret |= DrawShaderFlagsInput(disabled);
|
ret |= DrawShaderFlagsInput(disabled);
|
||||||
|
ret |= DrawAdditionalFlagsInput(disabled);
|
||||||
DrawCustomAssociations();
|
DrawCustomAssociations();
|
||||||
ret |= DrawMaterialShaderKeys(disabled);
|
ret |= DrawMaterialShaderKeys(disabled);
|
||||||
DrawMaterialShaders();
|
DrawMaterialShaders();
|
||||||
|
|
@ -378,8 +379,8 @@ public partial class MtrlTab
|
||||||
{
|
{
|
||||||
var shpkFlags = (int)Mtrl.ShaderPackage.Flags;
|
var shpkFlags = (int)Mtrl.ShaderPackage.Flags;
|
||||||
Im.Item.SetNextWidthScaled(250.0f);
|
Im.Item.SetNextWidthScaled(250.0f);
|
||||||
if (!Im.Input.Scalar("Shader Flags"u8, ref shpkFlags, 0, 0,
|
if (!Im.Input.Scalar("Shader Flags"u8, ref shpkFlags, "%08X"u8,
|
||||||
InputTextFlags.CharsHexadecimal | (disabled ? InputTextFlags.ReadOnly : InputTextFlags.None)))
|
flags: InputTextFlags.CharsHexadecimal | (disabled ? InputTextFlags.ReadOnly : InputTextFlags.None)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Mtrl.ShaderPackage.Flags = (uint)shpkFlags;
|
Mtrl.ShaderPackage.Flags = (uint)shpkFlags;
|
||||||
|
|
@ -387,6 +388,24 @@ public partial class MtrlTab
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool DrawAdditionalFlagsInput(bool disabled)
|
||||||
|
{
|
||||||
|
const uint lockedFlags = 0x00000FFC;
|
||||||
|
|
||||||
|
if (Mtrl.AdditionalData.Length < 4)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
var originalFlags = Mtrl.TableFlags.Flags;
|
||||||
|
var additionalFlags = originalFlags;
|
||||||
|
Im.Item.SetNextWidthScaled(250.0f);
|
||||||
|
if (!Im.Input.Scalar("Additional Flags"u8, ref additionalFlags, "%08X"u8,
|
||||||
|
flags: InputTextFlags.CharsHexadecimal | (disabled ? InputTextFlags.ReadOnly : InputTextFlags.None)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Mtrl.TableFlags = new((additionalFlags & ~lockedFlags) | (originalFlags & lockedFlags));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show the currently associated shpk file, if any, and the buttons to associate
|
/// Show the currently associated shpk file, if any, and the buttons to associate
|
||||||
/// a specific shpk from your drive, the modded shpk by path or the default shpk.
|
/// a specific shpk from your drive, the modded shpk by path or the default shpk.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue