private void WritePositionAsSingle(BinaryRom rom, Vector3 position, int offset) { rom.Position = offset; rom.Write(position.X); rom.Write(position.Y); rom.Write(position.Z); }
private void WritePositionAsShort(BinaryRom rom, Vector3 position, int offset) { rom.Position = offset; rom.Write(Conversions.ToShort(position.X)); rom.Write(Conversions.ToShort(position.Y)); rom.Write(Conversions.ToShort(position.Z)); }
public static void WriteStarWrapperFunction(BinaryRom rom) { var StarWrapperFunction = new[] { 0x27, 0xBD, 0xFF, 0xE8, 0xAF, 0xBF, 0x0, 0x14, 0xC4, 0x8C, 0x0, 0x0, 0xC4, 0x8E, 0x0, 0x4, 0xC, 0xB, 0xCA, 0xE2, 0x8C, 0x86, 0x0, 0x8, 0x8F, 0xBF, 0x0, 0x14, 0x27, 0xBD, 0x0, 0x18, 0x3, 0xE0, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0 }; rom.Position = 0x1202700; foreach (byte b in StarWrapperFunction) { rom.Write(b); } }
private bool WriteNewPointer(BinaryRom rom) { // Get RAM location uint address = GetRamLocation(rom); // Set ROM position if (address != TableRamLocation) { rom.Position = 0x7C8E2; rom.Write(Conversions.ToUShort(TableRamLocation >> 16 & (long)0xFFFF)); rom.Position = 0x7C8E6; rom.Write(Conversions.ToUShort(TableRamLocation & (long)0xFFFF)); return(true); } return(false); }
private void Read(BinaryRom rom, uint location) { int curID = -1; rom.Position = location; while (rom.ReadUInt64() != (decimal)0x6300000000000000) { var entry = new ItemBoxContentEntry(); rom.Position -= 8; curID = rom.ReadByte(); entry.ID = Conversions.ToByte(curID); entry.BParam1 = rom.ReadByte(); entry.BParam2 = rom.ReadByte(); entry.ModelID = rom.ReadByte(); entry.BehavAddress = rom.ReadUInt32(); ContentTable.Add(entry); } }