[ntsc-1.2] Match rand.c (#2097)

* [ntsc-1.2] Match rand.c

* Comment on N64 Rand_ZeroOne taking the low random bits

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

---------

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
This commit is contained in:
Dragorn421
2024-08-30 14:56:00 +02:00
committed by GitHub
parent dc964931c2
commit 1eeb03e5bb
3 changed files with 48 additions and 1 deletions
+5 -1
View File
@@ -2,14 +2,18 @@
#define RAND_H
#include "ultra64.h"
#include "versions.h"
u32 Rand_Next(void);
void Rand_Seed(u32 seed);
f32 Rand_ZeroOne(void);
f32 Rand_Centered(void);
void Rand_Seed_Variable(u32* rndNum, u32 seed);
u32 Rand_Next_Variable(u32* rndNum);
f32 Rand_ZeroOne_Variable(u32* rndNum);
#if RAND_VERSION == RAND_GC
f32 Rand_Centered(void);
f32 Rand_Centered_Variable(u32* rndNum);
#endif
#endif
+8
View File
@@ -24,4 +24,12 @@
#define FAULT_VERSION FAULT_GC
#endif
#define RAND_N64 1 // in OoT N64
#define RAND_GC 2 // in OoT GC
#if PLATFORM_N64
#define RAND_VERSION RAND_N64
#else
#define RAND_VERSION RAND_GC
#endif
#endif