public static Doodad Read(FormatBase input) { Doodad temp = new Doodad(); // 24-bit offset? byte[] b = input.readBytes(3); temp.offset = BitConverter.ToUInt32(new byte[4] { b[0], b[1], b[2], 0 }, 0); Stuffer.Stuff(temp, input, "Doodad", true); return temp; }
public Chunk_MODD(WMOFile file) : base(file, "MODD", Magic) { int doodadCount = (int)ChunkSize / 40; doodads = new Doodad[doodadCount]; for (int i = 0; i < doodadCount; i++) doodads[i] = Doodad.Read(file); LogWrite("Loaded " + doodadCount + " doodads."); }
public static Doodad Read(FormatBase input) { Doodad temp = new Doodad(); // 24-bit offset? byte[] b = input.readBytes(3); temp.offset = BitConverter.ToUInt32(new byte[4] { b[0], b[1], b[2], 0 }, 0); Stuffer.Stuff(temp, input, "Doodad", true); return(temp); }