mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-03-13 19:34:03 +03:00
rnd test
Some checks are pending
GenerateBuilds / generate-port-o2r (push) Waiting to run
GenerateBuilds / build-windows (push) Blocked by required conditions
GenerateBuilds / build-macos (push) Blocked by required conditions
GenerateBuilds / build-linux (push) Blocked by required conditions
GenerateBuilds / build-switch (push) Blocked by required conditions
Some checks are pending
GenerateBuilds / generate-port-o2r (push) Waiting to run
GenerateBuilds / build-windows (push) Blocked by required conditions
GenerateBuilds / build-macos (push) Blocked by required conditions
GenerateBuilds / build-linux (push) Blocked by required conditions
GenerateBuilds / build-switch (push) Blocked by required conditions
This commit is contained in:
parent
0798df9037
commit
a8743658e0
@ -13,14 +13,20 @@ f32 Math_ModF(f32 value, f32 mod) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Rand_Init(void) {
|
void Rand_Init(void) {
|
||||||
|
#if defined(__SWITCH__) || defined(__linux__)
|
||||||
|
sRandSeed1 = (s32) osGetTime() % 30000 + 1;
|
||||||
|
sRandSeed2 = (s32) osGetTime() % 30000 + 1;
|
||||||
|
sRandSeed3 = (s32) osGetTime() % 30000 + 1;
|
||||||
|
#else
|
||||||
sRandSeed1 = (s32) osGetTime() % 30000;
|
sRandSeed1 = (s32) osGetTime() % 30000;
|
||||||
sRandSeed2 = (s32) osGetTime() % 30000;
|
sRandSeed2 = (s32) osGetTime() % 30000;
|
||||||
sRandSeed3 = (s32) osGetTime() % 30000;
|
sRandSeed3 = (s32) osGetTime() % 30000;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
f32 Rand_ZeroOne(void) {
|
f32 Rand_ZeroOne(void) {
|
||||||
#if defined(__SWITCH__) || defined(__linux__)
|
#if defined(__SWITCH__) || defined(__linux__)
|
||||||
if (sRandSeed1 == sRandSeed2 == sRandSeed3 == 0){
|
if ((sRandSeed1 == 0) || (sRandSeed2 == 0) || (sRandSeed2 == 0)) {
|
||||||
Rand_Init();
|
Rand_Init();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user