samp_sdk/omp/generated/checkpoint.rs
1//! `ICheckpointData` — generated by `cargo xtask gen-omp` from `Server/Components/Checkpoints/checkpoints.hpp`.
2//! Implemented by `CheckpointData` in the server's `Checkpoints`.
3//!
4//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
5//! regenerate. Slots are clang's layout of the header for each ABI, checked
6//! against the official binaries by `cargo xtask check-abi --generated`.
7
8#![allow(unused_imports)]
9
10use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
11use crate::omp::types::{
12 Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
13 UID, Vector2, Vector3, Vector4, WorldTimePoint,
14};
15use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
16use crate::omp::*;
17
18opaque! {
19 /// Opaque handle for `ICheckpointData*`.
20 pub ICheckpointData;
21}
22
23slots! {
24 /// `Vector3 ICheckpointDataBase::getPosition()`
25 SLOT_GET_POSITION: usize = 0, 0;
26 /// `void ICheckpointDataBase::setPosition(const Vector3 &)`
27 SLOT_SET_POSITION: usize = 1, 1;
28 /// `float ICheckpointDataBase::getRadius()`
29 SLOT_GET_RADIUS: usize = 2, 2;
30 /// `void ICheckpointDataBase::setRadius(float)`
31 SLOT_SET_RADIUS: usize = 3, 3;
32 /// `bool ICheckpointDataBase::isPlayerInside()`
33 SLOT_IS_PLAYER_INSIDE: usize = 4, 4;
34 /// `void ICheckpointDataBase::setPlayerInside(bool)`
35 SLOT_SET_PLAYER_INSIDE: usize = 5, 5;
36 /// `void ICheckpointDataBase::enable()`
37 SLOT_ENABLE: usize = 6, 6;
38 /// `void ICheckpointDataBase::disable()`
39 SLOT_DISABLE: usize = 7, 7;
40 /// `bool ICheckpointDataBase::isEnabled()`
41 SLOT_IS_ENABLED: usize = 8, 8;
42}
43
44virtual_fns! {
45 /// `Vector3 ICheckpointDataBase::getPosition()`.
46 ///
47 /// # Safety
48 /// `checkpoint` must be a live `ICheckpointData`.
49 #[must_use]
50 pub fn checkpoint_position(
51 checkpoint: ICheckpointData,
52 ) -> Vector3 = [0, SLOT_GET_POSITION] or Vector3::ZERO;
53
54 /// `void ICheckpointDataBase::setPosition(const Vector3 &)`.
55 ///
56 /// # Safety
57 /// `checkpoint` must be a live `ICheckpointData`.
58 pub fn checkpoint_set_position(
59 checkpoint: ICheckpointData,
60 position: &Vector3,
61 ) = [0, SLOT_SET_POSITION];
62
63 /// `float ICheckpointDataBase::getRadius()`.
64 ///
65 /// # Safety
66 /// `checkpoint` must be a live `ICheckpointData`.
67 #[must_use]
68 pub fn checkpoint_radius(checkpoint: ICheckpointData) -> f32 = [0, SLOT_GET_RADIUS] or 0.0;
69
70 /// `void ICheckpointDataBase::setRadius(float)`.
71 ///
72 /// # Safety
73 /// `checkpoint` must be a live `ICheckpointData`.
74 pub fn checkpoint_set_radius(checkpoint: ICheckpointData, radius: f32) = [0, SLOT_SET_RADIUS];
75
76 /// `bool ICheckpointDataBase::isPlayerInside()`.
77 ///
78 /// # Safety
79 /// `checkpoint` must be a live `ICheckpointData`.
80 #[must_use]
81 pub fn checkpoint_is_player_inside(
82 checkpoint: ICheckpointData,
83 ) -> bool = [0, SLOT_IS_PLAYER_INSIDE] or false;
84
85 /// `void ICheckpointDataBase::setPlayerInside(bool)`.
86 ///
87 /// # Safety
88 /// `checkpoint` must be a live `ICheckpointData`.
89 pub fn checkpoint_set_player_inside(
90 checkpoint: ICheckpointData,
91 inside: bool,
92 ) = [0, SLOT_SET_PLAYER_INSIDE];
93
94 /// `void ICheckpointDataBase::enable()`.
95 ///
96 /// # Safety
97 /// `checkpoint` must be a live `ICheckpointData`.
98 pub fn checkpoint_enable(checkpoint: ICheckpointData) = [0, SLOT_ENABLE];
99
100 /// `void ICheckpointDataBase::disable()`.
101 ///
102 /// # Safety
103 /// `checkpoint` must be a live `ICheckpointData`.
104 pub fn checkpoint_disable(checkpoint: ICheckpointData) = [0, SLOT_DISABLE];
105
106 /// `bool ICheckpointDataBase::isEnabled()`.
107 ///
108 /// # Safety
109 /// `checkpoint` must be a live `ICheckpointData`.
110 #[must_use]
111 pub fn checkpoint_is_enabled(
112 checkpoint: ICheckpointData,
113 ) -> bool = [0, SLOT_IS_ENABLED] or false;
114}