aboutsummaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/dat.h b/dat.h
new file mode 100644
index 0000000..c93b24e
--- /dev/null
+++ b/dat.h
@@ -0,0 +1,25 @@
+typedef struct GameState GameState;
+typedef struct Derivative Derivative;
+typedef struct Stats Stats;
+typedef struct Sprite Sprite;
+
+struct Stats
+{
+ double cur;
+ double total;
+ double min, avg, max;
+ uvlong nupdates;
+
+ void (*update)(Stats*, double);
+};
+
+struct GameState
+{
+ double x, v;
+ Stats stats;
+};
+
+struct Derivative
+{
+ double dx, dv;
+};