Exemplo n.º 1
0
        private int GetRngCallsPerFrame()
        {
            var currentRng = Config.Stream.GetUInt16(Config.HackedAreaAddress + 0x0E);
            var preRng     = Config.Stream.GetUInt16(Config.HackedAreaAddress + 0x0C);

            return(RngIndexer.GetRngIndexDiff(preRng, currentRng));
        }
Exemplo n.º 2
0
        private int GetRngCallsPerFrame()
        {
            var currentRng = BitConverter.ToUInt16(_stream.ReadRam(Config.RngRecordingAreaAddress + 0x0E, 2), 0);
            var preRng     = BitConverter.ToUInt16(_stream.ReadRam(Config.RngRecordingAreaAddress + 0x0C, 2), 0);

            return(RngIndexer.GetRngIndexDiff(preRng, currentRng));
        }
Exemplo n.º 3
0
        private int GetNumRngCalls()
        {
            var numberOfRngObjs = BitConverter.ToUInt32(_stream.ReadRam(Config.RngRecordingAreaAddress, 4), 0);

            int numOfCalls = 0;

            for (int i = 0; i < numberOfRngObjs; i++)
            {
                uint rngStructAdd = (uint)(Config.RngRecordingAreaAddress + 0x10 + 0x08 * i);
                var  address      = BitConverter.ToUInt32(_stream.ReadRam(rngStructAdd + 0x04, 4), 0);
                if (address != _currentAddress)
                {
                    continue;
                }

                var preRng  = BitConverter.ToUInt16(_stream.ReadRam(rngStructAdd + 0x00, 2), 0);
                var postRng = BitConverter.ToUInt16(_stream.ReadRam(rngStructAdd + 0x02, 2), 0);

                numOfCalls = RngIndexer.GetRngIndexDiff(preRng, postRng);
                break;
            }

            return(numOfCalls);
        }