Exemple #1
0
        public static string GetPuPosString()
        {
            var marioAddress = Config.Mario.StructAddress;

            // Get Mario position
            float marioX, marioZ;

            marioX = Config.Stream.GetSingle(marioAddress + Config.Mario.XOffset);
            marioZ = Config.Stream.GetSingle(marioAddress + Config.Mario.ZOffset);

            // Update PU
            int puX = PuUtilities.GetPUFromCoord(marioX);
            int puZ = PuUtilities.GetPUFromCoord(marioZ);

            return(string.Format("[{0}:{1}]", puX, puZ));
        }
Exemple #2
0
        public static string GetPuPosString(ProcessStream stream)
        {
            var marioAddress = Config.Mario.StructAddress;

            // Get Mario position
            float marioX, marioZ;

            marioX = BitConverter.ToSingle(stream.ReadRam(marioAddress + Config.Mario.XOffset, 4), 0);
            marioZ = BitConverter.ToSingle(stream.ReadRam(marioAddress + Config.Mario.ZOffset, 4), 0);

            // Update PU
            int puX = PuUtilities.GetPUFromCoord(marioX);
            int puZ = PuUtilities.GetPUFromCoord(marioZ);

            return(string.Format("[{0}:{1}]", puX, puZ));
        }