public MipmapBlock(ShaderDataReader datareader, int blockIndex) : base(datareader) { this.blockIndex = blockIndex; arg0 = datareader.ReadBytes(4); arg1 = datareader.ReadInt32(); arg2 = datareader.ReadInt32(); arg3 = datareader.ReadInt32(); arg4 = datareader.ReadInt32(); arg5 = datareader.ReadInt32(); name = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 256; }
public ParamBlock(ShaderDataReader datareader, int blockIndex, int vcsVersion) : base(datareader) { this.blockIndex = blockIndex; name0 = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 64; name1 = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 64; type = datareader.ReadInt32(); res0 = datareader.ReadSingle(); name2 = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 64; lead0 = datareader.ReadInt32(); if (lead0 == 6 || lead0 == 7) { int dynExpLen = datareader.ReadInt32(); dynExp = datareader.ReadBytes(dynExpLen); } // check to see if this reads 'SBMS' (unknown what this is, instance found in v65 hero_pc_40_features.vcs file) byte[] checkSBMS = datareader.ReadBytesAtPosition(0, 4); if (checkSBMS[0] == 0x53 && checkSBMS[1] == 0x42 && checkSBMS[2] == 0x4D && checkSBMS[3] == 0x53) { // note - bytes are ignored datareader.ReadBytes(4); int dynExpLength = datareader.ReadInt32(); datareader.ReadBytes(dynExpLength); } arg0 = datareader.ReadInt32(); arg1 = datareader.ReadInt32(); arg2 = datareader.ReadInt32(); arg3 = datareader.ReadInt32(); arg4 = datareader.ReadInt32(); if (vcsVersion > 62) { arg5 = datareader.ReadInt32(); } fileref = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 64; for (int i = 0; i < 4; i++) { ranges0[i] = datareader.ReadInt32(); } for (int i = 0; i < 4; i++) { ranges1[i] = datareader.ReadInt32(); } for (int i = 0; i < 4; i++) { ranges2[i] = datareader.ReadInt32(); } for (int i = 0; i < 4; i++) { ranges3[i] = datareader.ReadSingle(); } for (int i = 0; i < 4; i++) { ranges4[i] = datareader.ReadSingle(); } for (int i = 0; i < 4; i++) { ranges5[i] = datareader.ReadSingle(); } for (int i = 0; i < 4; i++) { ranges6[i] = datareader.ReadInt32(); } for (int i = 0; i < 4; i++) { ranges7[i] = datareader.ReadInt32(); } command0 = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 32; command1 = datareader.ReadNullTermStringAtPosition(); datareader.BaseStream.Position += 32; if (vcsVersion == 65) { v65Data = datareader.ReadBytes(6); } }