Exemple #1
0
 public StageObj(BCSV.Entry entry)
 {
     mEntry    = entry;
     mName     = mEntry.Get <string>("name");
     mPosition = new Vector3(mEntry.Get <float>("pos_x"), mEntry.Get <float>("pos_y"), mEntry.Get <float>("pos_z"));
     mRotation = new Vector3(mEntry.Get <float>("dir_x"), mEntry.Get <float>("dir_y"), mEntry.Get <float>("dir_z"));
 }
Exemple #2
0
 public Light(BCSV.Entry e, string parent) : base(Vector3.Zero)
 {
     mEntry     = e;
     mLightName = mEntry.Get <string>("AreaLightName");
     mLightNo   = mEntry.Get <int>("LightID");
     mParent    = parent;
 }
Exemple #3
0
        public PathObj(BCSV.Entry entry, Zone parentZone, RARCFilesystem filesystem)
        {
            mName = entry.Get <string>("name");
            mID   = entry.Get <short>("no");
            mZone = parentZone;

            mPathPointObjs = new List <PathPointObj>();

            BCSV b = new BCSV(filesystem.OpenFile($"/Stage/jmp/Path/CommonPathPointInfo.{mID}"));

            foreach (BCSV.Entry e in b.mEntries)
            {
                mPathPointObjs.Add(new PathPointObj(this, e));
            }
        }
Exemple #4
0
        public Camera(BCSV.Entry entry, Zone parent) : base(Vector3.Zero)
        {
            mEntry = entry;

            mName       = mEntry.Get <string>("id");
            mParentZone = parent;

            mType = mEntry.Get <string>("camtype");

            mFields = new Dictionary <string, object>();

            // the first thing we load are the camera-type specific fields
            List <string> fields = CameraUtil.GetStrings(mType).ToList();

            foreach (string field in fields)
            {
                if (field == "none")
                {
                    break;
                }

                string type = CameraUtil.GetTypeOfField(field);

                switch (type)
                {
                case "float":
                    mFields[field] = mEntry.Get <float>(field);
                    break;

                case "int":
                    mFields[field] = mEntry.Get <int>(field);
                    break;

                case "string":
                    mFields[field] = mEntry.Get <string>(field);
                    break;
                }
            }

            Dictionary <string, string> allFields = CameraUtil.GetAll();

            foreach (string s in allFields.Keys)
            {
                string type = CameraUtil.GetTypeOfField(s);

                if (!mEntry.ContainsKey(s))
                {
                    continue;
                }

                switch (type)
                {
                case "float":
                    mFields[s] = mEntry.Get <float>(s);
                    break;

                case "int":
                    mFields[s] = mEntry.Get <int>(s);
                    break;

                case "string":
                    mFields[s] = mEntry.Get <string>(s);
                    break;
                }
            }
        }
        public PathPointObj(PathObj parent, BCSV.Entry entry) : base(Vector3.Zero, Vector3.Zero, Vector3.One)
        {
            mEntry  = entry;
            mParent = parent;

            mID = mEntry.Get <short>("id");

            mPosition = new Vector3
            {
                X = mEntry.Get <float>("pnt0_x"),
                Y = mEntry.Get <float>("pnt0_y"),
                Z = mEntry.Get <float>("pnt0_z")
            };

            mPoint1 = new Vector3
            {
                X = mEntry.Get <float>("pnt1_x"),
                Y = mEntry.Get <float>("pnt1_y"),
                Z = mEntry.Get <float>("pnt1_z")
            };

            mPoint2 = new Vector3
            {
                X = mEntry.Get <float>("pnt2_x"),
                Y = mEntry.Get <float>("pnt2_y"),
                Z = mEntry.Get <float>("pnt2_z")
            };

            mPointArgs = new int[8];

            for (int i = 0; i < 8; i++)
            {
                mPointArgs[i] = mEntry.Get <int>($"point_arg{i}");
            }
        }
 public LightEntry(BCSV.Entry entry)
 {
     mEntry         = entry;
     mAreaLightName = mEntry.Get <string>("AreaLightName");
 }