From fcbc3968bd95e4d19b37d9fa4bca51b1db8596ff Mon Sep 17 00:00:00 2001
From: Ben Bridle <ben@derelict.engineering>
Date: Fri, 22 Nov 2024 16:04:33 +1300
Subject: Implement name and author ports in system device

---
 arm9/source/types/readbuf.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 arm9/source/types/readbuf.c

(limited to 'arm9/source/types/readbuf.c')

diff --git a/arm9/source/types/readbuf.c b/arm9/source/types/readbuf.c
new file mode 100644
index 0000000..eaee27a
--- /dev/null
+++ b/arm9/source/types/readbuf.c
@@ -0,0 +1,12 @@
+#include <nds.h>
+#include "readbuf.h"
+
+u8 rb_read(ReadBuf *buf) {
+    u8 output = buf->mem[buf->p];
+    if (output) buf->p++;
+    return output;
+}
+
+void rb_reset(ReadBuf *buf) {
+    buf->p = 0;
+}
-- 
cgit v1.2.3-70-g09d2