From d38f0ebd62ebbaf84019dc7c4f563634c47ca19c Mon Sep 17 00:00:00 2001 From: Avril Date: Sat, 6 Nov 2021 20:13:17 +0000 Subject: [PATCH] Cannot register sm64 dyn constructor for some reason... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fortune for rngxx's current commit: Curse − 凶 --- src/rng/sm64.cpp | 6 ++++++ src/seed.cpp | 2 -- src/test/main.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 src/rng/sm64.cpp diff --git a/src/rng/sm64.cpp b/src/rng/sm64.cpp new file mode 100644 index 0000000..7600bab --- /dev/null +++ b/src/rng/sm64.cpp @@ -0,0 +1,6 @@ +#include +#include + +#include + +RNGXX_APPLY_CTOR(rng, sm64, u64); diff --git a/src/seed.cpp b/src/seed.cpp index b5c5564..2e96a9b 100644 --- a/src/seed.cpp +++ b/src/seed.cpp @@ -5,8 +5,6 @@ #include -#include - static u64 _sm64_next(u64& x) { u64 z = (x += 0x9e3779b97f4a7c15); diff --git a/src/test/main.c b/src/test/main.c index b4e6cf8..bffbafe 100644 --- a/src/test/main.c +++ b/src/test/main.c @@ -20,7 +20,7 @@ static int next(rng_t* rng, const int* min, const int* max) int main() { - rng_dyn_ctor_ref rcref = rng_ctor_ref("crand"); + rng_dyn_ctor_ref rcref = rng_ctor_ref("sm64"); rng_ctor_fn rctor = rng_ctor("crand"); rng_t* engine = NULL;