public override void OnRebuild(VoidPtr address, int length, bool force) { BGMG *header = (BGMG *)address; * header = new BGMG(Children.Count); uint offset = (uint)(0x10 + Children.Count * 4); for (int i = 0; i < Children.Count; i++) { int size = _children[i].CalculateSize(true); *(buint *)(address + 0x10 + i * 4) = offset; _children[i].Rebuild(address + offset, size, true); offset += (uint)size; } }
public override void OnRebuild(VoidPtr address, int length, bool force) { BGMG *header = (BGMG *)address; * header = new BGMG(Children.Count); uint offset = (uint)(0x10 + (Children.Count * 4)); for (int i = 0; i < Children.Count; i++) { if (i > 0) { offset += (uint)(Children[i - 1].CalculateSize(false)); } *(buint *)((VoidPtr)address + 0x10 + i * 4) = offset; _children[i].Rebuild((VoidPtr)address + offset, _children[i].CalculateSize(false), true); } }