raylib building

This commit is contained in:
nub31
2025-11-05 18:40:12 +01:00
parent 17e754fc6e
commit 1dd14c8a77
7 changed files with 195 additions and 201 deletions

View File

@@ -183,6 +183,22 @@ public class NubStructFieldType(string name, NubType type, bool hasDefaultValue)
public bool HasDefaultValue { get; } = hasDefaultValue;
}
public class NubEnumType(string module, string name, NubIntType underlyingType, Dictionary<string, ulong> members) : NubType
{
public string Module { get; } = module;
public string Name { get; } = name;
public NubIntType UnderlyingType { get; } = underlyingType;
public Dictionary<string, ulong> Members { get; } = members;
public override ulong GetSize() => UnderlyingType.GetSize();
public override ulong GetAlignment() => UnderlyingType.GetSize();
public override bool IsAggregate() => false;
public override bool Equals(NubType? other) => other is NubEnumType enumType && Name == enumType.Name && Module == enumType.Module;
public override int GetHashCode() => HashCode.Combine(typeof(NubEnumType), Module, Name);
public override string ToString() => $"{Module}::{Name}";
}
public class NubSliceType(NubType elementType) : NubType
{
public NubType ElementType { get; } = elementType;