File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
120120- Fixed a bug when some underwater objects were untinted (broken since v0.1.0).
121121- Fixed camera stabilization in some cut scenes (broken since v0.1.0).
122122- Fixed the "Microphone Position at Lara" setting (broken since v0.1.0).
123+ - Changed randomizer formula to be less correct, but consistent with the original game (broken since v0.1.0).
123124
124125## [ 0.8.2] - 2019-05-26
125126### TR2Main bugfixes
Original file line number Diff line number Diff line change @@ -334,9 +334,9 @@ int __cdecl GameStats(int levelID) {
334334
335335int __cdecl GetRandomControl () {
336336 RandomControl = RandomControl * 1103515245 + 12345 ;
337- return (RandomControl / 0x10000 ) & 0x7FFF ;
338- // NOTE: the original game code was: return (RandomControl >> 10) & 0x7FFF;
339- // instead of the correct ANSI one: return (RandomControl >> 0x10) & 0x7FFF;
337+ return (RandomControl >> 10 ) & 0x7FFF ;
338+ // NOTE: the shift value should be 0x10, but the original game has 10,
339+ // it left "as is" to save consistency with the original game.
340340}
341341
342342void __cdecl SeedRandomControl (int seed) {
@@ -345,9 +345,9 @@ void __cdecl SeedRandomControl(int seed) {
345345
346346int __cdecl GetRandomDraw () {
347347 RandomDraw = RandomDraw * 1103515245 + 12345 ;
348- return (RandomDraw / 0x10000 ) & 0x7FFF ;
349- // NOTE: the original game code was: return (RandomDraw >> 10) & 0x7FFF;
350- // instead of the correct ANSI one: return (RandomDraw >> 0x10) & 0x7FFF;
348+ return (RandomDraw >> 10 ) & 0x7FFF ;
349+ // NOTE: the shift value should be 0x10, but the original game has 10,
350+ // it left "as is" to save consistency with the original game.
351351}
352352
353353void __cdecl SeedRandomDraw (int seed) {
You can’t perform that action at this time.
0 commit comments