summaryrefslogtreecommitdiff
path: root/lib/snapshot.h
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2026-03-23 19:50:18 +0200
committerJoel Stålnacke <joel@saker.fi>2026-03-23 19:50:18 +0200
commit3a1f9fe6800ef5fe7bbf1c0a5976720383ba84fe (patch)
treef1218eb4085a654f6bb70671b41b4a74e646c052 /lib/snapshot.h
parent3870982f640260822bf605e693782ce9f5d79cf6 (diff)
Rewrite native code in Odin and use ECSodin
Diffstat (limited to 'lib/snapshot.h')
-rw-r--r--lib/snapshot.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/lib/snapshot.h b/lib/snapshot.h
deleted file mode 100644
index 028eac2..0000000
--- a/lib/snapshot.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#include "types.h"
-#include "constants.h"
-
-enum {
- STATE_INACTIVE = 0,
- STATE_ACTIVE,
- STATE_REMOVED,
- STATE_DEAD
-};
-
-struct player {
- uint8_t state;
- uint8_t input;
- vec2 pos;
- vec2 vel;
-};
-
-struct ball {
- uint8_t state;
- vec2 pos;
- vec2 vel;
-};
-
-struct snapshot {
- char active;
- uint32_t tick;
- int32_t players_len;
- struct player *players;
- int32_t balls_len;
- struct ball *balls;
-};
-
-int dp_snapshot_init(struct snapshot *, int32_t players_len, int32_t balls_len);
-void dp_snapshot_deinit(struct snapshot *);
-
-int dp_snapshot_put_player(struct snapshot *, int32_t id, const struct player *);
-struct player *dp_snapshot_get_player(struct snapshot *, int32_t id);
-int dp_snapshot_remove_player(struct snapshot *, int32_t id);
-int dp_snapshot_set_player_input(struct snapshot *, int32_t id, uint8_t input);
-
-int dp_snapshot_put_ball(struct snapshot *, int32_t id, const struct ball *);
-struct ball *dp_snapshot_get_ball(struct snapshot *, int32_t id);
-int dp_snapshot_remove_ball(struct snapshot *, int32_t id);