shithub: cstory

Download patch

ref: f2fed53e7f8e592f3223ad9f3605333a8c9ca94a
parent: 1e03ec73ce33a961dd77615a52290c13769863df
author: cuckydev <[email protected]>
date: Sun Feb 10 09:11:34 EST 2019

fixed nikumaru save

binary files /dev/null b/build/CSE2 v1.0.0.0.zip differ
--- a/src/MycParam.cpp
+++ b/src/MycParam.cpp
@@ -412,10 +412,10 @@
 		for (int i = 0; i < 4; i++)
 		{
 			uint8_t *p = (uint8_t*)&rec.counter[i];
-			p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i]) : (rec.random[i] >> 1);
-			p[1] -= rec.random[i];
-			p[2] -= rec.random[i];
-			p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i] >> 1) : (rec.random[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]);
 		}
 		
 		//If this is faster than our new time, quit
@@ -430,10 +430,10 @@
 		rec.random[i] = Random(0, 250) + i;
 		
 		uint8_t *p = (uint8_t*)&rec.counter[i];
-		p[0] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i]) : (rec.random[i] >> 1);
-		p[1] -= rec.random[i];
-		p[2] -= rec.random[i];
-		p[3] -= (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i] >> 1) : (rec.random[i]);
+		p[0] += (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i]) : (rec.random[i] >> 1);
+		p[1] += rec.random[i];
+		p[2] += rec.random[i];
+		p[3] += (SDL_BYTEORDER == SDL_LIL_ENDIAN) ? (rec.random[i] >> 1) : (rec.random[i]);
 	}
 	
 	fp = SDL_RWFromFile(path, "wb");