Beispiel #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();
        }
Beispiel #2
0
        public static H2Color fromARGB(float alpha, float red, float green, float blue)
        {
            H2Color h2c = new H2Color();

            h2c.A = alpha;
            h2c.R = red;
            h2c.G = green;
            h2c.B = blue;
            return(h2c);
        }
Beispiel #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;
        }
Beispiel #4
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();
        }
Beispiel #5
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;
        }
Beispiel #6
0
 public static H2Color fromARGB(float alpha, float red, float green, float blue)
 {
     H2Color h2c = new H2Color();
     h2c.A = alpha;
     h2c.R = red;
     h2c.G = green;
     h2c.B = blue;
     return h2c;
 }