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
//! `IVehiclesComponent` — generated by `cargo xtask gen-omp` from `Server/Components/Vehicles/vehicles.hpp`.
//! Implemented by `VehiclesComponent` in the server's `Vehicles`.
//!
//! 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! {
/// `StaticArray<uint8_t, MAX_VEHICLE_MODELS> & IVehiclesComponent::models()`
SLOT_MODELS: usize = 18, 16;
/// `IVehicle * IVehiclesComponent::create(bool, int, Vector3, float, int, int, Seconds, bool)`
SLOT_CREATE: usize = 19, 18;
/// `IVehicle * IVehiclesComponent::create(const VehicleSpawnData &)`
SLOT_CREATE_FROM_SPAWN_DATA: usize = 20, 17;
}
virtual_fns! {
/// `StaticArray<uint8_t, MAX_VEHICLE_MODELS> & IVehiclesComponent::models()`.
///
/// # Safety
/// `component` must be a live `IVehiclesComponent`.
#[must_use]
pub fn vehicles_models(
component: IVehiclesComponent,
) -> *mut [u8; 212] = [0, SLOT_MODELS] or std::ptr::null_mut();
/// `IVehicle * IVehiclesComponent::create(bool, int, Vector3, float, int, int, Seconds, bool)`.
///
/// # Safety
/// `component` must be a live `IVehiclesComponent`.
#[must_use]
pub fn vehicles_create(
component: IVehiclesComponent,
is_static: bool,
model_id: i32,
position: Vector3,
z: f32,
colour1: i32,
colour2: i32,
respawn_delay: Seconds,
add_siren: bool,
) -> *mut IVehicle = [0, SLOT_CREATE] or std::ptr::null_mut();
/// `IVehicle * IVehiclesComponent::create(const VehicleSpawnData &)`.
///
/// # Safety
/// `component` must be a live `IVehiclesComponent`.
#[must_use]
pub fn vehicles_create_from_spawn_data(
component: IVehiclesComponent,
data: &VehicleSpawnData,
) -> *mut IVehicle = [0, SLOT_CREATE_FROM_SPAWN_DATA] or std::ptr::null_mut();
}
// What the generator left out, and why.
// skipped: `IEventDispatcher<VehicleEventHandler> & IVehiclesComponent::getEventDispatcher()` — `VehicleHandler` and its dispatcher are written by hand