public static int PlatformSize(int x86, int x64, bool align = false) { var size = Current.Platform == Platform.X86 ? x86 : x64; if (align) { size = MemoryObject.AlignedSize(size, Current.Platform == Platform.X86 ? 4 : 8); } return(size); }
public ScriptFormula(BufferMemoryReader reader, ref int offset) { x00 = reader.Read <int>(offset + 0x00); x04 = reader.Read <int>(offset + 0x04); x08 = reader.Read <int>(offset + 0x08); x0C = reader.Read <int>(offset + 0x0C); x10 = reader.Read <int>(offset + 0x10); OpCodeNameSize = reader.Read <int>(offset + 0x14); x18 = reader.Read <int>(offset + 0x18); OpCodeSize = reader.Read <int>(offset + 0x1C); OpCodeName = reader.ReadString(offset + 0x20, OpCodeNameSize); OpCode = reader.ReadBytes(offset + 0x20 + MemoryObject.AlignedSize(OpCodeNameSize, 4), OpCodeSize); offset += 0x20 + MemoryObject.AlignedSize(OpCodeNameSize, 4) + MemoryObject.AlignedSize(OpCodeSize, 4); }