예제 #1
0
        public override bool FromStream(Stream mstream, short ParsingRule, ThingDb.Thing thing)
        {
            NoxBinaryReader br = new NoxBinaryReader(mstream);

            Unknown2       = br.ReadBytes(6);
            LightRadius    = br.ReadInt32();
            NumOfColors    = br.ReadInt32(); //
            LightIntensity = br.ReadByte();; //gradient amount 32 00
            UnknownVal     = br.ReadBytes(21);
            // Unknown5 = br.ReadInt32(); //
            // Unknown6 = br.ReadInt16(); //
            ChangeIntensity = br.ReadInt16(); // Color change speed 15
            Color1          = br.ReadColor();
            Color2          = br.ReadColor();

            /*
             * R1 = br.ReadByte();
             * G1 = br.ReadByte(); // Flags2?
             * B1 = br.ReadByte(); // Some flag
             * R2 = br.ReadByte();
             * G2 = br.ReadByte(); // Flags2?
             * B2 = br.ReadByte(); // Some flag
             */


            Unknown3   = br.ReadBytes(74);
            PulseSpeed = br.ReadByte();
            Unknown4   = br.ReadBytes(18);

            /*
             * //ChangeColors = new Color[16];18
             * //for (int i = 0; i < 16; i++) ChangeColors[i] = br.ReadColor();
             * //  Unknown3 = new byte[16];
             * //for (int i = 0; i < 16; i++) ChangeIntensity[i] = br.ReadByte();
             * ChangeRadius = new byte[16];
             * for (int i = 0; i < 16; i++) ChangeRadius[i] = br.ReadByte();
             * ColorChangeIndex = br.ReadInt16();
             * IntensityChangeIndex = br.ReadInt16();
             * RadiusChangeIndex = br.ReadInt16();
             * ObjExtentID = br.ReadInt32();
             * Unknown13 = br.ReadInt16(); // some flags
             * Unknown14 = br.ReadInt16();
             * Unknown15 = br.ReadByte();
             * // Probably type of light (0 = emitter, 1 = absorber?)
             * if (ParsingRule >= 42)
             *  IsAntiLight = br.ReadInt32();
             * else
             *  IsAntiLight = br.ReadByte();
             */
            return(true);
        }
예제 #2
0
        public override bool FromStream(Stream mstream, short ParsingRule, ThingDb.Thing thing)
        {
            NoxBinaryReader br = new NoxBinaryReader(mstream);

            // collisionbox
            SizeX = br.ReadInt32();
            SizeY = br.ReadInt32();
            if (SizeX > 60)
            {
                SizeX = 60;
            }
            if (SizeY > 60)
            {
                SizeY = 60;
            }
            // цвета заливки и граней для PressurePlate
            EdgeColor = br.ReadColor();
            BackColor = br.ReadColor();
            UnkInt1   = br.ReadInt32();
            // обработчики событий
            ScriptOnPressed  = br.ReadScriptEventString();
            ScriptOnReleased = br.ReadScriptEventString();
            ScriptOnCollided = br.ReadScriptEventString();
            // кто может активировать
            AllowedObjClass = br.ReadInt32();
            IgnoredObjClass = br.ReadInt32();
            AllowedTeamID   = br.ReadByte();
            IgnoredTeamID   = br.ReadByte();
            if (ParsingRule >= 61)
            {
                TriggerState = br.ReadByte();
                Unk7         = br.ReadByte();
                UnkInt2      = br.ReadInt32();
            }
            return(true);
        }
