mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 13:14:17 +01:00
Update for new gamedata.
This commit is contained in:
parent
2585de8b21
commit
c06d5b0871
4 changed files with 8 additions and 10 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 5fa4d0e7972423b73f8cf569bb2bfbeddd825c8a
|
||||
Subproject commit e8220a0a74e9480330e98ed7ca462353434b9649
|
||||
|
|
@ -57,9 +57,7 @@ public partial class TexToolsMeta
|
|||
if (data == null)
|
||||
return;
|
||||
|
||||
using var reader = new BinaryReader(new MemoryStream(data));
|
||||
var value = (GmpEntry)reader.ReadUInt32();
|
||||
value.UnknownTotal = reader.ReadByte();
|
||||
var value = GmpEntry.FromTexToolsMeta(data.AsSpan(0, 5));
|
||||
var def = ExpandedGmpFile.GetDefault(_metaFileManager, metaFileInfo.PrimaryId);
|
||||
if (_keepDefault || value != def)
|
||||
MetaManipulations.Add(new GmpManipulation(value, metaFileInfo.PrimaryId));
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ public sealed unsafe class CmpFile : MetaBaseFile
|
|||
|
||||
public float this[SubRace subRace, RspAttribute attribute]
|
||||
{
|
||||
get => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspEntry.ByteSize + (int)attribute * 4);
|
||||
set => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspEntry.ByteSize + (int)attribute * 4) = value;
|
||||
get => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspData.ByteSize + (int)attribute * 4);
|
||||
set => *(float*)(Data + RacialScalingStart + ToRspIndex(subRace) * RspData.ByteSize + (int)attribute * 4) = value;
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
|
|
@ -42,7 +42,7 @@ public sealed unsafe class CmpFile : MetaBaseFile
|
|||
public static float GetDefault(MetaFileManager manager, SubRace subRace, RspAttribute attribute)
|
||||
{
|
||||
var data = (byte*)manager.CharacterUtility.DefaultResource(InternalIndex).Address;
|
||||
return *(float*)(data + RacialScalingStart + ToRspIndex(subRace) * RspEntry.ByteSize + (int)attribute * 4);
|
||||
return *(float*)(data + RacialScalingStart + ToRspIndex(subRace) * RspData.ByteSize + (int)attribute * 4);
|
||||
}
|
||||
|
||||
private static int ToRspIndex(SubRace subRace)
|
||||
|
|
|
|||
|
|
@ -157,12 +157,12 @@ public sealed class ExpandedGmpFile : ExpandedEqpGmpBase, IEnumerable<GmpEntry>
|
|||
|
||||
public GmpEntry this[PrimaryId idx]
|
||||
{
|
||||
get => (GmpEntry)GetInternal(idx);
|
||||
set => SetInternal(idx, (ulong)value);
|
||||
get => new() { Value = GetInternal(idx) };
|
||||
set => SetInternal(idx, value.Value);
|
||||
}
|
||||
|
||||
public static GmpEntry GetDefault(MetaFileManager manager, PrimaryId primaryIdx)
|
||||
=> (GmpEntry)GetDefaultInternal(manager, InternalIndex, primaryIdx, (ulong)GmpEntry.Default);
|
||||
=> new() { Value = GetDefaultInternal(manager, InternalIndex, primaryIdx, GmpEntry.Default.Value) };
|
||||
|
||||
public void Reset(IEnumerable<PrimaryId> entries)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue