ref: 371858e5ce8abfb1e768e614daf4b4639a9a2c9b
parent: 95774cfe63478cc570227c77174ef696c56584a9
parent: ab7e5e7c0dd2cb25c46563958e9ce8391c2e1403
author: Cucky <44537737+cuckydev@users.noreply.github.com>
date: Sun Feb 10 10:10:32 EST 2019
Merge pull request #52 from Clownacy/master Accuracy improvement
--- a/src/MycParam.cpp
+++ b/src/MycParam.cpp
@@ -408,15 +408,11 @@
rec.random[3] = SDL_ReadU8(fp);
SDL_RWclose(fp);
- //Decode from checksum
- for (int i = 0; i < 4; i++)
- {
- uint8_t *p = (uint8_t*)&rec.counter[i];
- p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[0]) : (rec.random[0] >> 1);
- p[1] -= rec.random[0];
- p[2] -= rec.random[0];
- p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[0] >> 1) : (rec.random[0]);
- }
+ uint8_t *p = (uint8_t*)&rec.counter[0];
+ p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[0]) : (rec.random[0] >> 1);
+ p[1] -= rec.random[0];
+ p[2] -= rec.random[0];
+ p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[0] >> 1) : (rec.random[0]);
//If this is faster than our new time, quit
if (rec.counter[0] < time_count)
--
⑨