internal static NPCDialogDifficulty Read(InternalBitArray bits) { var output = new NPCDialogDifficulty(); for (int i = 0; i < output._dialogs.Length; i++) { var data = new NPCDialogData { Introduction = bits[i], Congratulations = bits[i + (0x18 * 8)] }; output._dialogs[i] = data; } return(output); }
public static NPCDialogSection Read(IBitReader reader) { var npcDialogSection = new NPCDialogSection { Header = reader.ReadUInt16(), Length = reader.ReadUInt16() }; Span <byte> bytes = stackalloc byte[0x30]; reader.ReadBytes(bytes); using var bits = new InternalBitArray(bytes); for (int i = 0; i < npcDialogSection._difficulties.Length; i++) { npcDialogSection._difficulties[i] = NPCDialogDifficulty.Read(bits); } return(npcDialogSection); }
internal InternalBitArray?Traverse(char symbol, InternalBitArray data) { if (IsLeaf()) { return(symbol.Equals(Symbol) ? data : null); } else { if (Left is not null) { data.Add(false); var left = Left.Traverse(symbol, data); if (left is null) { data.Length--; } else { return(data); } } if (Right is not null) { data.Add(true); var right = Right.Traverse(symbol, data); if (right is null) { data.Length--; } else { return(data); } } return(null); } }
private ActVWaypoints(InternalBitArray flags) => _flags = flags;
private Quest(InternalBitArray flags) => _flags = flags;
public Status(byte flags) { _flags = new InternalBitArray(stackalloc byte[] { flags });
public BitReader(ReadOnlySpan <byte> bytes) { Position = 0; _bits = new InternalBitArray(bytes); }