mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 00:25:44 +00:00
ZoneCodeGenerator: Add computations to check for dynamic array sizes and partially loaded structures
This commit is contained in:
parent
ec8c00a4b9
commit
0db6f90980
@ -84,6 +84,15 @@ namespace ZoneCodeGenerator.Generating.Computations
|
|||||||
information.Parent.OrderedMembers.LastOrDefault(member =>
|
information.Parent.OrderedMembers.LastOrDefault(member =>
|
||||||
!member.IsLeaf && !member.Computations.ShouldIgnore) == information;
|
!member.IsLeaf && !member.Computations.ShouldIgnore) == information;
|
||||||
|
|
||||||
|
public bool HasDynamicArraySize => information.Member.VariableType.References
|
||||||
|
.OfType<ReferenceTypeArray>()
|
||||||
|
.Any(array => array.DynamicSize != null);
|
||||||
|
|
||||||
|
public bool IsBarrier => HasDynamicArraySize ||
|
||||||
|
information.StructureType != null &&
|
||||||
|
information.StructureType != information.Parent &&
|
||||||
|
information.StructureType.Computations.Barrier != null;
|
||||||
|
|
||||||
public MemberReferenceComputations References => new MemberReferenceComputations(information);
|
public MemberReferenceComputations References => new MemberReferenceComputations(information);
|
||||||
|
|
||||||
public MemberComputations(MemberInformation information)
|
public MemberComputations(MemberInformation information)
|
||||||
|
@ -12,6 +12,9 @@ namespace ZoneCodeGenerator.Generating.Computations
|
|||||||
|
|
||||||
public bool IsUsed => information.Usages.Any();
|
public bool IsUsed => information.Usages.Any();
|
||||||
|
|
||||||
|
public MemberInformation Barrier =>
|
||||||
|
information.OrderedMembers.FirstOrDefault(memberInformation => memberInformation.Computations.IsBarrier);
|
||||||
|
|
||||||
public StructureComputations(StructureInformation information)
|
public StructureComputations(StructureInformation information)
|
||||||
{
|
{
|
||||||
this.information = information;
|
this.information = information;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user