Updated all static variables to have the s_ prefix and constants to upper case (#591)
* Updated all static variables to have the s_ prefix and constants to upper case * Renamed missed sneaky functions in round.c (+ clang-format...) * Renamed a few more missed constants * Updated rng_update() documentation * Apply suggestions from Copilot's code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Added missed suggestion * Updated rng_update() comment --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot Autofix powered by AI
parent
6e7d8a8399
commit
7a5a4a1276
+3
-3
@@ -7,7 +7,7 @@
|
||||
#include <tonc.h>
|
||||
|
||||
// Accumulate timer 1 into a bigger variable so we can generate more diverse seeds
|
||||
static u32 timer_acc = 0;
|
||||
static u32 s_timer_acc = 0;
|
||||
|
||||
// Timers usage docs: https://gbadev.net/tonc/timers.html
|
||||
void rng_init(void)
|
||||
@@ -18,7 +18,7 @@ void rng_init(void)
|
||||
|
||||
void rng_update(void)
|
||||
{
|
||||
timer_acc += (u32)REG_TM1D;
|
||||
s_timer_acc += (u32)REG_TM1D;
|
||||
}
|
||||
|
||||
void rng_set_seed(u32 seed)
|
||||
@@ -30,7 +30,7 @@ void rng_set_seed(u32 seed)
|
||||
|
||||
void rng_shuffle_seed(void)
|
||||
{
|
||||
rng_set_seed(timer_acc);
|
||||
rng_set_seed(s_timer_acc);
|
||||
}
|
||||
|
||||
u32 rng_get_u32(void)
|
||||
|
||||
Reference in New Issue
Block a user