Esempio n. 1
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out clr1);
            ok &= s.read(out clr2);
            ok &= s.prepare_nested();
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 2
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out texIdxToReplace);
            ok &= s.read(out repl_with);
            ok &= s.prepare_nested();
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 3
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out speed);
            ok &= s.read(out stScale);
            ok &= s.read(out scrollType);
            ok &= s.read(out flags);
            ok &= s.prepare_nested(); // will update the file size left
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 4
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out name);
            ok &= s.read(out pos);
            ok &= s.read(out rot);
            ok &= s.prepare_nested(); // will update the file size left
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 5
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out propName);
            ok &= s.read(out propValue);
            ok &= s.read(out propertyType);
            ok &= s.prepare_nested();
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 6
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out Far);
            ok &= s.read(out FarFade);
            ok &= s.read(out Near);
            ok &= s.read(out NearFade);
            ok &= s.read(out Scale);
            ok &= s.prepare_nested();
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 7
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out name);
            ok &= s.read(out volRel1);
            ok &= s.read(out sndRadius);
            ok &= s.read(out snd_ramp_feet);
            ok &= s.read(out sndFlags);
            ok &= s.prepare_nested();
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 8
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            uint color_data;

            ok &= s.read(out color_data);
            ok &= s.read(out Size);
            ok &= s.read(out isNegative);
            ok &= s.prepare_nested();
            Debug.Assert(ok);
            Debug.Assert(s.end_encountered());
            omniColor = Tools.RGBAToColor32(color_data);
            return(ok);
        }
Esempio n. 9
0
        private bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out Version);
            ok &= s.read(out Scenefile);
            ok &= s.prepare_nested(); // will update the file size left
            Debug.Assert(ok);
            if (s.end_encountered())
            {
                return(ok);
            }
            string _name;

            while (s.nesting_name(out _name))
            {
                s.nest_in();
                if ("Def" == _name || "RootMod" == _name)
                {
                    var entry = new SceneGraphNode_Data();
                    ok &= entry.loadFrom(s);
                    Def.Add(entry);
                }
                else if ("Ref" == _name)
                {
                    var entry = new SceneRootNode_Data();
                    ok &= entry.loadFrom(s);
                    Ref.Add(entry);
                }
                else
                {
                    Debug.Assert(false, "unknown field referenced.");
                }

                s.nest_out();
            }

            return(ok);
        }
Esempio n. 10
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out name);
            ok &= s.read(out src_name);
            ok &= s.read(out LodFar);
            ok &= s.read(out LodFarFade);
            ok &= s.read(out LodNear);
            ok &= s.read(out LodNearFade);
            uint tflag;

            ok &= s.read(out tflag);
            node._TrickFlags = (TrickFlags)tflag;
            ok &= s.read(out ObjFlags);
            ok &= s.read(out GfxFlags);
            ok &= s.read(out GroupFlags);
            ok &= s.read(out Sway);
            ok &= s.read(out Sway_Rotate);
            ok &= s.read(out AlphaRef);
            ok &= s.read(out FogDist);
            ok &= s.read(out node.SortBias);
            ok &= s.read(out node.ScrollST0);
            ok &= s.read(out node.ScrollST1);
            ok &= s.read(out ShadowDist);
            ok &= s.read(out NightGlow);
            ok &= s.read(out node.TintColor0);
            ok &= s.read(out node.TintColor1);
            ok &= s.read(out ObjTexBias);
            ok &= s.prepare_nested(); // will update the file size left
            if (s.end_encountered())
            {
                return(ok);
            }
            string _name;

            while (s.nesting_name(out _name))
            {
                s.nest_in();
                if ("StAnim" == _name)
                {
                    TextureAnim_Dat entry = new TextureAnim_Dat();
                    ok &= entry.loadFrom(s);
                    StAnim.Add(entry);
                }
                else
                {
                    Debug.Assert(false, "unknown field referenced.");
                }

                s.nest_out();
            }

            Debug.Assert(s.end_encountered());
            return(ok);
        }
Esempio n. 11
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out name);
            ok &= s.read(out type);
            ok &= s.read(out flags);
            ok &= s.read(out p_Obj);
            ok &= s.prepare_nested(); // will update the file size left
            Debug.Assert(ok);
            if (s.end_encountered())
            {
                return(ok);
            }
            string _name;

            while (s.nesting_name(out _name))
            {
                s.nest_in();
                if ("Group" == _name)
                {
                    ok &= loadSub(s, p_Grp);
                }
                else if ("Property" == _name)
                {
                    ok &= loadSub(s, p_Property);
                }
                else if ("TintColor" == _name)
                {
                    ok &= loadSub(s, p_TintColor);
                }
                else if ("Ambient" == _name)
                {
                    ok &= loadSub(s, p_Ambient);
                }
                else if ("Omni" == _name)
                {
                    ok &= loadSub(s, p_Omni);
                }
                else if ("Sound" == _name)
                {
                    ok &= loadSub(s, p_Sound);
                }
                else if ("ReplaceTex" == _name)
                {
                    ok &= loadSub(s, p_ReplaceTex);
                }
                else if ("Beacon" == _name)
                {
                    ok &= loadSub(s, p_Beacon);
                }
                else if ("Fog" == _name)
                {
                    ok &= loadSub(s, p_Fog);
                }
                else if ("Lod" == _name)
                {
                    ok &= loadSub(s, p_Lod);
                }
                else
                {
                    Debug.Assert(false, "unknown field referenced.");
                }

                s.nest_out();
            }

            return(ok);
        }
Esempio n. 12
0
        public bool loadFrom(BinStore s)
        {
            bool ok = true;

            s.prepare();
            ok &= s.read(out name);
            ok &= s.read(out src_file);
            ok &= s.read(out Gloss);
            ok &= s.read(out Surface);
            ok &= s.read(out Fade);
            ok &= s.read(out ScaleST0);
            ok &= s.read(out ScaleST1);
            ok &= s.read(out Blend);
            ok &= s.read(out BumpMap);
            ok &= s.read(out BlendType);
            ok &= s.read(out Flags);
            ok &= s.prepare_nested(); // will update the file size left
            Debug.Assert(s.end_encountered());
            return(ok);
        }