]> 4ch.mooo.com Git - 16.git/blobdiff - src/ps.c
p16 is being worked on a bunch by me wwww [16_ca needs huge amounts of work and I...
[16.git] / src / ps.c
diff --git a/src/ps.c b/src/ps.c
new file mode 100755 (executable)
index 0000000..b1560a0
--- /dev/null
+++ b/src/ps.c
@@ -0,0 +1,19 @@
+#include <stdio.h>\r
+#include "src/lib/16_head.h"\r
+\r
+#define PRINT_OPAQUE_STRUCT(p)  print_mem((p), sizeof(*(p)))\r
+\r
+void print_mem(void const *vp, size_t n)\r
+{\r
+       size_t i;\r
+       unsigned char const *p = vp;\r
+       for (i=0; i<n; i++)\r
+               printf("%02x\n", p[i]);\r
+       putchar('\n');\r
+};\r
+\r
+void main()\r
+{\r
+       static global_game_variables_t gvar;\r
+       PRINT_OPAQUE_STRUCT(&gvar);\r
+}\r