Example #1
0
        public static int GetMobjHash(Mobj mobj)
        {
            var hash = 0;

            hash = DoomDebug.CombineHash(hash, mobj.X.Data);
            hash = DoomDebug.CombineHash(hash, mobj.Y.Data);
            hash = DoomDebug.CombineHash(hash, mobj.Z.Data);

            hash = DoomDebug.CombineHash(hash, (int)mobj.Angle.Data);
            hash = DoomDebug.CombineHash(hash, (int)mobj.Sprite);
            hash = DoomDebug.CombineHash(hash, mobj.Frame);

            hash = DoomDebug.CombineHash(hash, mobj.FloorZ.Data);
            hash = DoomDebug.CombineHash(hash, mobj.CeilingZ.Data);

            hash = DoomDebug.CombineHash(hash, mobj.Radius.Data);
            hash = DoomDebug.CombineHash(hash, mobj.Height.Data);

            hash = DoomDebug.CombineHash(hash, mobj.MomX.Data);
            hash = DoomDebug.CombineHash(hash, mobj.MomY.Data);
            hash = DoomDebug.CombineHash(hash, mobj.MomZ.Data);

            hash = DoomDebug.CombineHash(hash, mobj.Tics);
            hash = DoomDebug.CombineHash(hash, (int)mobj.Flags);
            hash = DoomDebug.CombineHash(hash, mobj.Health);

            hash = DoomDebug.CombineHash(hash, (int)mobj.MoveDir);
            hash = DoomDebug.CombineHash(hash, mobj.MoveCount);

            hash = DoomDebug.CombineHash(hash, mobj.ReactionTime);
            hash = DoomDebug.CombineHash(hash, mobj.Threshold);

            return(hash);
        }
Example #2
0
        public static int GetSectorHash(Sector sector)
        {
            var hash = 0;

            hash = DoomDebug.CombineHash(hash, sector.FloorHeight.Data);
            hash = DoomDebug.CombineHash(hash, sector.CeilingHeight.Data);
            hash = DoomDebug.CombineHash(hash, sector.LightLevel);

            return(hash);
        }
Example #3
0
        public static int GetSectorHash(World world)
        {
            var hash = 0;

            foreach (var sector in world.Map.Sectors)
            {
                hash = DoomDebug.CombineHash(hash, DoomDebug.GetSectorHash(sector));
            }

            return(hash);
        }
Example #4
0
        public static void DumpMobjCsv(string path, World world)
        {
            using (var writer = new StreamWriter(DoomApplication.Instance.FileSystem.Write(path)))
            {
                foreach (var thinker in world.Thinkers)
                {
                    var mobj = thinker as Mobj;

                    if (mobj != null)
                    {
                        writer.WriteLine(DoomDebug.GetMobjCsv(mobj));
                    }
                }
            }
        }
Example #5
0
        public static int GetMobjHash(World world)
        {
            var hash = 0;

            foreach (var thinker in world.Thinkers)
            {
                var mobj = thinker as Mobj;

                if (mobj != null)
                {
                    hash = DoomDebug.CombineHash(hash, DoomDebug.GetMobjHash(mobj));
                }
            }

            return(hash);
        }