fixed nikumaru save

This commit is contained in:
cuckydev 2019-02-10 14:11:34 -05:00
parent 1e03ec73ce
commit f2fed53e7f
2 changed files with 8 additions and 8 deletions

BIN
build/CSE2 v1.0.0.0.zip Normal file

Binary file not shown.

View file

@ -412,10 +412,10 @@ bool SaveTimeCounter()
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
uint8_t *p = (uint8_t*)&rec.counter[i]; uint8_t *p = (uint8_t*)&rec.counter[i];
p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i]) : (rec.random[i] >> 1); p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[0]) : (rec.random[0] >> 1);
p[1] -= rec.random[i]; p[1] -= rec.random[0];
p[2] -= rec.random[i]; p[2] -= rec.random[0];
p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i] >> 1) : (rec.random[i]); p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[0] >> 1) : (rec.random[0]);
} }
//If this is faster than our new time, quit //If this is faster than our new time, quit
@ -430,10 +430,10 @@ bool SaveTimeCounter()
rec.random[i] = Random(0, 250) + i; rec.random[i] = Random(0, 250) + i;
uint8_t *p = (uint8_t*)&rec.counter[i]; uint8_t *p = (uint8_t*)&rec.counter[i];
p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i]) : (rec.random[i] >> 1); p[0] += (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i]) : (rec.random[i] >> 1);
p[1] -= rec.random[i]; p[1] += rec.random[i];
p[2] -= rec.random[i]; p[2] += rec.random[i];
p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i] >> 1) : (rec.random[i]); p[3] += (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i] >> 1) : (rec.random[i]);
} }
fp = SDL_RWFromFile(path, "wb"); fp = SDL_RWFromFile(path, "wb");