public static Read ( Script script, |
||
script | Script | |
reader | ||
return |
public Script(AssetManager manager, BinaryReader reader, string name) : base(manager, name) { long end = reader.BaseStream.Length; ExceptionEnd = ""; reader.Require(0x01011388); CodeAddressA = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressB = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressC = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressD = reader.ReadUInt16(); reader.Require((ushort)0x0101); CodeAddressE = reader.ReadUInt16(); while (reader.BaseStream.Position < end) { try { var instruction = ScriptInstruction.Read(this, reader); InstructionsMutable.Add(instruction); } catch (Exception exception) { ExceptionEnd = string.Format("\r\n{0:X}: Exception: {1}\r\nStopping\r\n", reader.BaseStream.Position, exception); break; } } Link(); }