summaryrefslogtreecommitdiff
path: root/stage3/rng.c
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2023-12-22 23:26:21 +0100
committerLizzy Fleckenstein <lizzy@vlhl.dev>2023-12-22 23:26:21 +0100
commit8ed1362368dc064fa35bf879c1f905165b990de8 (patch)
treef8369b0332b760d5c5b20a8b919be155c5b9464c /stage3/rng.c
parent13293ec3238b62c66d323b82e595e860e193b6ed (diff)
downloadcuddles-8ed1362368dc064fa35bf879c1f905165b990de8.tar.xz
add rotating cheese
This adds the Cheese3D graphics api and makes the cheese command display a cheese rotating in 3d as a demo
Diffstat (limited to 'stage3/rng.c')
-rw-r--r--stage3/rng.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/stage3/rng.c b/stage3/rng.c
new file mode 100644
index 0000000..a52b449
--- /dev/null
+++ b/stage3/rng.c
@@ -0,0 +1,9 @@
+#include "rng.h"
+
+int rand()
+{
+ static unsigned long int next = 1;
+
+ next = next * 1103515245 + 12345;
+ return (unsigned int) (next/65535) % 32768;
+}