예제 #1
0
 public BlendMode(FileReader reader, BFLYT.Header header)
 {
     BlendOp      = (GX2BlendOp)reader.ReadByte();
     SourceFactor = (GX2BlendFactor)reader.ReadByte();
     DestFactor   = (GX2BlendFactor)reader.ReadByte();
     LogicOp      = (GX2LogicOp)reader.ReadByte();
 }
예제 #2
0
        public TevStage(FileReader reader, BFLYT.Header header)
        {
            colorFlags = reader.ReadByte();
            alphaFlags = reader.ReadByte();
            reader.ReadUInt16(); //padding

            ColorMode = (TevMode)colorFlags;
            AlphaMode = (TevMode)colorFlags;

            /*     TevSource srcRGB0 = (TevSource)Bit.ExtractBits8(colorFlags, 4, 0);
             *   TevSource srcRGB1 = (TevSource)Bit.ExtractBits8(colorFlags, 4, 4);
             *   TevSource srcRGB2 = (TevSource)Bit.ExtractBits8(colorFlags, 4, 8);
             *   TevColorOp opRGB0 = (TevColorOp)Bit.ExtractBits8(colorFlags, 4, 12);
             *   TevColorOp opRGB1 = (TevColorOp)Bit.ExtractBits8(colorFlags, 4, 16);
             *   TevColorOp opRGB2 = (TevColorOp)Bit.ExtractBits8(colorFlags, 4, 20);
             *
             *   ColorSources = new TevSource[] { srcRGB0, srcRGB1, srcRGB2 };
             *   ColorOperators = new TevColorOp[] { opRGB0, opRGB1, opRGB2 };
             *   ColorMode = (TevMode)Bit.ExtractBits8(colorFlags, 4, 24);
             *   ColorScale = (TevScale)Bit.ExtractBits8(colorFlags, 2, 28);
             *   ColorSavePrevReg = Bit.ExtractBits8(colorFlags, 1, 30) == 1;
             *
             *   TevSource srcAlpha0 = (TevSource)Bit.ExtractBits8(alphaFlags, 4, 0);
             *   TevSource srcAlpha1 = (TevSource)Bit.ExtractBits8(alphaFlags, 4, 4);
             *   TevSource srcAlpha2 = (TevSource)Bit.ExtractBits8(alphaFlags, 4, 8);
             *   TevAlphaOp opAlpha0 = (TevAlphaOp)Bit.ExtractBits8(alphaFlags, 4, 12);
             *   TevAlphaOp opAlpha1 = (TevAlphaOp)Bit.ExtractBits8(alphaFlags, 4, 16);
             *   TevAlphaOp opAlpha2 = (TevAlphaOp)Bit.ExtractBits8(alphaFlags, 4, 20);
             *
             *   AlphaSources = new TevSource[] { srcAlpha0, srcAlpha1, srcAlpha2 };
             *   AlphaOperators = new TevAlphaOp[] { opAlpha0, opAlpha1, opAlpha2 };
             *   AlphaMode = (TevMode)Bit.ExtractBits8(alphaFlags, 4, 24);
             *   AlphaScale = (TevScale)Bit.ExtractBits8(alphaFlags, 2, 28);
             *   AlphaSavePrevReg = Bit.ExtractBits8(alphaFlags, 1, 30) == 1;*/
        }
예제 #3
0
 public ProjectionTexGenParam(FileReader reader, BFLYT.Header header)
 {
     PosX   = reader.ReadSingle();
     PosY   = reader.ReadSingle();
     ScaleX = reader.ReadSingle();
     ScaleY = reader.ReadSingle();
     flags  = reader.ReadByte();
     reader.Seek(3);
 }
예제 #4
0
        public TextureRef(FileReader reader, BFLYT.Header header)
        {
            ID    = reader.ReadInt16();
            flag1 = reader.ReadByte();
            flag2 = reader.ReadByte();

            if (header.Textures.Count > 0 && ID != -1)
            {
                Name = header.Textures[ID];
            }
        }
예제 #5
0
 public TexCoordGen(FileReader reader, BFLYT.Header header)
 {
     GenType = reader.ReadEnum <MatrixType>(false);
     Source  = reader.ReadEnum <TextureGenerationType>(false);
     if (header.VersionMajor >= 8)
     {
         unkData = reader.ReadBytes(0xE);
     }
     else
     {
         unkData = reader.ReadBytes(6);
     }
 }
 public IndirectParameter(FileReader reader, BFLYT.Header header)
 {
     Rotation = reader.ReadSingle();
     ScaleX   = reader.ReadSingle();
     ScaleY   = reader.ReadSingle();
 }
예제 #7
0
 public FontShadowParameter(FileReader reader, BFLYT.Header header)
 {
     BlackColor = reader.ReadColor8RGBA();
     WhiteColor = reader.ReadColor8RGBA();
 }
예제 #8
0
 public AlphaCompare(FileReader reader, BFLYT.Header header)
 {
     CompareMode = reader.ReadByte();
     reader.ReadBytes(0x3);
     Value = reader.ReadUInt32();
 }
예제 #9
0
 public static string ToXml(BFLYT.Header header)
 {
     return("");
 }
예제 #10
0
 public static BFLYT.Header FromXml(string text)
 {
     BFLYT.Header header = new BFLYT.Header();
     header.RootGroup = new BFLYT.GRP1();
     return(header);
 }
예제 #11
0
 public TevStage(FileReader reader, BFLYT.Header header)
 {
     RGBMode   = reader.ReadByte();
     AlphaMode = reader.ReadByte();
     unk       = reader.ReadUInt16();
 }
예제 #12
0
 public static BFLYT.Header FromXml(string text)
 {
     BFLYT.Header header = new BFLYT.Header();
     return(header);
 }