blob: 7aa2b31cc09a45375a7ef4811299b83e413b181e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);
|