1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
use crate::scripting::DropbearContext;
use std::ffi::c_char;
pub type Init = unsafe extern "C" fn(dropbear_context: *const DropbearContext) -> i32;
pub type LoadTagged = unsafe extern "C" fn(tag: *const c_char) -> i32;
pub type LoadWithEntities =
unsafe extern "C" fn(tag: *const c_char, entities: *const u64, entity_count: i32) -> i32;
pub type UpdateAll = unsafe extern "C" fn(dt: f64) -> i32;
pub type UpdateTagged = unsafe extern "C" fn(tag: *const c_char, dt: f64) -> i32;
pub type UpdateWithEntities = unsafe extern "C" fn(
tag: *const c_char,
entities: *const u64,
entity_count: i32,
dt: f64,
) -> i32;
pub type PhysicsUpdateAll = unsafe extern "C" fn(dt: f64) -> i32;
pub type PhysicsUpdateTagged = unsafe extern "C" fn(tag: *const c_char, dt: f64) -> i32;
pub type PhysicsUpdateWithEntities = unsafe extern "C" fn(
tag: *const c_char,
entities: *const u64,
entity_count: i32,
dt: f64,
) -> i32;
pub type CollisionEvent = unsafe extern "C" fn(
tag: *const c_char,
current_entity_id: u64,
event_type: i32,
c1_index: i32,
c1_generation: i32,
c1_entity_id: u64,
c1_id: i32,
c2_index: i32,
c2_generation: i32,
c2_entity_id: u64,
c2_id: i32,
flags: u64,
) -> i32;
pub type ContactForceEvent = unsafe extern "C" fn(
tag: *const c_char,
current_entity_id: u64,
c1_index: i32,
c1_generation: i32,
c1_entity_id: u64,
c1_id: i32,
c2_index: i32,
c2_generation: i32,
c2_entity_id: u64,
c2_id: i32,
total_fx: f64,
total_fy: f64,
total_fz: f64,
total_force_magnitude: f64,
max_fx: f64,
max_fy: f64,
max_fz: f64,
max_force_magnitude: f64,
) -> i32;
pub type DestroyTagged = unsafe extern "C" fn(tag: *const c_char) -> i32;
pub type DestroyInScopeTagged = unsafe extern "C" fn(tag: *const c_char) -> i32;
pub type DestroyAll = unsafe extern "C" fn() -> i32;
pub type GetLastErrorMessage = unsafe extern "C" fn() -> *const c_char;
pub type SetLastErrorMessage = unsafe extern "C" fn(msg: *const c_char);
pub type UpdateKotlinComponent =
unsafe extern "C" fn(fqcn: *const c_char, entity_id: u64, dt: f64) -> i32;
pub type InspectKotlinComponent = unsafe extern "C" fn(fqcn: *const c_char) -> i32;