コード例 #1
0
ファイル: CMDL.cs プロジェクト: Ermelber/EveryFileExplorer
                public FragmentShader(EndianBinaryReader er)
                {
                    BufferColor = er.ReadVector4();
                    FragmentLighting = new FragmentLightingCtr(er);
                    FragmentLightingTableOffset = (UInt32)er.BaseStream.Position + er.ReadUInt32();
                    TextureCombiners = new TextureCombinerCtr[6];
                    for (int i = 0; i < 6; i++) TextureCombiners[i] = new TextureCombinerCtr(er);
                    AlphaTest = new AlphaTestCtr(er);
                    BufferCommand1 = er.ReadUInt32();
                    BufferCommand2 = er.ReadUInt32();
                    BufferCommand3 = er.ReadUInt32();
                    BufferCommand4 = er.ReadUInt32();
                    BufferCommand5 = er.ReadUInt32();
                    BufferCommand6 = er.ReadUInt32();

                    long curpos = er.BaseStream.Position;
                    er.BaseStream.Position = FragmentLightingTableOffset;
                    FragmentLightingTable = new FragmentLightingTableCtr(er);
                    er.BaseStream.Position = curpos;
                }
コード例 #2
0
ファイル: CMDL.cs プロジェクト: Ermelber/EveryFileExplorer
                public TextureCombinerCtr[] TextureCombiners; //6

                #endregion Fields

                #region Constructors

                public FragmentShader()
                {
                    BufferColor = new Vector4(0, 0, 0, 1);
                    FragmentLighting = new FragmentLightingCtr();
                    TextureCombiners = new TextureCombinerCtr[6];
                    TextureCombiners[0] = new TextureCombinerCtr(0);
                    TextureCombiners[1] = new TextureCombinerCtr(1);
                    TextureCombiners[2] = new TextureCombinerCtr(2);
                    TextureCombiners[3] = new TextureCombinerCtr(3);
                    TextureCombiners[4] = new TextureCombinerCtr(4);
                    TextureCombiners[5] = new TextureCombinerCtr(5);
                    AlphaTest = new AlphaTestCtr();
                    BufferCommand1 = 0xFF000000;
                    BufferCommand2 = 0xF00FD;
                    BufferCommand3 = 0;
                    BufferCommand4 = 0x200E0;
                    BufferCommand5 = 0x400;
                    BufferCommand6 = 0x201C3;
                    FragmentLightingTable = new FragmentLightingTableCtr();
                }