Read() public method

public Read ( BinaryReader br ) : void
br System.IO.BinaryReader
return void
Ejemplo n.º 1
0
        public void Read(BinaryReader br)
        {
            br.BaseStream.Position = offset;
            int flags = br.ReadInt32();

            leftAligned  = ((flags & 1) != 0); // bit 0
            rightAligned = ((flags & 2) != 0); // bit 1
            pulsing      = ((flags & 4) != 0); // bit 2
            tinyText     = ((flags & 8) != 0); // bit 3

            animationIndex      = br.ReadInt16();
            introAnimationDelay = br.ReadInt16();
            unused     = br.ReadInt16();
            customFont = br.ReadInt16();
            h2color    = new H2Color();
            h2color.A  = br.ReadSingle();
            h2color.R  = br.ReadSingle();
            h2color.G  = br.ReadSingle();
            h2color.B  = br.ReadSingle();

            top    = br.ReadInt16();
            left   = br.ReadInt16();
            bottom = br.ReadInt16();
            right  = br.ReadInt16();
            stringID.Read(br);
            renderDepth = br.ReadInt16();
            unused2     = br.ReadInt16();
        }
Ejemplo n.º 2
0
        public void Read(BinaryReader br)
        {
            br.BaseStream.Position = offset;
            int flags = br.ReadInt32();

            ignoreForMenuSpacing = ((flags & 1) != 0); // bit 0 // Used to ignore menu item spacing (overlap bitmaps)
            useSubMaps           = ((flags & 2) != 0); // bit 1           // Used on [skin] tag
            pulsingText          = ((flags & 4) != 0); // bit 2          // Also "Hide Bitmap" on some tags (eg. [skin])
            autoTypingText       = ((flags & 8) != 0); // bit 3       // used on [wgit] tag

            animationIndex      = br.ReadInt16();
            introAnimationDelay = br.ReadInt16();
            blendMethod         = br.ReadInt16();
            bitmNumber          = br.ReadInt16();
            left = br.ReadInt16();
            top  = br.ReadInt16();
            horizontalWrapsPerSec = br.ReadSingle();
            verticalWrapsPerSec   = br.ReadSingle();
            bitmTag            = br.ReadChars(4);
            bitmIdent          = br.ReadInt32();
            renderDepth        = br.ReadInt16();
            unused             = br.ReadInt16();
            spriteAnimationFPS = br.ReadSingle();
            progressLeft       = br.ReadInt16();
            progressBottom     = br.ReadInt16();
            stringID.Read(br);
            progressScaleX = br.ReadInt16();
            progressScaleY = br.ReadInt16();
            isPopulated    = true;
        }
Ejemplo n.º 3
0
        public void Read(BinaryReader br)
        {
            int flags = br.ReadInt32();

            flag0         = ((flags & 1) != 0);  // 0
            flag1         = ((flags & 2) != 0);  // 1
            flag2         = ((flags & 4) != 0);  // 2
            flag3         = ((flags & 8) != 0);  // 3
            flag4         = ((flags & 16) != 0); // 4
            flag5         = ((flags & 32) != 0); // 5
            flag6         = ((flags & 64) != 0); // 6
            screenID      = br.ReadInt16();
            buttonKeyType = br.ReadInt16();
            textColor     = H2Color.fromARGB(
                br.ReadSingle(),
                br.ReadSingle(),
                br.ReadSingle(),
                br.ReadSingle());
            stringlistTag           = br.ReadChars(4);
            stringsListIdent        = br.ReadInt32();
            br.BaseStream.Position += 8;
            shapeGroup              = br.ReadInt16();
            unused = br.ReadInt16();
            headerStringID.Read(br);
            sourceColor = H2Color.fromARGB(
                br.ReadSingle(),
                br.ReadSingle(),
                br.ReadSingle(),
                br.ReadSingle());
            destColor = H2Color.fromARGB(
                br.ReadSingle(),
                br.ReadSingle(),
                br.ReadSingle(),
                br.ReadSingle());

            zoomScaleX       = br.ReadSingle();
            zoomScaleY       = br.ReadSingle();
            refractionScaleX = br.ReadSingle();
            refractionScaleY = br.ReadSingle();
            isPopulated      = true;
        }