summaryrefslogtreecommitdiff
path: root/lib/physics.h
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2025-07-26 21:09:26 +0300
committerJoel Stålnacke <joel@saker.fi>2025-07-26 21:09:26 +0300
commit63506e59366acddf4a9e017ad8aebeadcf58c164 (patch)
tree2fa106661b85497fc1d63b7743a78e523ab48fba /lib/physics.h
parent53f68bb7b0dce309723675c4b97f726a469031c0 (diff)
Old changesHEADmaster
Diffstat (limited to 'lib/physics.h')
-rw-r--r--lib/physics.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/physics.h b/lib/physics.h
new file mode 100644
index 0000000..7aa2b31
--- /dev/null
+++ b/lib/physics.h
@@ -0,0 +1,17 @@
+#include "types.h"
+
+struct snapshot;
+
+/* A game world */
+struct context {
+ size_t snapshots_len;
+ struct snapshot *snapshots;
+};
+
+struct context *dp_physics_context_create(size_t snapshots);
+void dp_physics_context_free(struct context *);
+
+struct snapshot *dp_physics_context_get_snapshot(struct context *);
+void dp_physics_context_return_snapshot(struct context *, struct snapshot *);
+
+int dp_physics_tick(const struct snapshot *current, double delta, struct snapshot *next);