コード例 #1
0
ファイル: MDL0.cs プロジェクト: Ermelber/EveryFileExplorer
                    public Material(EndianBinaryReader er)
                    {
                        itemTag = er.ReadUInt16();
                        size = er.ReadUInt16();
                        diffAmb = er.ReadUInt32();
                        specEmi = er.ReadUInt32();
                        polyAttr = er.ReadUInt32();
                        polyAttrMask = er.ReadUInt32();
                        texImageParam = er.ReadUInt32();
                        texImageParamMask = er.ReadUInt32();
                        texPlttBase = er.ReadUInt16();
                        flag = (NNS_G3D_MATFLAG)er.ReadUInt16();
                        origWidth = er.ReadUInt16();
                        origHeight = er.ReadUInt16();
                        magW = er.ReadFx32();
                        magH = er.ReadFx32();
                        if ((flag & NNS_G3D_MATFLAG.NNS_G3D_MATFLAG_TEXMTX_SCALEONE) == 0)
                        {
                            scaleS = er.ReadFx32();
                            scaleT = er.ReadFx32();
                        }

                        if ((flag & NNS_G3D_MATFLAG.NNS_G3D_MATFLAG_TEXMTX_ROTZERO) == 0)
                        {
                            rotSin = er.ReadFx16();
                            rotCos = er.ReadFx16();
                        }

                        if ((flag & NNS_G3D_MATFLAG.NNS_G3D_MATFLAG_TEXMTX_TRANSZERO) == 0)
                        {
                            transS = er.ReadFx32();
                            transT = er.ReadFx32();
                        }

                        if ((flag & NNS_G3D_MATFLAG.NNS_G3D_MATFLAG_EFFECTMTX) == NNS_G3D_MATFLAG.NNS_G3D_MATFLAG_EFFECTMTX)
                        {
                            effectMtx = er.ReadFx32s(16);
                        }
                    }