예제 #3
0
        public int IsAntiLight;            // 0xAC Emits light?

        public override bool FromStream(Stream mstream, short ParsingRule, ThingDb.Thing thing)
        {
            NoxBinaryReader br = new NoxBinaryReader(mstream);

            UnknownVal     = br.ReadInt32(); // unused?
            Unknown2       = br.ReadBytes(12);
            Unknown3       = br.ReadInt16(); // Color Flags?
            Unknown4       = br.ReadInt16();
            Unknown5       = br.ReadInt32(); // Flags2?
            Unknown6       = br.ReadInt16(); // Some flag
            LightRadius    = br.ReadInt32(); //484290
            NumOfColors    = br.ReadInt32(); // 2 normally
            LightIntensity = br.ReadSingle();


            ChangeColors = new Color[16];
            for (int i = 0; i < 16; i++)
            {
                ChangeColors[i] = br.ReadColor();
            }
            ChangeIntensity = new byte[16];
            for (int i = 0; i < 16; i++)
            {
                ChangeIntensity[i] = br.ReadByte();
            }
            ChangeRadius = new byte[16];
            for (int i = 0; i < 16; i++)
            {
                ChangeRadius[i] = br.ReadByte();
            }
            ColorChangeIndex     = br.ReadInt16();
            IntensityChangeIndex = br.ReadInt16();
            RadiusChangeIndex    = br.ReadInt16();
            ObjExtentID          = br.ReadInt32();
            Unknown13            = br.ReadInt16(); // some flags
            Unknown14            = br.ReadInt16();
            Unknown15            = br.ReadByte();
            // Probably type of light (0 = emitter, 1 = absorber?)
            if (ParsingRule >= 42)
            {
                IsAntiLight = br.ReadInt32();
            }
            else
            {
                IsAntiLight = br.ReadByte();
            }
            return(true);
        }
예제 #4
0
        public override bool FromStream(Stream mstream, short ParsingRule, ThingDb.Thing thing)
        {
            NoxBinaryReader br = new NoxBinaryReader(mstream);

            Unknown2       = br.ReadBytes(6);
            Unknown7       = br.ReadByte();
            Unknown8       = br.ReadByte();
            LightRadius    = br.ReadInt16();
            NumOfColors    = br.ReadInt32();   //
            LightIntensity = br.ReadInt16();;; //gradient amount 32 00
            R  = br.ReadByte();
            R2 = br.ReadByte();

            UnknownR  = br.ReadByte();
            UnknownR2 = br.ReadByte();

            G         = br.ReadByte();
            G2        = br.ReadByte();
            UnknownG  = br.ReadByte();
            UnknownG2 = br.ReadByte();

            B         = br.ReadByte();
            B2        = br.ReadByte();
            UnknownB  = br.ReadByte();
            UnknownB2 = br.ReadByte();

            UnknownVal = br.ReadBytes(8);

            ChangeIntensity = br.ReadInt16(); // Color change speed 15
            Color1          = br.ReadColor();
            Color2          = br.ReadColor();
            Color3          = br.ReadColor();
            Color4          = br.ReadColor();
            Color5          = br.ReadColor();
            Color6          = br.ReadColor();
            Color7          = br.ReadColor();
            Color8          = br.ReadColor();
            Color9          = br.ReadColor();
            Color10         = br.ReadColor();

            Unknown3 = br.ReadBytes(18);           //-21//39
            ChangeIntensitySingle = br.ReadByte(); //max radius
            Unknown10             = br.ReadByte(); //min radius

            MaxRadius2 = br.ReadByte();
            MinRadius2 = br.ReadByte();

            MaxRadius3 = br.ReadByte();
            MinRadius3 = br.ReadByte();

            MaxRadius4 = br.ReadByte();
            MinRadius4 = br.ReadByte();

            MaxRadius5 = br.ReadByte();
            MinRadius5 = br.ReadByte();

            MaxRadius6 = br.ReadByte();
            MinRadius6 = br.ReadByte();

            MaxRadius7 = br.ReadByte();
            MinRadius7 = br.ReadByte();

            MaxRadius8 = br.ReadByte();
            MinRadius8 = br.ReadByte();

            MaxRadius9 = br.ReadByte();
            MinRadius9 = br.ReadByte();

            MaxRadius10 = br.ReadByte();
            MinRadius10 = br.ReadByte();

            Unknown30        = br.ReadBytes(12);//30
            PulseSpeed       = br.ReadByte();
            Unknown11        = br.ReadByte();
            PulseSpeedSingle = br.ReadByte();
            Unknown4         = br.ReadBytes(11);//13


            Unknown80 = br.ReadByte();
            type      = br.ReadByte();
            Unknown9  = br.ReadBytes(3);
            return(true);
        }