Match Environment_DrawSkyboxStarsImpl (z_kankyo OK), introduce rand.h (#1476)

* match Environment_DrawSkyboxStarsImpl

* revert

* PR Review

* small fix

* group pads together

* Color_RGBA8_u32
This commit is contained in:
engineer124
2023-11-10 10:28:16 +11:00
committed by GitHub
parent e96f18d4e7
commit 2823a720bc
8 changed files with 55 additions and 46 deletions
+1 -7
View File
@@ -1,4 +1,4 @@
#include "global.h"
#include "rand.h"
//! The latest generated random number, used to generate the next number in the sequence.
static u32 sRandInt = 1;
@@ -7,12 +7,6 @@ static u32 sRandInt = 1;
//! This can't be static because it is used in z_kankyo.
u32 gRandFloat;
//! These values are recommended by the algorithms book *Numerical Recipes in C. The Art of Scientific Computing*, 2nd
//! Edition, 1992, ISBN 0-521-43108-5. (p. 284):
//! > This is about as good as any 32-bit linear congruential generator, entirely adequate for many uses.
#define RAND_MULTIPLIER 1664525
#define RAND_INCREMENT 1013904223
/**
* Generates the next pseudo-random integer.
*/