public virtual void WriteYAML(BYML Owner, StringBuilder b, int Indent, bool FirstIndent = true) { if (FirstIndent) { b.Append(new String(' ', Indent * 2)); } b.AppendLine("Unknown Full Node (0x" + NodeType.ToString("X2") + ")"); }
private static void FormatValueNode(BYML Owner, StringBuilder b, byte Type, uint Value) { switch (Type) { case 0xA0: b.AppendFormat(" {0}", Owner.StringValueTableNode.StringTable[Value]); break; case 0xA1: break; case 0xD1: b.AppendFormat(" {0}", (int)Value); break; case 0xD2: b.AppendFormat(" {0}", BitConverter.ToSingle(BitConverter.GetBytes(Value), 0).ToString().Replace(",", ".")); break; default: b.AppendFormat(" {0:X8}", Value); break; } }
public override void WriteYAML(BYML Owner, StringBuilder b, int Indent, bool FirstIndent = true) { for (int i = 0; i < NrEntries; i++) { if (i != 0 || FirstIndent) { b.Append(new String(' ', Indent * 2)); } b.AppendFormat("{0}:", Owner.NodeNameTableNode.StringTable[SubNodes[i].StringIndex]); if ((SubNodes[i].NodeType >> 4) == 0xC) { b.AppendLine(); SubNodes[i].FullNode.WriteYAML(Owner, b, Indent + 1); } else { FormatValueNode(Owner, b, SubNodes[i].NodeType, SubNodes[i].Value); b.AppendLine(); } } }
public override void WriteYAML(BYML Owner, StringBuilder b, int Indent, bool FirstIndent = true) { for (int i = 0; i < NrEntries; i++) { if (i != 0 || FirstIndent) { b.Append(new String(' ', Indent * 2)); } b.Append("- "); if ((NodeTypes[i] >> 4) == 0xC) { FullNodes[i].WriteYAML(Owner, b, Indent + 1, false); b.AppendLine(); } else { FormatValueNode(Owner, b, NodeTypes[i], Values[i]); b.AppendLine(); } } }