Exemplo n.º 1
0
 public void Initialize(IDeviceRW device)
 {
     Device           = device;
     InitialSeed      = Device.ReadUInt32(SFMTAddressSeed);
     SFMTAddressIndex = SFMTAddressStart + 0x9C0;
     SFMT             = new SFMT(InitialSeed);
     CurrentSeed      = InitialSeed;
     FrameCount       = 0;
 }
Exemplo n.º 2
0
        public void UpdateFrame()
        {
            var game     = CalcCurrentSeed();
            var seed     = CurrentSeed;
            var consumed = 0;

            while (game != seed && consumed < 10000)
            {
                seed = SFMT.Next64();
                consumed++;
            }

            FrameCount += consumed;
            CurrentSeed = seed;
        }