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
92
93
//! `IPickupsComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Pickups/pickups.hpp`.
//! Implemented by `PickupsComponent` in the server's `Pickups`.
//!
//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
//! regenerate. Slots are clang's layout of the header for each ABI, checked
//! against the official binaries by `cargo xtask check-abi --generated`.
#![allow(unused_imports)]
use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
use crate::omp::types::{
Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
UID, Vector2, Vector3, Vector4, WorldTimePoint,
};
use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
use crate::omp::*;
slots! {
/// `IEventDispatcher<PickupEventHandler> & IPickupsComponent::getEventDispatcher()`
SLOT_GET_EVENT_DISPATCHER: usize = 18, 16;
/// `int IPickupsComponent::toLegacyID(int)`
SLOT_TO_LEGACY_ID: usize = 20, 18;
/// `int IPickupsComponent::fromLegacyID(int)`
SLOT_FROM_LEGACY_ID: usize = 21, 19;
/// `void IPickupsComponent::releaseLegacyID(int)`
SLOT_RELEASE_LEGACY_ID: usize = 22, 20;
/// `int IPickupsComponent::reserveLegacyID()`
SLOT_RESERVE_LEGACY_ID: usize = 23, 21;
/// `void IPickupsComponent::setLegacyID(int, int)`
SLOT_SET_LEGACY_ID: usize = 24, 22;
}
virtual_fns! {
/// `IEventDispatcher<PickupEventHandler> & IPickupsComponent::getEventDispatcher()`.
///
/// # Safety
/// `component` must be a live `IPickupsComponent`.
#[must_use]
pub fn pickups_event_dispatcher(
component: IPickupsComponent,
) -> *mut EventDispatcher<PickupHandler> = [0, SLOT_GET_EVENT_DISPATCHER] or std::ptr::null_mut();
/// `int IPickupsComponent::toLegacyID(int)`.
///
/// # Safety
/// `component` must be a live `IPickupsComponent`.
#[must_use]
pub fn pickups_to_legacy_id(
component: IPickupsComponent,
real: i32,
) -> i32 = [0, SLOT_TO_LEGACY_ID] or 0;
/// `int IPickupsComponent::fromLegacyID(int)`.
///
/// # Safety
/// `component` must be a live `IPickupsComponent`.
#[must_use]
pub fn pickups_from_legacy_id(
component: IPickupsComponent,
legacy: i32,
) -> i32 = [0, SLOT_FROM_LEGACY_ID] or 0;
/// `void IPickupsComponent::releaseLegacyID(int)`.
///
/// # Safety
/// `component` must be a live `IPickupsComponent`.
pub fn pickups_release_legacy_id(
component: IPickupsComponent,
legacy: i32,
) = [0, SLOT_RELEASE_LEGACY_ID];
/// `int IPickupsComponent::reserveLegacyID()`.
///
/// # Safety
/// `component` must be a live `IPickupsComponent`.
#[must_use]
pub fn pickups_reserve_legacy_id(
component: IPickupsComponent,
) -> i32 = [0, SLOT_RESERVE_LEGACY_ID] or 0;
/// `void IPickupsComponent::setLegacyID(int, int)`.
///
/// # Safety
/// `component` must be a live `IPickupsComponent`.
pub fn pickups_set_legacy_id(
component: IPickupsComponent,
legacy: i32,
real: i32,
) = [0, SLOT_SET_LEGACY_ID];
}
// What the generator left out, and why.
// skipped: `IPickup * IPickupsComponent::create(int, PickupType, Vector3, uint32_t, bool)` — covered by a hand-written wrapper under another name