diff options
Diffstat (limited to 'Djup.Native/LibDjup.cs')
| -rw-r--r-- | Djup.Native/LibDjup.cs | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Djup.Native/LibDjup.cs b/Djup.Native/LibDjup.cs index 0b4a3db..15dcdad 100644 --- a/Djup.Native/LibDjup.cs +++ b/Djup.Native/LibDjup.cs @@ -31,21 +31,24 @@ public static partial class LibDjup [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(log_set_level))] public static partial Vec2 log_set_level(LogLevel minLevel); - [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(world_create))] - public static partial IntPtr world_create(); + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(physics_context_create))] + public static partial IntPtr physics_context_create(uint snapshots); - [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(world_free))] - public static partial void world_free(IntPtr world); + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(physics_context_free))] + public static partial void physics_context_free(IntPtr context); - [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(world_create_entity))] - public static partial int world_create_entity(IntPtr world, EntityKind kind); + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(physics_context_get_snapshot))] + public static partial IntPtr physics_context_get_snapshot(IntPtr context); - [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(world_find_entity))] - public static unsafe partial Entity* world_find_entity(IntPtr world, int entityId); + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(physics_context_return_snapshot))] + public static partial void physics_context_return_snapshot(IntPtr context, IntPtr snapshot); - [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(world_remove_entity))] - public static partial void world_remove_entity(IntPtr world, int entityId); + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(physics_tick))] + public static partial int physics_tick(IntPtr currentSnapshot, double delta, IntPtr nextSnapshot); - [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(world_tick))] - public static partial int world_tick(IntPtr world, double delta); + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(snapshot_put_player))] + public static unsafe partial int snapshot_put_player(IntPtr snapshot, uint playerId, Player *player); + + [LibraryImport(LibraryName, EntryPoint = Prefix + nameof(snapshot_set_player_input))] + public static partial int snapshot_set_player_input(IntPtr snapshot, uint playerId, byte input); } |
